Twenty Twenty-Four: Prefix the block pattern category name.

If a plugin also registers the category name `page` in an `init` hook that runs after the theme's, it can override the label and description unintentionally.

With a prefix, extenders can still override it, but it would be intentional.

Props shailu25, poena, acosmin, harshgajipara, swissspidy.
See #59839.
Built from https://develop.svn.wordpress.org/trunk@57555


git-svn-id: http://core.svn.wordpress.org/trunk@57056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-02-07 19:45:12 +00:00
parent f3dd3c787c
commit 15ab0f672f
10 changed files with 10 additions and 10 deletions

View File

@ -194,7 +194,7 @@ if ( ! function_exists( 'twentytwentyfour_pattern_categories' ) ) :
function twentytwentyfour_pattern_categories() {
register_block_pattern_category(
'page',
'twentytwentyfour_page',
array(
'label' => _x( 'Pages', 'Block pattern category', 'twentytwentyfour' ),
'description' => __( 'A collection of full page layouts.', 'twentytwentyfour' ),

View File

@ -2,7 +2,7 @@
/**
* Title: About
* Slug: twentytwentyfour/page-about-business
* Categories: page
* Categories: twentytwentyfour_page
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template

View File

@ -2,7 +2,7 @@
/**
* Title: Blogging home
* Slug: twentytwentyfour/page-home-blogging
* Categories: page
* Categories: twentytwentyfour_page
* Keywords: page, starter
* Post Types: page, wp_template
* Viewport width: 1400

View File

@ -2,7 +2,7 @@
/**
* Title: Business home
* Slug: twentytwentyfour/page-home-business
* Categories: page
* Categories: twentytwentyfour_page
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template

View File

@ -2,7 +2,7 @@
/**
* Title: Portfolio home image gallery
* Slug: twentytwentyfour/page-home-gallery
* Categories: page
* Categories: twentytwentyfour_page
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template

View File

@ -2,7 +2,7 @@
/**
* Title: Portfolio home with post featured images
* Slug: twentytwentyfour/page-home-portfolio
* Categories: page
* Categories: twentytwentyfour_page
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template

View File

@ -2,7 +2,7 @@
/**
* Title: Newsletter landing
* Slug: twentytwentyfour/page-newsletter-landing
* Categories: call-to-action, page, featured
* Categories: call-to-action, twentytwentyfour_page, featured
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template

View File

@ -2,7 +2,7 @@
/**
* Title: Portfolio project overview
* Slug: twentytwentyfour/page-portfolio-overview
* Categories: page, featured
* Categories: twentytwentyfour_page, featured
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template

View File

@ -2,7 +2,7 @@
/**
* Title: RSVP landing
* Slug: twentytwentyfour/page-rsvp-landing
* Categories: page
* Categories: twentytwentyfour_page
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-alpha-57554';
$wp_version = '6.5-alpha-57555';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.