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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57555 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2024-02-07 19:43:09 +00:00
parent b88ad1b1b3
commit 50af5dbed1
9 changed files with 9 additions and 9 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