diff --git a/lib/class-wp-block.php b/lib/class-wp-block.php index a8ce8a035bd3f..de7a11c63be76 100644 --- a/lib/class-wp-block.php +++ b/lib/class-wp-block.php @@ -107,8 +107,8 @@ public function __construct( $block, $available_context = array(), $registry = n $this->available_context = $available_context; - if ( ! empty( $this->block_type->requiresContext ) ) { - foreach ( $this->block_type->requiresContext as $context_name ) { + if ( ! empty( $this->block_type->usesContext ) ) { + foreach ( $this->block_type->usesContext as $context_name ) { if ( array_key_exists( $context_name, $this->available_context ) ) { $this->context[ $context_name ] = $this->available_context[ $context_name ]; } diff --git a/lib/compat.php b/lib/compat.php index 31129bcbf32af..2282c78427366 100644 --- a/lib/compat.php +++ b/lib/compat.php @@ -169,7 +169,7 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { $property_mappings = array( 'title' => 'title', 'category' => 'category', - 'context' => 'requiresContext', + 'context' => 'usesContext', 'providesContext' => 'providesContext', 'parent' => 'parent', 'icon' => 'icon',