Bundled Themes: Introduce block patterns for Twenty Eleven.

Props beafialho, kjellr, melchoyce, audrasjb.
Fixes #51106.


Built from https://develop.svn.wordpress.org/trunk@51103


git-svn-id: http://core.svn.wordpress.org/trunk@50712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryelle 2021-06-08 18:03:59 +00:00
parent 62be41c079
commit ecc13d3de2
7 changed files with 170 additions and 3 deletions

View File

@ -137,6 +137,9 @@ if ( ! function_exists( 'twentyeleven_setup' ) ) :
// Grab Twenty Eleven's Ephemera widget.
require get_template_directory() . '/inc/widgets.php';
// Load block patterns.
require get_template_directory() . '/inc/block-patterns.php';
// Add default posts and comments RSS feed links to <head>.
add_theme_support( 'automatic-feed-links' );

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

View File

@ -0,0 +1,160 @@
<?php
/**
* Block Patterns
*
* @link https://developer.wordpress.org/reference/functions/register_block_pattern/
* @link https://developer.wordpress.org/reference/functions/register_block_pattern_category/
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
/**
* Register Block Pattern Category.
*/
if ( function_exists( 'register_block_pattern_category' ) ) {
register_block_pattern_category(
'twentyeleven',
array( 'label' => esc_html__( 'Twenty Eleven', 'twentyeleven' ) )
);
}
/**
* Register Block Patterns.
*/
if ( function_exists( 'register_block_pattern' ) ) {
// Heading, and two columns featuring an image and dropcap.
register_block_pattern(
'twentyeleven/large-text',
array(
'title' => esc_html__( 'Image and Text Columns', 'twentyeleven' ),
'categories' => array( 'twentyeleven' ),
'viewportWidth' => 1000,
'content' => '<!-- wp:heading {"style":{"typography":{"fontSize":45}}} -->
<h2 style="font-size:45px">' . esc_html__( 'A Bowl Full of&nbsp;Flowers', 'twentyeleven' ) . '</h2>
<!-- /wp:heading -->
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="' . get_stylesheet_directory_uri() . '/images/patterns/pattern-flower.jpg" alt="' . esc_attr( 'A yellow flower against a dark background.', 'twentyeleven' ) . '" /></figure>
<!-- /wp:image -->
<!-- wp:paragraph {"dropCap":true} -->
<p class="has-drop-cap">' . esc_html__( 'This is just an example post to showcase the featured post section on the showcase page. Who doesn&#8217;t like flowers? I like flowers. Nullam hendrerit enim nunc. Vestibulum eget nulla magna! Fusce lobortis neque eu neque egestas tincidunt. Duis elementum consequat lorem, in eleifend justo mollis at. Nam quis adipiscing magna. Duis adipiscing est ac nibh feugiat rhoncus. Donec non lorem felis, eget commodo purus.', 'twentyeleven' ) . '</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column {"width":"40%"} -->
<div class="wp-block-column" style="flex-basis:40%"><!-- wp:paragraph -->
<p>' . esc_html__( 'Aenean euismod elementum nisi quis eleifend. Lectus quam id leo in vitae turpis. Etiam tempor orci eu lobortis elementum nibh. At quis risus sed vulputate odio ut enim blandit. Id ornare arcu odio ut. Blandit massa enim nec dui nunc mattis enim ut tellus. Fermentum iaculis eu non diam phasellus vestibulum. Magna fermentum iaculis eu non diam phasellus vestibulum lorem. Ullamcorper velit sed ullamcorper morbi tincidunt ornare massa. Cursus sit amet dictum sit amet justo donec. At tellus at urna condimentum mattis. Et ligula ullamcorper malesuada proin libero nunc. Ipsum dolor sit amet consectetur adipiscing elit duis tristique sollicitudin. Pellentesque diam volutpat commodo sed egestas. Mi proin sed libero enim sed faucibus.', 'twentyeleven' ) . '</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->',
)
);
// Two columns with a quote.
register_block_pattern(
'twentyeleven/inline-quote',
array(
'title' => esc_html__( 'Inline Quote', 'twentyeleven' ),
'categories' => array( 'twentyeleven' ),
'viewportWidth' => 1000,
'content' => '<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p>' . esc_html__( 'This is just an example post to showcase the featured post section on the showcase page. Who doesn&#8217;t like flowers? I like flowers. Nullam hendrerit enim nunc. Vestibulum eget nulla magna! Fusce lobortis neque eu neque egestas tincidunt. Duis elementum consequat lorem, in eleifend justo mollis at. Nam quis adipiscing magna. Duis adipiscing est ac nibh feugiat rhoncus. Donec non lorem felis, eget commodo purus.', 'twentyeleven' ) . '</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:separator {"color":"black","className":"is-style-wide"} -->
<hr class="wp-block-separator has-text-color has-background has-black-background-color has-black-color is-style-wide"/>
<!-- /wp:separator -->
<!-- wp:quote {"className":"is-style-large"} -->
<blockquote class="wp-block-quote is-style-large"><p><strong><em>' . esc_html__( '"There are always flowers for those who want to see them."', 'twentyeleven' ) . '</em></strong></p><cite>' . esc_html__( 'Henri Matisse', 'twentyeleven' ) . '</cite></blockquote>
<!-- /wp:quote --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->',
)
);
// Cover block with a call-to-action to follow the blog.
register_block_pattern(
'twentyeleven/follow',
array(
'title' => esc_html__( 'Follow Blog', 'twentyeleven' ),
'categories' => array( 'twentyeleven' ),
'viewportWidth' => 1000,
'content' => '<!-- wp:cover {"overlayColor":"black","minHeight":900,"minHeightUnit":"px","align":"center"} -->
<div class="wp-block-cover aligncenter has-black-background-color has-background-dim" style="min-height:900px"><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":85}}} -->
<p class="has-text-align-center" style="font-size:85px">' . esc_html__( 'Get In Touch', 'twentyeleven' ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":25}}} -->
<p class="has-text-align-center" style="font-size:25px">' . esc_html__( 'Click to subscribe to this blog and receive notifications of new posts by email.', 'twentyeleven' ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":25}}} -->
<p class="has-text-align-center" style="font-size:25px">' . esc_html__( 'Join 1,729 other followers', 'twentyeleven' ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:buttons {"contentJustification":"center"} -->
<div class="wp-block-buttons is-content-justification-center"><!-- wp:button {"borderRadius":0,"backgroundColor":"white","textColor":"black"} -->
<div class="wp-block-button"><a class="wp-block-button__link has-black-color has-white-background-color has-text-color has-background no-border-radius">' . esc_html__( 'Follow', 'twentyeleven' ) . '</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div></div>
<!-- /wp:cover -->',
)
);
// Heading, and two columns with an image and text.
register_block_pattern(
'twentyeleven/about',
array(
'title' => esc_html__( 'About Me', 'twentyeleven' ),
'categories' => array( 'twentyeleven' ),
'viewportWidth' => 1000,
'content' => '<!-- wp:heading {"style":{"typography":{"fontSize":50}}} -->
<h2 style="font-size:50px">' . esc_html__( 'About Me', 'twentyeleven' ) . '</h2>
<!-- /wp:heading --><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="' . get_stylesheet_directory_uri() . '/images/patterns/pattern-woman.jpg" alt="' . esc_attr( 'Photo of a woman.', 'twentyeleven' ) . '" /></figure>
<!-- /wp:image --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p><strong>' . esc_html__( 'This is a paragraph to tell about yourself.', 'twentyeleven' ) . '</strong> ' . esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nulla porttitor massa id neque aliquam vestibulum morbi blandit cursus. Feugiat nisl pretium fusce id velit. Cursus risus at ultrices mi. Pellentesque nec nam aliquam sem et tortor consequat. Est lorem ipsum dolor sit amet consectetur adipiscing. Nisi porta lorem mollis aliquam. Aenean euismod elementum nisi quis eleifend quam adipiscing vitae proin. Malesuada bibendum arcu vitae elementum curabitur vitae nunc sed. Quis hendrerit dolor magna eget est lorem ipsum dolor sit. Viverra vitae congue eu consequat.', 'twentyeleven' ) . '</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->',
)
);
// Two columns with headings and lists.
register_block_pattern(
'twentyeleven/lists',
array(
'title' => esc_html__( 'Two Columns of Lists', 'twentyeleven' ),
'categories' => array( 'twentyeleven' ),
'viewportWidth' => 1000,
'content' => '<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph {"style":{"typography":{"fontSize":25}}} -->
<p style="font-size:25px"><strong>' . esc_html__( 'Books', 'twentyeleven' ) . '</strong></p>
<!-- /wp:paragraph -->
<!-- wp:list -->
<ul><li>' . esc_html__( 'Aenean euismod elementum, 1999', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Nisi quis eleifend, 1999', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Lectus quam id leo in vitae turpis, 2006', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Etiam tempor orci eu lobortis, 2009', 'twentyeleven' ) . '</li><li>' . esc_html__( 'At quis risus sed vulputate odio ut enim, 2015', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Blandit. Id ornare arcu odio ut, 2018', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Aenean euismod elementum II, 2020', 'twentyeleven' ) . '</li></ul>
<!-- /wp:list --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph {"style":{"typography":{"fontSize":25}}} -->
<p style="font-size:25px"><strong>' . esc_html__( 'Talks', 'twentyeleven' ) . '</strong></p>
<!-- /wp:paragraph -->
<!-- wp:list -->
<ul><li>' . esc_html__( 'Aenean euismod elementum', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Nisi quis eleifend', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Lectus quam id leo in vitae turpis', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Etiam tempor orci eu lobortis', 'twentyeleven' ) . '</li><li>' . esc_html__( 'At quis risus sed vulputate odio ut enim', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Blandit. Id ornare arcu odio ut', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Aenean euismod elementum', 'twentyeleven' ) . '</li></ul>
<!-- /wp:list --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->',
)
);
}

