From 1912fe4d5626514d648dba39d02c96360b64ebf4 Mon Sep 17 00:00:00 2001 From: Noah Allen Date: Tue, 16 Jun 2020 15:09:33 -0700 Subject: [PATCH] Revert to context --- lib/class-wp-block.php | 4 ++-- lib/compat.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/class-wp-block.php b/lib/class-wp-block.php index de7a11c63be761..ccc3f5f9423077 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->usesContext ) ) { - foreach ( $this->block_type->usesContext as $context_name ) { + if ( ! empty( $this->block_type->context ) ) { + foreach ( $this->block_type->context 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 2282c784273662..603423c9e38a48 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' => 'usesContext', + 'context' => 'context', 'providesContext' => 'providesContext', 'parent' => 'parent', 'icon' => 'icon',