Blocks: Fix coding standards introduced in [43804].
Props Presskopp, swissspidy. See #45098 Built from https://develop.svn.wordpress.org/branches/5.0@43806 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b1f64a77d8
commit
4521b34dca
|
@ -229,7 +229,7 @@ function create_initial_post_types() {
|
|||
'wp_block',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __( 'Blocks'),
|
||||
'name' => __( 'Blocks' ),
|
||||
'singular_name' => __( 'Block' ),
|
||||
'search_items' => __( 'Search Blocks' ),
|
||||
),
|
||||
|
@ -242,7 +242,7 @@ function create_initial_post_types() {
|
|||
'rest_base' => 'blocks',
|
||||
'rest_controller_class' => 'WP_REST_Blocks_Controller',
|
||||
'capability_type' => 'block',
|
||||
'capabilities' => array(
|
||||
'capabilities' => array(
|
||||
// You need to be able to edit posts, in order to read blocks in their raw form.
|
||||
'read' => 'edit_posts',
|
||||
// You need to be able to publish posts, in order to create blocks.
|
||||
|
|
|
@ -93,7 +93,7 @@ class WP_REST_Block_Renderer_Controller extends WP_REST_Controller {
|
|||
if ( ! $post || ! current_user_can( 'edit_post', $post->ID ) ) {
|
||||
return new WP_Error(
|
||||
'block_cannot_read',
|
||||
__( 'Sorry, you are not allowed to read blocks of this post' ),
|
||||
__( 'Sorry, you are not allowed to read blocks of this post.' ),
|
||||
array(
|
||||
'status' => rest_authorization_required_code(),
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-43805';
|
||||
$wp_version = '5.0-alpha-43806';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue