Make WordPress Core


Ignore:
Timestamp:
02/08/2024 07:30:15 PM (15 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-about-media-left.php

    r52375 r57569  
    55return array(
    66    'title'      => __( 'About page with media on the left', 'twentytwentytwo' ),
    7     'categories' => array( 'pages' ),
     7    'categories' => array( 'twentytwentytwo_pages' ),
    88    'content'    => '<!-- wp:media-text {"align":"full","mediaType":"image","imageFill":true,"focalPoint":{"x":"0.63","y":"0.16"},"backgroundColor":"foreground","className":"alignfull is-image-fill has-background-color has-text-color has-background has-link-color"} -->
    99                    <div class="wp-block-media-text alignfull is-stacked-on-mobile is-image-fill has-background-color has-text-color has-background has-link-color has-foreground-background-color has-background"><figure class="wp-block-media-text__media" style="background-image:url(' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-salmon.jpg);background-position:63% 16%"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-salmon.jpg" alt="' . esc_attr__( 'Image of a bird on a branch', 'twentytwentytwo' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:spacer {"height":32} -->
Note: See TracChangeset for help on using the changeset viewer.