From f9de1988e1eb3a14285a636a50cfb3006a7dc4ee Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Wed, 29 May 2024 13:01:55 +0200 Subject: [PATCH] Singular --- src/wp-includes/blocks.php | 2 +- tests/phpunit/tests/blocks/register.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index ed66f57b45725..42de8ca85f2ee 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -480,7 +480,7 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { * * @return string Returns the list of block variations. */ - $metadata['variations_callback'] = static function () use ( $variations_path ) { + $metadata['variation_callback'] = static function () use ( $variations_path ) { $variations = require $variations_path; return $variations; }; diff --git a/tests/phpunit/tests/blocks/register.php b/tests/phpunit/tests/blocks/register.php index 550333cf2dc8e..2b434475cd954 100644 --- a/tests/phpunit/tests/blocks/register.php +++ b/tests/phpunit/tests/blocks/register.php @@ -1103,7 +1103,7 @@ public function test_block_registers_with_metadata_fixture() { // @ticket 53148 $this->assertIsCallable( $result->render_callback ); // @ticket 61280 - $this->assertIsCallable( $result->variations_callback ); + $this->assertIsCallable( $result->variation_callback ); } /**