Post/Custom Post Type URL Access
If you don’t expose the permalinks on the front end, then there’s no way for someone to reach them, but if you want to absolutely prevent it then set publicly_queryable to false when you register your post type.
If you don’t expose the permalinks on the front end, then there’s no way for someone to reach them, but if you want to absolutely prevent it then set publicly_queryable to false when you register your post type.
What do you mean by “takes them to the users account as if they’re the user”? Do you mean allow someone to log in as another WP user? If so then I think you are looking for a plugin like the User Switching plugin. That plugin only allows administrators to “switch” to another user. http://wordpress.org/plugins/user-switching/
Normally WordPress backward compatibility is very strong, (sometimes too much strong IMHO). So it’s close to impossible that a public property (properties declared with var are public at any effects) become private in a future release. However, as you noticed, the variable is marked as private in class doc block, this mean that developers should … Read more
/** * Allow access to own content only */ function my_authored_content($query) { //get current user info to see if they are allowed to access ANY posts and pages $current_user = wp_get_current_user(); // set current user to $is_user $is_user = $current_user->user_login; //if is admin or ‘is_user’ does not equal #username if (!current_user_can(‘manage_options’)){ //if in the admin … Read more
Try the Jetpack Comments system, included in the Jetpack plugin. http://jetpack.me/support/comments/
function HSA_add_to_menu() { add_options_page(‘Horizontal scrolling announcement’, __(‘Horizontal Scrolling’, WP_hsa_UNIQUE_NAME), ‘edit_others_posts’, ‘horizontal-scrolling-announcement’, ‘HSA_admin_options’ ); } http://codex.wordpress.org/Roles_and_Capabilities#Editor
Your if case matches any user who is not both a super admin and test_user. For example, given a user test_user who is not superadmin, the result would be if (true || false) redirect Since one condition is true, the redirect would be triggered. Using the && operator, you’d get if (true && false) redirect. … Read more
You can use User Admin Simplifier plugin. It allows you to hide plugins and options from choosen users.
The foolproof method here to grab a dynamic member variable is to use reflection! Lets say we have this class: class MyClass { private $myProperty = true; } We can use reflection to acquire the class, and the property: $class = new ReflectionClass(“MyClass”); $property = $class->getProperty(“myProperty”); We can then set that property to accessible: $property->setAccessible(true); … Read more
There are dozens of ways to achive this. While your approach might work for a low amount of users, it propably is too much work to deal with hundrets or even thousands of users. That’s why I would highly recommend an automated approach, where most of the user handling is done by WordPress. However, for … Read more