diff --git a/packages/block-library/src/gallery/index.php b/packages/block-library/src/gallery/index.php index a9765c344323ab..a159de4df173e8 100644 --- a/packages/block-library/src/gallery/index.php +++ b/packages/block-library/src/gallery/index.php @@ -1,6 +1,6 @@ $inner_block ) { if ( 'core/image' === $inner_block['blockName'] ) { @@ -31,14 +30,14 @@ function render_block_core_gallery_data( $parsed_block ) { return $parsed_block; } -add_filter( 'render_block_data', 'render_block_core_gallery_data' ); +add_filter( 'render_block_data', 'block_core_gallery_data_id_backcompatibility' ); /** * Registers the `core/gallery` block on server. * This render callback needs to be here * so that the gallery styles are loaded in block-based themes. */ -function gutenberg_register_block_core_gallery() { +function register_block_core_gallery() { register_block_type_from_metadata( __DIR__ . '/gallery', array( @@ -49,4 +48,4 @@ function gutenberg_register_block_core_gallery() { ); } -add_action( 'init', 'gutenberg_register_block_core_gallery', 20 ); +add_action( 'init', 'register_block_core_gallery', 20 ); diff --git a/packages/block-library/src/image/index.php b/packages/block-library/src/image/index.php index c3f22c04571553..f8f7066a970d88 100644 --- a/packages/block-library/src/image/index.php +++ b/packages/block-library/src/image/index.php @@ -11,7 +11,7 @@ * * @param array $attributes The block attributes. * @param array $content The block content. - * @return string Returns the block content with the data-id attribute added. + * @return string Returns the block content with the data-id attribute added. */ function render_block_core_image( $attributes, $content ) { if ( isset( $attributes['data-id'] ) ) {