Make WordPress Core


Ignore:
Timestamp:
02/08/2024 07:30:15 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty-Two: Prefix the pages block pattern category name.

If a plugin also registers the category name pages 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 poena, swissspidy, shailu25.
Fixes #59839.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-links.php

    r52430 r57569  
    55return array(
    66    'title'      => __( 'About page links', 'twentytwentytwo' ),
    7     'categories' => array( 'pages', 'buttons' ),
     7    'categories' => array( 'twentytwentytwo_pages', 'buttons' ),
    88    'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"10rem","bottom":"10rem"}}},"layout":{"inherit":false,"contentSize":"400px"}} -->
    99                    <div class="wp-block-group alignfull" style="padding-top:10rem;padding-bottom:10rem;"><!-- wp:image {"align":"center","width":100,"height":100,"sizeSlug":"full","linkDestination":"none","className":"is-style-rounded"} -->
Note: See TracChangeset for help on using the changeset viewer.