Capabilities list not showing in URE
-
Hello.
I registered a new custom post type, as usual, in functions.php:$args = array( "label" => __( "Monumento", "TD" ), "labels" => $labels, "description" => "", "public" => true, "publicly_queryable" => true, "show_ui" => true, "delete_with_user" => false, "show_in_rest" => true, "rest_base" => "", "rest_controller_class" => "WP_REST_Posts_Controller", "has_archive" => false, "show_in_menu" => true, "show_in_nav_menus" => true, "exclude_from_search" => false, "capability_type" => "monumento", "map_meta_cap" => true, "hierarchical" => true, "rewrite" => array( "slug" => "monumento", "with_front" => true ), "query_var" => true, "menu_position" => 49, "menu_icon" => "dashicons-editor-customchar", "supports" => array( "title", "editor", "revisions","page-attributes" ), ); register_post_type( "monumento", $args );
But in the URE page I can’t find the capabilities: they’re not present in the general list, and the post type counts 0 capabilities (“Monumenti (0/0)”).
If I check the capabilities for this post type in $globals
var_dump($GLOBALS['wp_post_types']['monumento']);
I get the right capability list:
["cap"]=> object(stdClass)#11058 (15) { ["edit_post"]=> string(14) "edit_monumento" ["read_post"]=> string(14) "read_monumento" ["delete_post"]=> string(16) "delete_monumento" ["edit_posts"]=> string(15) "edit_monumentos" ["edit_others_posts"]=> string(22) "edit_others_monumentos" ["publish_posts"]=> string(18) "publish_monumentos" ["read_private_posts"]=> string(23) "read_private_monumentos" ["read"]=> string(4) "read" ["delete_posts"]=> string(17) "delete_monumentos" ["delete_private_posts"]=> string(25) "delete_private_monumentos" ["delete_published_posts"]=> string(27) "delete_published_monumentos" ["delete_others_posts"]=> string(24) "delete_others_monumentos" ["edit_private_posts"]=> string(23) "edit_private_monumentos" ["edit_published_posts"]=> string(25) "edit_published_monumentos" ["create_posts"]=> string(15) "edit_monumentos" }
It seems like URE can’t list all the capabilities…
The strange thing is I have a lot of older custom post type in my functions.php, and they all work as expected.Is there a maximum number of capabilities URE can list? Or am I doing anything wrong?
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Capabilities list not showing in URE’ is closed to new replies.