Skip to content

Commit

Permalink
Use return value
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed May 29, 2024
1 parent 12cd1e3 commit b7b928d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit b7b928d

Please sign in to comment.