Make WordPress Core


Ignore:
Timestamp:
07/14/2021 08:01:21 PM (5 years ago)
Author:
desrosj
Message:

Bundled Themes: Revert the [51372] update to block patterns in bundled themes.

Upon further examination, this change was not great for backwards compatibility, resulting in block validation errors when running on older versions of WordPress.

While there are currently many console.info() notices caused by older format block syntax being updated to the current version included in WordPress 5.8, the blocks do not break.

Block patterns do not currently have a versioning mechanism, or a means to indicate which versions of WordPress are supported.

See #53617.

File:
1 edited

Legend:

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

    r51372 r51434  
    3333
    3434            <!-- wp:buttons -->
    35             <div class="wp-block-buttons"><!-- wp:button {"style":{"border":{"radius":0}},"className":"is-style-fill"} -->
     35            <div class="wp-block-buttons"><!-- wp:button {"borderRadius":0,"className":"is-style-fill"} -->
    3636            <div class="wp-block-button is-style-fill"><a class="wp-block-button__link no-border-radius">' . __( 'Our Services', 'twentyseventeen' ) . '</a></div>
    3737            <!-- /wp:button --></div>
     
    9696            <div class="wp-block-columns are-vertically-aligned-top"><!-- wp:column -->
    9797            <div class="wp-block-column"><!-- wp:group -->
    98             <div class="wp-block-group">
     98            <div class="wp-block-group"><div class="wp-block-group__inner-container">
    9999            <!-- wp:image {"align":"center","sizeSlug":"large","className":"is-style-default"} -->
    100100            <div class="wp-block-image is-style-default"><figure class="aligncenter size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/stripes.jpg" alt="' . __( 'Black Stripes', 'twentyseventeen' ) . '"/></figure></div>
     
    105105            <!-- wp:paragraph {"align":"left"} -->
    106106            <p class="has-text-align-left"><a href="#">' . __( 'See Case Study', 'twentyseventeen' ) . ' →</a></p>
    107             <!-- /wp:paragraph --></div>
     107            <!-- /wp:paragraph --></div></div>
    108108            <!-- /wp:group --></div>
    109109            <!-- /wp:column -->
    110110            <!-- wp:column -->
    111111            <div class="wp-block-column"><!-- wp:group -->
    112             <div class="wp-block-group">
     112            <div class="wp-block-group"><div class="wp-block-group__inner-container">
    113113            <!-- wp:image {"align":"center","sizeSlug":"large","className":"is-style-default"} -->
    114114            <div class="wp-block-image is-style-default"><figure class="aligncenter size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/white-border.jpg" alt="' . __( 'White border', 'twentyseventeen' ) . '"/></figure></div>
     
    119119            <!-- wp:paragraph {"align":"left"} -->
    120120            <p class="has-text-align-left"><a href="#">' . __( 'See Case Study', 'twentyseventeen' ) . ' →</a></p>
    121             <!-- /wp:paragraph --></div>
     121            <!-- /wp:paragraph --></div></div>
    122122            <!-- /wp:group --></div>
    123123            <!-- /wp:column -->
    124124            <!-- wp:column -->
    125125            <div class="wp-block-column"><!-- wp:group -->
    126             <div class="wp-block-group">
     126            <div class="wp-block-group"><div class="wp-block-group__inner-container">
    127127            <!-- wp:image {"align":"center","sizeSlug":"large","className":"is-style-default"} -->
    128128            <div class="wp-block-image is-style-default"><figure class="aligncenter size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/direct-light.jpg" alt="' . __( 'Direct Light', 'twentyseventeen' ) . '"/></figure></div>
     
    133133            <!-- wp:paragraph {"align":"left"} -->
    134134            <p class="has-text-align-left"><a href="#">' . __( 'See Case Study' ) . ' →</a></p>
    135             <!-- /wp:paragraph --></div>
     135            <!-- /wp:paragraph --></div></div>
    136136            <!-- /wp:group --></div>
    137137            <!-- /wp:column --></div>
     
    151151            <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
    152152            <!-- /wp:spacer -->
    153 
     153           
    154154            <!-- wp:heading {"level":1,"style":{"typography":{"fontSize":50}}} -->
    155155            <h1 style="font-size:50px">' . __( 'Our Services', 'twentyseventeen' ) . '</h1>
    156156            <!-- /wp:heading -->
    157 
     157           
    158158            <!-- wp:columns -->
    159159            <div class="wp-block-columns"><!-- wp:column -->
    160160            <div class="wp-block-column">
    161             <!-- wp:paragraph {"style":{"typography":{"fontSize":"21px", "lineHeight":"2.5"}}} -->
    162             <p style="font-size:21px;line-height:2.5"><a href="#">' . __( 'Branding', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Web Design', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Web Development', 'twentyseventeen' ) . ' →</a></p>
     161            <!-- wp:paragraph {"style":{"typography":{"fontSize":21, "lineHeight":"2.5"}}} -->
     162            <p style="font-size:21px"><a href="#">' . __( 'Branding', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Web Design', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Web Development', 'twentyseventeen' ) . ' →</a></p>
    163163            <!-- /wp:paragraph -->
    164164            </div>
    165165            <!-- /wp:column -->
    166 
     166           
    167167            <!-- wp:column -->
    168168            <div class="wp-block-column">
    169             <!-- wp:paragraph {"style":{"typography":{"fontSize":"21px", "lineHeight":"2.5"}}} -->
    170             <p style="font-size:21px;line-height:2.5"><a href="#">' . __( 'Content Strategy', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Marketing &amp; SEO', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Video Production', 'twentyseventeen' ) . ' →</a></p>
     169            <!-- wp:paragraph {"style":{"typography":{"fontSize":21, "lineHeight":"2.5"}}} -->
     170            <p style="font-size:21px"><a href="#">' . __( 'Content Strategy', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Marketing &amp; SEO', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Video Production', 'twentyseventeen' ) . ' →</a></p>
    171171            <!-- /wp:paragraph --></div>
    172172            <!-- /wp:column --></div>
    173173            <!-- /wp:columns -->
    174 
     174           
    175175            <!-- wp:spacer -->
    176176            <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
     
    188188            <p class="has-text-align-left has-white-color has-text-color" style="font-size:50px">' . __( 'We are proud to serve outstanding clients.', 'twentyseventeen' ) . '</p>
    189189            <!-- /wp:paragraph -->
    190 
     190           
    191191            <!-- wp:buttons -->
    192             <div class="wp-block-buttons"><!-- wp:button {"style":{"border":{"radius":0}},"backgroundColor":"black","textColor":"white","className":"is-style-fill"} -->
     192            <div class="wp-block-buttons"><!-- wp:button {"borderRadius":0,"backgroundColor":"black","textColor":"white","className":"is-style-fill"} -->
    193193            <div class="wp-block-button is-style-fill"><a class="wp-block-button__link has-white-color has-black-background-color has-text-color has-background no-border-radius">' . __( 'Contact us', 'twentyseventeen' ) . '</a></div>
    194194            <!-- /wp:button --></div>
Note: See TracChangeset for help on using the changeset viewer.