Changeset 51657 for trunk/tests/phpunit/tests/blocks/context.php
- Timestamp:
- 08/26/2021 12:57:08 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/context.php
r51568 r51657 116 116 'gutenberg/contextWithoutDefault', 117 117 ), 118 'render_callback' => function( $attributes, $content, $block ) use ( &$provided_context ) {118 'render_callback' => static function( $attributes, $content, $block ) use ( &$provided_context ) { 119 119 $provided_context[] = $block->context; 120 120 … … 156 156 array( 157 157 'uses_context' => array( 'postId', 'postType' ), 158 'render_callback' => function( $attributes, $content, $block ) use ( &$provided_context ) {158 'render_callback' => static function( $attributes, $content, $block ) use ( &$provided_context ) { 159 159 $provided_context[] = $block->context; 160 160 … … 189 189 array( 190 190 'uses_context' => array( 'example' ), 191 'render_callback' => function( $attributes, $content, $block ) use ( &$provided_context ) {191 'render_callback' => static function( $attributes, $content, $block ) use ( &$provided_context ) { 192 192 $provided_context[] = $block->context; 193 193 … … 197 197 ); 198 198 199 $filter_block_context = function( $context ) {199 $filter_block_context = static function( $context ) { 200 200 $context['example'] = 'ok'; 201 201 return $context;
Note: See TracChangeset
for help on using the changeset viewer.