mirror of
git://develop.git.wordpress.org/
synced 2025-03-27 23:32:35 +01:00
Editor: Add 'edit_theme_options' capabilities to wp_navigation
post type.
Adds `'edit_theme_options'` capabilities top restrict Navigation permission. Partial backport from Gutenberg https://github.com/WordPress/gutenberg/pull/37454. Follow-up to [52069], [52145]. Props spacedmonkey, get_dave, hellofromTonya. See #54487. git-svn-id: https://develop.svn.wordpress.org/trunk@52400 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e1f5600c15
commit
0435e03998
@ -509,6 +509,18 @@ function create_initial_post_types() {
|
||||
'show_in_rest' => true,
|
||||
'rewrite' => false,
|
||||
'map_meta_cap' => true,
|
||||
'capabilities' => array(
|
||||
'edit_others_posts' => 'edit_theme_options',
|
||||
'delete_posts' => 'edit_theme_options',
|
||||
'publish_posts' => 'edit_theme_options',
|
||||
'create_posts' => 'edit_theme_options',
|
||||
'read_private_posts' => 'edit_theme_options',
|
||||
'delete_private_posts' => 'edit_theme_options',
|
||||
'delete_published_posts' => 'edit_theme_options',
|
||||
'delete_others_posts' => 'edit_theme_options',
|
||||
'edit_private_posts' => 'edit_theme_options',
|
||||
'edit_published_posts' => 'edit_theme_options',
|
||||
),
|
||||
'rest_base' => 'navigation',
|
||||
'rest_controller_class' => 'WP_REST_Posts_Controller',
|
||||
'supports' => array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user