WordPress.org

Make WordPress Core

Changeset 50794


Ignore:
Timestamp:
04/28/2021 10:36:40 AM (5 months ago)
Author:
youknowriad
Message:

Block Editor: Update the bundled block patterns.

This updates the block patterns included by default on WordPress
to give them more personality and to make use of the design tools
that has been added to the editor.

Props onemaggie, melchoyce, kjellr, beafialho, gziolo.
Fixes #52846.

Location:
trunk/src/wp-includes
Files:
12 added
7 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-patterns.php

    r48845 r50794  
    2020    if ( $should_register_core_patterns ) {
    2121        $core_block_patterns = array(
     22            'media-text-nature',
     23            'two-images-gallery',
     24            'three-columns-media-text',
     25            'quote',
     26            'large-header-left',
     27            'large-header-text-button',
     28            'media-text-art',
     29            'text-two-columns-title',
     30            'three-columns-text',
     31            'text-two-columns-title-offset',
     32            'heading',
     33            'three-images-gallery',
    2234            'text-two-columns',
     35            'media-text-arquitecture',
    2336            'two-buttons',
    24             'two-images',
    25             'text-two-columns-with-images',
    26             'text-three-columns-buttons',
    27             'large-header',
    28             'large-header-button',
    29             'three-buttons',
    30             'heading-paragraph',
    31             'quote',
    3237        );
    3338
  • trunk/src/wp-includes/block-patterns/quote.php

    r48845 r50794  
    11<?php
    22/**
    3  * Quote block pattern.
     3 * Quote.
    44 *
    55 * @package WordPress
     
    77
    88return array(
    9     'title'         => __( 'Quote' ),
    10     'content'       => "<!-- wp:group -->\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\"><!-- wp:image {\"align\":\"center\",\"width\":164,\"height\":164,\"sizeSlug\":\"large\",\"className\":\"is-style-rounded\"} -->\n<div class=\"wp-block-image is-style-rounded\"><figure class=\"aligncenter size-large is-resized\"><img src=\"https://s.w.org/images/core/5.5/don-quixote-03.jpg\" alt=\"" . __( 'Pencil drawing of Don Quixote' ) . "\" width=\"164\" height=\"164\"/></figure></div>\n<!-- /wp:image -->\n\n<!-- wp:quote {\"align\":\"center\",\"className\":\"is-style-large\"} -->\n<blockquote class=\"wp-block-quote has-text-align-center is-style-large\"><p>" . __( '"Do you see over yonder, friend Sancho, thirty or forty hulking giants? I intend to do battle with them and slay them."' ) . '</p><cite>' . __( '— Don Quixote' ) . "</cite></blockquote>\n<!-- /wp:quote -->\n\n<!-- wp:separator {\"className\":\"is-style-dots\"} -->\n<hr class=\"wp-block-separator is-style-dots\"/>\n<!-- /wp:separator --></div></div>\n<!-- /wp:group -->",
    11     'viewportWidth' => 800,
    12     'categories'    => array( 'text' ),
    13     'description'   => _x( 'A quote and citation with an image above, and a separator at the bottom.', 'Block pattern description' ),
     9    'title'       => _x( 'Quote', 'Block pattern title' ),
     10    'categories'  => array( 'text' ),
     11    'blockTypes'  => array( 'core/quote' ),
     12    'content'     => '<!-- wp:group -->
     13    <div class="wp-block-group"><div class="wp-block-group__inner-container"><!-- wp:separator {"className":"is-style-default"} -->
     14    <hr class="wp-block-separator is-style-default"/>
     15    <!-- /wp:separator -->
     16   
     17    <!-- wp:image {"align":"center","id":null,"width":150,"height":150,"sizeSlug":"large","linkDestination":"none","className":"is-style-rounded"} -->
     18    <div class="wp-block-image is-style-rounded"><figure class="aligncenter size-large is-resized"><img src="https://s.w.org/images/core/5.8/portrait.jpg" alt="' . esc_attr__( 'A side profile of a woman in a russet-colored turtleneck and white bag. She looks up with her eyes closed.' ) . '" width="150" height="150"/></figure></div>
     19    <!-- /wp:image -->
     20   
     21    <!-- wp:quote {"align":"center","className":"is-style-large"} -->
     22    <blockquote class="wp-block-quote has-text-align-center is-style-large"><p>' . esc_html__( "\"Contributing makes me feel like I'm being useful to the planet.\"" ) . '</p><cite>' . wp_kses_post( __( '— Anna Wong, <em>Volunteer</em>' ) ) . '</cite></blockquote>
     23    <!-- /wp:quote -->
     24   
     25    <!-- wp:separator {"className":"is-style-default"} -->
     26    <hr class="wp-block-separator is-style-default"/>
     27    <!-- /wp:separator --></div></div>
     28    <!-- /wp:group -->',
     29    'description' => _x( 'Testimonial quote with portrait', 'Block pattern description' ),
    1430);
  • trunk/src/wp-includes/block-patterns/text-two-columns.php

    r48864 r50794  
    11<?php
    22/**
    3  * Two columns of Text block pattern.
     3 * Two columns of text.
    44 *
    55 * @package WordPress
     
    77
    88return array(
    9     'title'       => __( 'Two columns of text' ),
    10     'categories'  => array( 'columns' ),
    11     'content'     => "<!-- wp:group -->\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\"><!-- wp:heading {\"style\":{\"typography\":{\"fontSize\":38},\"color\":{\"text\":\"#ba0c49\"}}} -->\n<h2 class=\"has-text-color\" style=\"font-size:38px;color:#ba0c49\">" . __( 'Which treats of the character and pursuits of the famous gentleman Don Quixote of La Mancha' ) . "</h2>\n<!-- /wp:heading -->\n\n<!-- wp:columns -->\n<div class=\"wp-block-columns\"><!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:paragraph {\"style\":{\"typography\":{\"fontSize\":18}}} -->\n<p style=\"font-size:18px\">" . __( 'In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing. An olla of rather more beef than mutton, a salad on most nights, scraps on Saturdays, lentils on Fridays, and a pigeon or so extra on Sundays, made away with three-quarters of his income.' ) . "</p>\n<!-- /wp:paragraph --></div>\n<!-- /wp:column -->\n\n<!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:paragraph {\"style\":{\"typography\":{\"fontSize\":18}}} -->\n<p style=\"font-size:18px\">" . __( 'The rest of it went in a doublet of fine cloth and velvet breeches and shoes to match for holidays, while on week-days he made a brave figure in his best homespun. He had in his house a housekeeper past forty, a niece under twenty, and a lad for the field and market-place, who used to saddle the hack as well as handle the bill-hook. The age of this gentleman of ours was bordering on fifty; he was of a hardy habit, spare, gaunt-featured, a very early riser and a great sportsman.' ) . "</p>\n<!-- /wp:paragraph --></div>\n<!-- /wp:column --></div>\n<!-- /wp:columns --></div></div>\n<!-- /wp:group -->",
    12     'description' => _x( 'Two columns of text preceded by a long heading.', 'Block pattern description' ),
     9    'title'       => _x( 'Two columns of text', 'Block pattern title' ),
     10    'categories'  => array( 'columns', 'text' ),
     11    'content'     => '<!-- wp:columns {"align":"full"} -->
     12    <div class="wp-block-columns"><!-- wp:column -->
     13    <div class="wp-block-column"><!-- wp:spacer -->
     14    <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
     15    <!-- /wp:spacer -->
     16    <!-- wp:paragraph {"style":{"typography":{"fontSize":"21px"}, "color":{"text":"#000000"}}} -->
     17    <p class="has-text-color" style="font-size:21px;color:#000000;"><strong>' . esc_html__( 'We have worked with:' ) . '</strong></p>
     18    <!-- /wp:paragraph -->
     19   
     20    <!-- wp:paragraph {"style":{"typography":{"fontSize":"24px","lineHeight":"1.2"}}} -->
     21    <p style="font-size:24px;line-height:1.2"><a href="https://wordpress.org">' . wp_kses_post( __( 'EARTHFUND™<br>ARCHWEEKLY<br>FUTURE ROADS<br>BUILDING NY' ) ) . '</a></p>
     22    <!-- /wp:paragraph -->
     23   
     24    <!-- wp:spacer -->
     25    <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
     26    <!-- /wp:spacer --></div>
     27    <!-- /wp:column -->
     28   
     29    <!-- wp:column -->
     30    <div class="wp-block-column"><!-- wp:spacer {"height":160} -->
     31    <div style="height:160px" aria-hidden="true" class="wp-block-spacer"></div>
     32    <!-- /wp:spacer -->
     33   
     34    <!-- wp:paragraph {"style":{"typography":{"fontSize":"24px","lineHeight":"1.2"}}} -->
     35    <p style="font-size:24px;line-height:1.2"><a href="https://wordpress.org">' . wp_kses_post( __( 'DUBAI ROOFS<br>MAY WATSON STUDIO<br>Y.O.L<br>RUDIMENTAR' ) ) . '</a></p>
     36    <!-- /wp:paragraph -->
     37   
     38    <!-- wp:spacer -->
     39    <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
     40    <!-- /wp:spacer --></div>
     41    <!-- /wp:column --></div>
     42    <!-- /wp:columns -->',
     43    'description' => _x( 'Two columns of text', 'Block pattern description' ),
    1344);
  • trunk/src/wp-includes/block-patterns/two-buttons.php

    r48845 r50794  
    77
    88return array(
    9     'title'         => __( 'Two buttons' ),
    10     'content'       => "<!-- wp:buttons {\"align\":\"center\"} -->\n<div class=\"wp-block-buttons aligncenter\"><!-- wp:button {\"borderRadius\":2,\"style\":{\"color\":{\"background\":\"#ba0c49\",\"text\":\"#fffffa\"}}} -->\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-text-color has-background\" style=\"border-radius:2px;background-color:#ba0c49;color:#fffffa\">" . __( 'Download now' ) . "</a></div>\n<!-- /wp:button -->\n\n<!-- wp:button {\"borderRadius\":2,\"style\":{\"color\":{\"text\":\"#ba0c49\"}},\"className\":\"is-style-outline\"} -->\n<div class=\"wp-block-button is-style-outline\"><a class=\"wp-block-button__link has-text-color\" style=\"border-radius:2px;color:#ba0c49\">" . __( 'About Cervantes' ) . "</a></div>\n<!-- /wp:button --></div>\n<!-- /wp:buttons -->",
     9    'title'         => _x( 'Two buttons', 'Block pattern title' ),
     10    'content'       => '<!-- wp:buttons {"contentJustification":"center"} -->
     11    <div class="wp-block-buttons is-content-justification-center"><!-- wp:button {"borderRadius":0} -->
     12    <div class="wp-block-button"><a class="wp-block-button__link no-border-radius">' . esc_html__( 'Our Work' ) . '</a></div>
     13    <!-- /wp:button -->
     14   
     15    <!-- wp:button {"borderRadius":1,"className":"is-style-outline"} -->
     16    <div class="wp-block-button is-style-outline"><a class="wp-block-button__link" style="border-radius:1px">' . esc_html__( 'Where We Are' ) . '</a></div>
     17    <!-- /wp:button --></div>
     18    <!-- /wp:buttons -->',
    1119    'viewportWidth' => 500,
    1220    'categories'    => array( 'buttons' ),
Note: See TracChangeset for help on using the changeset viewer.