Make WordPress Core


Ignore:
Timestamp:
02/08/2024 07:30:15 PM (4 months 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-sidebar-blog-posts.php

    r52555 r57569  
    55return array(
    66    'title'      => __( 'Blog posts with left sidebar', 'twentytwentytwo' ),
    7     'categories' => array( 'pages' ),
     7    'categories' => array( 'twentytwentytwo_pages' ),
    88    'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--small, 1.25rem)","bottom":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"inherit":true}} -->
    99                    <div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--small, 1.25rem)"><!-- wp:columns {"align":"wide","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"},"blockGap":"5%"},"elements":{"link":{"color":{"text":"var:preset|color|primary"}}}},"textColor":"primary"} -->
Note: See TracChangeset for help on using the changeset viewer.