WordPress.org

Make WordPress Core

Changeset 52400


Ignore:
Timestamp:
12/21/2021 04:24:23 AM (4 weeks ago)
Author:
hellofromTonya
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r52368 r52400  
    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',
Note: See TracChangeset for help on using the changeset viewer.