Make WordPress Core


Ignore:
Timestamp:
07/07/2021 05:29:48 PM (3 years ago)
Author:
desrosj
Message:

Bundled Themes: Update block patterns to match the latest versions of core/* blocks.

When using the post editor with a bundled theme active, there will be a number of console.info notices printed to the browser’s console.

These notices are caused by block patterns containing outdated and deprecated versions of core/* blocks. Before rendering the blocks, they need to be updated, and this process outputs information to the console.

Props ntsekouras.
Fixes #53617.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/inc/block-patterns.php

    r51323 r51372  
    3838                array(
    3939                    '<!-- wp:group {"align":"wide","style":{"color":{"background":"#ffffff"}}} -->',
    40                     '<div class="wp-block-group alignwide has-background" style="background-color:#ffffff"><div class="wp-block-group__inner-container"><!-- wp:group -->',
    41                     '<div class="wp-block-group"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center"} -->',
     40                    '<div class="wp-block-group alignwide has-background" style="background-color:#ffffff"><!-- wp:group -->',
     41                    '<div class="wp-block-group"><!-- wp:heading {"align":"center"} -->',
    4242                    '<h2 class="has-text-align-center">' . esc_html__( 'Support the Museum and Get Exclusive Offers', 'twentytwenty' ) . '</h2>',
    4343                    '<!-- /wp:heading -->',
     
    4747                    '<!-- wp:button {"align":"center","className":"is-style-outline"} -->',
    4848                    '<div class="wp-block-button aligncenter is-style-outline"><a class="wp-block-button__link" href="#">' . esc_html__( 'Become a Member', 'twentytwenty' ) . '</a></div>',
    49                     '<!-- /wp:button --></div></div>',
    50                     '<!-- /wp:group --></div></div>',
     49                    '<!-- /wp:button --></div>',
     50                    '<!-- /wp:group --></div>',
    5151                    '<!-- /wp:group -->',
    5252                )
     
    6868                    '<div class="wp-block-columns alignwide"><!-- wp:column -->',
    6969                    '<div class="wp-block-column"><!-- wp:group {"style":{"color":{"background":"#ffffff"}}} -->',
    70                     '<div class="wp-block-group has-background" style="background-color:#ffffff"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center"} -->',
     70                    '<div class="wp-block-group has-background" style="background-color:#ffffff"><!-- wp:heading {"align":"center"} -->',
    7171                    '<h2 class="has-text-align-center">' . esc_html__( 'The Museum', 'twentytwenty' ) . '</h2>',
    7272                    '<!-- /wp:heading -->',
     
    7878                    '<div class="wp-block-button is-style-outline"><a class="wp-block-button__link">' . esc_html__( 'Read More', 'twentytwenty' ) . '</a></div>',
    7979                    '<!-- /wp:button --></div>',
    80                     '<!-- /wp:buttons --></div></div>',
     80                    '<!-- /wp:buttons --></div>',
    8181                    '<!-- /wp:group --></div>',
    8282                    '<!-- /wp:column -->',
    8383                    '<!-- wp:column -->',
    8484                    '<div class="wp-block-column"><!-- wp:group {"style":{"color":{"background":"#ffffff"}}} -->',
    85                     '<div class="wp-block-group has-background" style="background-color:#ffffff"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center"} -->',
     85                    '<div class="wp-block-group has-background" style="background-color:#ffffff"><!-- wp:heading {"align":"center"} -->',
    8686                    '<h2 class="has-text-align-center">' . esc_html__( 'The Store', 'twentytwenty' ) . '</h2>',
    8787                    '<!-- /wp:heading -->',
     
    9393                    '<div class="wp-block-button is-style-outline"><a class="wp-block-button__link">' . esc_html__( 'Shop Now', 'twentytwenty' ) . '</a></div>',
    9494                    '<!-- /wp:button --></div>',
    95                     '<!-- /wp:buttons --></div></div>',
     95                    '<!-- /wp:buttons --></div>',
    9696                    '<!-- /wp:group --></div>',
    9797                    '<!-- /wp:column --></div>',
     
    113113                array(
    114114                    '<!-- wp:group {"align":"wide","backgroundColor":"primary"} -->',
    115                     '<div class="wp-block-group alignwide has-primary-background-color has-background"><div class="wp-block-group__inner-container"><!-- wp:columns -->',
     115                    '<div class="wp-block-group alignwide has-primary-background-color has-background"><!-- wp:columns -->',
    116116                    '<div class="wp-block-columns"><!-- wp:column -->',
    117117                    '<div class="wp-block-column"><!-- wp:paragraph {"align":"center","textColor":"background","fontSize":"large"} -->',
     
    129129                    '<!-- /wp:paragraph --></div>',
    130130                    '<!-- /wp:column --></div>',
    131                     '<!-- /wp:columns --></div></div>',
     131                    '<!-- /wp:columns --></div>',
    132132                    '<!-- /wp:group -->',
    133133                )
Note: See TracChangeset for help on using the changeset viewer.