From b7b928d9d66de6cbeb151d03523135cc9173311b Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Wed, 29 May 2024 12:39:08 +0200 Subject: [PATCH] Use return value --- src/wp-includes/blocks.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index c9b79c6707302..35cdd489bbe04 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -473,18 +473,7 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { ) ); if ( $variations_path ) { - /** - * Generates the list of block variations. - * - * @since 6.6.0 - * - * @return string Returns the list of block variations. - */ - $metadata['variations_callback'] = static function () use ( $variations_path ) { - ob_start(); - require $variations_path; - return ob_get_clean(); - }; + $metadata['variations_callback'] = require $variations_path; } }