Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Miguel Fonseca <[email protected]>
  • Loading branch information
gziolo and mcsf committed Jun 19, 2020
1 parent 8c831ef commit 18002bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/class-wp-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ public function __construct( $block, $available_context = array(), $registry = n
if ( ! empty( $this->block_type->context ) ) {
$message = sprintf(
/* translators: 1: Block name. */
__( 'Block type "context" option is deprecated. Please use "uses_context" instead in "%s" block.', 'gutenberg' ),
__( 'The "context" parameter provided in block type "%s" is deprecated. Please use "uses_context" instead.', 'gutenberg' ),
$this->name
);
_doing_it_wrong( __CLASS__, $message, '8.4.0' );
_doing_it_wrong( __CLASS__, $message, '8.6.0' );
$this->block_type->uses_context = $this->block_type->context;
}
if ( ! empty( $this->block_type->providesContext ) ) {
$message = sprintf(
/* translators: 1: Block name. */
__( 'Block type "providesContext" option is deprecated. Please use "provides_context" instead in "%s" block.', 'gutenberg' ),
__( 'The "providesContext" parameter provided in block type "%s" is deprecated. Please use "provides_context".', 'gutenberg' ),
$this->name
);
_doing_it_wrong( __CLASS__, $message, '8.4.0' );
_doing_it_wrong( __CLASS__, $message, '8.6.0' );
$this->block_type->provides_context = $this->block_type->providesContext;
}

Expand Down

0 comments on commit 18002bb

Please sign in to comment.