Skip to content

Commit c4f56f2

Browse files
Editor: Add 'edit_theme_options' capabilities to wp_navigation post type.
Adds `'edit_theme_options'` capabilities top restrict Navigation permission. Partial backport from Gutenberg WordPress/gutenberg#37454. Follow-up to [52069], [52145]. Props spacedmonkey, get_dave, hellofromTonya. See #54487. Built from https://develop.svn.wordpress.org/trunk@52400 git-svn-id: https://core.svn.wordpress.org/trunk@51992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 5f62895 commit c4f56f2

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

wp-includes/post.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,18 @@ function create_initial_post_types() {
509509
'show_in_rest' => true,
510510
'rewrite' => false,
511511
'map_meta_cap' => true,
512+
'capabilities' => array(
513+
'edit_others_posts' => 'edit_theme_options',
514+
'delete_posts' => 'edit_theme_options',
515+
'publish_posts' => 'edit_theme_options',
516+
'create_posts' => 'edit_theme_options',
517+
'read_private_posts' => 'edit_theme_options',
518+
'delete_private_posts' => 'edit_theme_options',
519+
'delete_published_posts' => 'edit_theme_options',
520+
'delete_others_posts' => 'edit_theme_options',
521+
'edit_private_posts' => 'edit_theme_options',
522+
'edit_published_posts' => 'edit_theme_options',
523+
),
512524
'rest_base' => 'navigation',
513525
'rest_controller_class' => 'WP_REST_Posts_Controller',
514526
'supports' => array(

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '5.9-beta3-52399';
19+
$wp_version = '5.9-beta3-52400';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)