Skip to content

Commit

Permalink
Replace the gutenberg_ prefix with wp_ in image block
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Sep 21, 2023
1 parent 8f3f218 commit bf5d2d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/block-library/src/image/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ function block_core_image_get_lightbox_settings( $block ) {
}

if ( ! isset( $lightbox_settings ) ) {
$lightbox_settings = gutenberg_get_global_settings( array( 'lightbox' ), array( 'block_name' => 'core/image' ) );
$lightbox_settings = wp_get_global_settings( array( 'lightbox' ), array( 'block_name' => 'core/image' ) );

// If not present in global settings, check the top-level global settings.
//
// NOTE: If no block-level settings are found, the previous call to
// `gutenberg_get_global_settings` will return the whole `theme.json`
// `wp_get_global_settings` will return the whole `theme.json`
// structure in which case we can check if the "lightbox" key is present at
// the top-level of the global settings and use its value.
if ( isset( $lightbox_settings['lightbox'] ) ) {
$lightbox_settings = gutenberg_get_global_settings( array( 'lightbox' ) );
$lightbox_settings = wp_get_global_settings( array( 'lightbox' ) );
}
}

Expand Down
1 change: 1 addition & 0 deletions tools/webpack/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const prefixFunctions = [
'wp_enqueue_block_support_styles',
'wp_get_typography_font_size_value',
'wp_style_engine_get_styles',
'wp_get_global_settings',
];

/**
Expand Down

0 comments on commit bf5d2d4

Please sign in to comment.