Skip to content

Commit

Permalink
Use return value correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed May 29, 2024
1 parent 7ee80f0 commit bd976b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,8 @@ 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 ) {
ob_start();
require $variations_path;
return ob_get_clean();
$variations = require $variations_path;
return $variations;
};
}
}
Expand Down

0 comments on commit bd976b9

Please sign in to comment.