Undefined array key 0 wp-includes/capabilities.php on line 76
Undefined array key 0 wp-includes/capabilities.php on line 76
Undefined array key 0 wp-includes/capabilities.php on line 76
What is the correct approach here? Should all custom caps be added to admin role manually like they are added to other roles? Yes, because register_post_type() will not automatically assign the capabilities to any users or user roles, including administrators, but if Multisite is enabled, then those who are super admins would always be able … Read more
Figured out an easier way. I gave them the edit_other_posts and edit_other_pages role capabilities, and then blocked their access to the admin area using the following: add_action( ‘init’, ‘eri_block_nonadmins_init’ ); function eri_block_nonadmins_init() { $current_url = eri_get_current_url( true, false); if ( (!current_user_can( ‘administrator’ ) && !( defined( ‘DOING_AJAX’ ) && DOING_AJAX )) && (is_admin() || $current_url … Read more
cannot get global $menu value in form request
Set edit capability based on ACF relationship
Why “Mine” is the default view when adding ‘capability_type’ in register_post_type
remove “Edit” from select pages
REST API – Allow /users endpoint depending on a custom capability
user_has_cap filter allows “edit_others_posts” but not is not allowing updating/publishing
Restrict access only of custom post type with standard capabilities to edit_post