mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02:00
Blocks: Define the edit_posts
capability on the wp_block
post type.
Meta capability mapping doesn't recurse through multiple meta definitions, which creates a situation where the capabilities test is looking for the non-existent primitive capability `edit_blocks`, which should instead be mapped to `edit_posts`. Defining the `edit_posts` capability when the `wp_block` post type is registered causes this check to change to to the `edit_posts` capability. Props aduth. Fixes #45373. Built from https://develop.svn.wordpress.org/trunk@44687 git-svn-id: http://core.svn.wordpress.org/trunk@44518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
af73067eb5
commit
7d17b53ff2
@ -292,6 +292,7 @@ function create_initial_post_types() {
|
|||||||
'read' => 'edit_posts',
|
'read' => 'edit_posts',
|
||||||
// You need to be able to publish posts, in order to create blocks.
|
// You need to be able to publish posts, in order to create blocks.
|
||||||
'create_posts' => 'publish_posts',
|
'create_posts' => 'publish_posts',
|
||||||
|
'edit_posts' => 'edit_posts',
|
||||||
'edit_published_posts' => 'edit_published_posts',
|
'edit_published_posts' => 'edit_published_posts',
|
||||||
'delete_published_posts' => 'delete_published_posts',
|
'delete_published_posts' => 'delete_published_posts',
|
||||||
'edit_others_posts' => 'edit_others_posts',
|
'edit_others_posts' => 'edit_others_posts',
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.1-beta1-44686';
|
$wp_version = '5.1-beta1-44687';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user