Skip to content

Commit

Permalink
Rename function for clarity and to match similar functions
Browse files Browse the repository at this point in the history
Example: block_core_navigation_typographic_presets_backcompatibility()
  • Loading branch information
ocean90 committed Dec 6, 2021
1 parent 1420af4 commit f30bd27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/gallery/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @param array $parsed_block The block being rendered.
* @return array The migrated block object.
*/
function render_block_core_gallery_data( $parsed_block ) {
function block_core_gallery_data_id_backcompatibility( $parsed_block ) {
if ( 'core/gallery' === $parsed_block['blockName'] ) {
foreach ( $parsed_block['innerBlocks'] as $key => $inner_block ) {
if ( 'core/image' === $inner_block['blockName'] ) {
Expand All @@ -30,7 +30,7 @@ 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.
Expand Down

0 comments on commit f30bd27

Please sign in to comment.