How do I restrict user access to plugins?
You can use http://wordpress.org/extend/plugins/members/
You can use http://wordpress.org/extend/plugins/members/
I believe your best bet is to create a custom post type for the certain posts you want editable by multiple authors. When you register your post assign a capability type (#WIKI# in this example) and then add the ‘edit_others_#WIKI#s’ to the author role.
I tried to reproduce what you did. My subscriber role has the following capabilities: delete_messages delete_private_messages delete_published_messages edit_message edit_messages edit_private_messages edit_published_message publish_messages read I marked one of the capabilities “edit_message”. I don’t see this in your picture. But it was absolutely necessary for me to even post messages. Why does it work for you without … Read more
function load_grid() { if ( current_user_can( ‘level_10’ ) ) { wp_enqueue_style(‘grid_css’, plugins_url(‘/lib/css/grid.css’, __FILE__) ); wp_enqueue_script(‘grid_js’, plugins_url(‘/lib/js/grid.js’, __FILE__), array(‘jquery’) ); } } add_action(‘wp_enqueue_scripts’, ‘load_grid’);
Right after I wrote the posts I found it…anyway if someone else is looking for the answer to this, you need to set capabilities when you register your taxonomy. You add the following: ‘capabilities’ => array ( ‘manage_terms’ => ‘edit_posts’, ‘edit_terms’ => ‘edit_posts’, ‘delete_terms’ => ‘edit_posts’, ‘assign_terms’ => ‘edit_posts’ ) edit_posts means administrator’, ‘editor’, ‘author’ … Read more
The part of the capability is the job of the developers of the plugin. But normaly use the most plugins for manage options the object manage_options. But if you will, that your editor only change the plugin options from one plugin, than is this not so easy. All options of the core check for this … Read more
The following code can go in the functions.php file of your theme. However, this kind of operation should not really be bound to a theme. Changing themes would allow the users with your specific role to publish again. Therefore, just put the code in simple plugin. <?php /** * Plugin Name: My specific roles and … Read more
I’m sure you could specify some capabilities while registering the Post Type itself. Although, here is a more robust version that can be used widely across the administration dashboard. /** * Hide dashboard administrator menus from disallowed user roles. * * @author Michael Ecklund * @author_url https://www.michaelbrentecklund.com/ * * @return void */ function mbe_hide_menus() { … Read more
I just happened to provide a short example of setting up a custom role capability (exaplanation and code). In your case, however, you want to add the capability to particular users – not roles. The following code may be a starting point for what you want to do: >>> Setting it up // The IDs … Read more
As far as I know, you can not (easily) set up a custom capability for a certain post/page ID. What is described in the Codex, are the so-called meta capabilities (a set of predefined capabilities with additional arguments/information). A (not-that-easy) way is to write your own my_add_cap, my_current_user_can, my_has_cap etc. functions. Regarding your follow-up question… … Read more