From 180ae59c81baab959eb2923e4e36204a6e77bea1 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Thu, 1 Feb 2024 17:09:42 +0400 Subject: [PATCH] Block Library: Rename variation build methods (#58538) --- packages/block-library/src/navigation-link/index.php | 5 ++--- packages/block-library/src/post-terms/index.php | 4 ++-- phpcs.xml.dist | 2 -- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/block-library/src/navigation-link/index.php b/packages/block-library/src/navigation-link/index.php index 749bae7aec64e..9a1421a663fb7 100644 --- a/packages/block-library/src/navigation-link/index.php +++ b/packages/block-library/src/navigation-link/index.php @@ -375,12 +375,11 @@ function block_core_navigation_link_unregister_variation( $name ) { } /** - * Register the navigation link block. * Returns an array of variations for the navigation link block. * * @return array */ -function build_navigation_link_block_variations() { +function block_core_navigation_link_build_variations() { // This will only handle post types and taxonomies registered until this point (init on priority 9). // See action hooks below for other post types and taxonomies. // See https://github.com/WordPress/gutenberg/issues/53826 for details. @@ -429,7 +428,7 @@ function register_block_core_navigation_link() { __DIR__ . '/navigation-link', array( 'render_callback' => 'render_block_core_navigation_link', - 'variation_callback' => 'build_navigation_link_block_variations', + 'variation_callback' => 'block_core_navigation_link_build_variations', ) ); } diff --git a/packages/block-library/src/post-terms/index.php b/packages/block-library/src/post-terms/index.php index 44291038383d4..c919db9cda2e4 100644 --- a/packages/block-library/src/post-terms/index.php +++ b/packages/block-library/src/post-terms/index.php @@ -63,7 +63,7 @@ function render_block_core_post_terms( $attributes, $content, $block ) { * * @return array The available variations for the block. */ -function build_post_term_block_variations() { +function block_core_post_terms_build_variations() { $taxonomies = get_taxonomies( array( 'publicly_queryable' => true, @@ -116,7 +116,7 @@ function register_block_core_post_terms() { __DIR__ . '/post-terms', array( 'render_callback' => 'render_block_core_post_terms', - 'variation_callback' => 'build_post_term_block_variations', + 'variation_callback' => 'block_core_post_terms_build_variations', ) ); } diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 3c45d416470bd..882eaa06b15e0 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -122,8 +122,6 @@ - -