View File

@ -5,7 +5,7 @@ Tested up to: 5.8
Stable tag: 3.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
Tags: blog, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, block-patterns
== Description ==
The 2011 theme for WordPress is sophisticated, lightweight, and adaptable. Make it yours with a custom menu, header image, and background -- then go further with available theme options for light or dark color scheme, custom link colors, and three layout choices. Twenty Eleven comes equipped with a Showcase page template that transforms your front page into a showcase to show off your best content, widget support galore (sidebar, three footer areas, and a Showcase page widget area), and a custom "Ephemera" widget to display your Aside, Link, Quote, or Status posts. Included are styles for print and for the admin editor, support for featured images (as custom header images on posts and pages and as large images on featured "sticky" posts), and special styles for six different post formats.
@ -41,6 +41,10 @@ HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas
Licenses: MIT/GPL2
Source: https://github.com/aFarkas/html5shiv
Images
"Yellow Flower Photo" by Bernard Spragg. CC0. https://stocksnap.io/photo/yellow-flower-GWT9JVALSV
"People Woman Photo" by Brooke Cagle. CC0. https://stocksnap.io/photo/people-woman-MU7G67710S
== Changelog ==
= 3.7 =

View File

@ -8,7 +8,7 @@ Version: 3.7
Requires PHP: 5.2.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
Tags: blog, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, block-patterns
Text Domain: twentyeleven
*/

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-51102';
$wp_version = '5.8-alpha-51103';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.