Skip to content

Commit

Permalink
Block Library: Don't use methods with the 'gutenberg_' prefix (#47649)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored Feb 1, 2023
1 parent 76f8b5f commit 605217a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/calendar/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function render_block_core_calendar( $attributes ) {
$color_block_styles['background'] = $preset_background_color ? $preset_background_color : $custom_background_color;

// Generate color styles and classes.
$styles = gutenberg_style_engine_get_styles( array( 'color' => $color_block_styles ), array( 'convert_vars_to_classnames' => true ) );
$styles = wp_style_engine_get_styles( array( 'color' => $color_block_styles ), array( 'convert_vars_to_classnames' => true ) );
$inline_styles = empty( $styles['css'] ) ? '' : sprintf( ' style="%s"', esc_attr( $styles['css'] ) );
$classnames = empty( $styles['classnames'] ) ? '' : ' ' . esc_attr( $styles['classnames'] );
if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/gallery/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function block_core_gallery_render( $attributes, $content ) {
),
);

gutenberg_style_engine_get_stylesheet_from_css_rules(
wp_style_engine_get_stylesheet_from_css_rules(
$gallery_styles,
array(
'context' => 'block-supports',
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/navigation-link/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ function register_block_core_navigation_link() {
* @param array $settings Default editor settings.
* @return array Filtered editor settings.
*/
function gutenberg_enable_animation_for_navigation_link_inspector( $settings ) {
function block_core_navigation_link_enable_inspector_animation( $settings ) {
$current_animation_settings = _wp_array_get(
$settings,
array( '__experimentalBlockInspectorAnimation' ),
Expand All @@ -402,4 +402,4 @@ function gutenberg_enable_animation_for_navigation_link_inspector( $settings ) {
return $settings;
}

add_filter( 'block_editor_settings_all', 'gutenberg_enable_animation_for_navigation_link_inspector' );
add_filter( 'block_editor_settings_all', 'block_core_navigation_link_enable_inspector_animation' );
4 changes: 2 additions & 2 deletions packages/block-library/src/navigation-submenu/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ function register_block_core_navigation_submenu() {
* @param array $settings Default editor settings.
* @return array Filtered editor settings.
*/
function gutenberg_enable_animation_for_navigation_submenu_inspector( $settings ) {
function block_core_navigation_submenu_enable_inspector_animation( $settings ) {
$current_animation_settings = _wp_array_get(
$settings,
array( '__experimentalBlockInspectorAnimation' ),
Expand All @@ -320,4 +320,4 @@ function gutenberg_enable_animation_for_navigation_submenu_inspector( $settings
return $settings;
}

add_filter( 'block_editor_settings_all', 'gutenberg_enable_animation_for_navigation_submenu_inspector' );
add_filter( 'block_editor_settings_all', 'block_core_navigation_submenu_enable_inspector_animation' );
4 changes: 2 additions & 2 deletions packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ function block_core_navigation_typographic_presets_backcompatibility( $parsed_bl
* @param array $settings Default editor settings.
* @return array Filtered editor settings.
*/
function gutenberg_enable_animation_for_navigation_inspector( $settings ) {
function block_core_navigation_enable_inspector_animation( $settings ) {
$current_animation_settings = _wp_array_get(
$settings,
array( '__experimentalBlockInspectorAnimation' ),
Expand All @@ -905,4 +905,4 @@ function gutenberg_enable_animation_for_navigation_inspector( $settings ) {
return $settings;
}

add_filter( 'block_editor_settings_all', 'gutenberg_enable_animation_for_navigation_inspector' );
add_filter( 'block_editor_settings_all', 'block_core_navigation_enable_inspector_animation' );

0 comments on commit 605217a

Please sign in to comment.