The Capability to choose post/page template
A user with the capability of Create/Edit/Delete posts may access to choose post template.For more, please visit Roles and Capabilities Hope this will helps you.
A user with the capability of Create/Edit/Delete posts may access to choose post template.For more, please visit Roles and Capabilities Hope this will helps you.
You can use this plugin: https://de.wordpress.org/plugins/user-role-editor/ You can set up a new role and copy all allowed tasks to the new role. In adminimize you can then disable what you need to.
You can find list of capabilities here: Roles and Capabilities There is no capability called edit_post nor edit_page. But… There is also something called Meta Capabilities. The capabilities listed on the Capabilities list are global capabilities. So they’re saying that user can edit posts or pages. But it doesn’t mean that given user can edit … Read more
You can take away users’ capabilities with a plugin like User Role Editor, or programmatically. What you’ll need to do is collect a list of all your post types that appear in the Editor (Core has Post and Page; plugins and themes may add more) and then remove properties with a plugin. For example, you … Read more
Ok I’ve found the problem. The issue was indeed that I was not passing the nonce of the request in the proper way. Because, as I found in the docs: If no nonce is provided the API will set the current user to 0, turning the request into an unauthenticated request, even if you’re logged … Read more
As of now, there is no dedicated user capability to read a reusable block; it is not possible to customize the capabilities (reading, editing, deleting) exclusively for reusable blocks. The capabilities are currently tied into in the capabilities of the post type ‘post’ so the capabilities that you give to the post type ‘post’ will … Read more
When using user_can() you pass it the user ID (or object) and the “capability” you want to check: $user_can = user_can( $user_id, ‘edit_posts’ ); The list of built in roles, and what capabilities they have, is available here. You can pass any of those to the function to determine if a user has that capability … Read more
The best place to add this would be in the plugin’s activation hook. You can either call the dynamic activate_{$plugin} hook, or better yet use the provided register_activation_hook method. Using your code example above – something like this would be what you’re looking for: register_activation_hook( __FILE__, function() { $role = get_role( ‘editor’ ); $role->add_cap( ‘edit_booked_appointments’, … Read more
WordPress does not have the ability to prevent code from running based on who added it. That’s not the problem. The problem is far simpler: the code they added is specifically written to not work for anyone but administrators: if ( empty( $_GET[‘geolocate_listings’] ) || ! current_user_can( ‘administrator’ ) ) { return; } You can … Read more
WooCommerce will only show the admin bar and give dashboard access to users who have the edit_posts or manage_woocommerce capabilities. If you don’t want to give users one of those capabilities, you can use the woocommerce_disable_admin_bar filter to give access and show the admin bar: add_filter( ‘woocommerce_disable_admin_bar’, function( $disable_admin_bar ) { if ( current_user_can( ‘my_capability’ … Read more