Bundled Themes: Introduce block patterns for Twenty Thirteen.

Props joen, melchoyce, kjellr, onemaggie.
Fixes #51104.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryelle 2021-05-25 20:26:59 +00:00
parent 8f8f433b3c
commit d8b8ceb4d3
11 changed files with 180 additions and 3 deletions

View File

@ -45,6 +45,13 @@ if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) {
require get_template_directory() . '/inc/back-compat.php';
}
/**
* Block Patterns.
*
* @since Twenty Thirteen 3.4
*/
require get_template_directory() . '/inc/block-patterns.php';
/**
* Twenty Thirteen setup.
*

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

View File

@ -0,0 +1,170 @@
<?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_Thirteen
* @since Twenty Thirteen 3.4
*/
/**
* Register Block Pattern Category.
*/
if ( function_exists( 'register_block_pattern_category' ) ) {
register_block_pattern_category(
'twentythirteen',
array( 'label' => esc_html__( 'Twenty Thirteen', 'twentythirteen' ) )
);
}
/**
* Register Block Patterns.
*/
if ( function_exists( 'register_block_pattern' ) ) {
// Decorative Gallery.
register_block_pattern(
'twentythirteen/decorative-gallery',
array(
'title' => esc_html__( 'Decorative Gallery', 'twentythirteen' ),
'categories' => array( 'twentythirteen' ),
'content' => '<!-- wp:cover {"overlayColor":"yellow","minHeight":100,"minHeightUnit":"vh","align":"full"} -->
<div class="wp-block-cover alignfull has-yellow-background-color has-background-dim" style="min-height:100vh"><div class="wp-block-cover__inner-container"><!-- wp:gallery {"ids":[null,null,null,null,null,null,null,null,null],"linkTo":"none"} -->
<figure class="wp-block-gallery columns-3 is-cropped"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#1" alt="' . esc_attr__( 'Solid red square', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#1" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/torus-interior.jpg" alt="' . esc_attr__( 'NASA Space Colony illustration, interior view of torus colony. Public spaces appear in the foreground of the torus, while housing, rolling hills, and a river snake up into the background.', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/torus-interior.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#2" alt="' . esc_attr__( 'Solid red square', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#2" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/cylinder-interior.jpg" alt="alt="' . esc_attr__( 'NASA Space Colony illustration, interior view of a cylindrical space colony, looking out through large windows. The interior contains fields, forests, and a river snaking from the foreground into the background. Low clouds hang over the land.', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/cylinder-interior.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/orange.jpg" alt="' . esc_attr__( 'Solid orange square', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/orange.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/toroidal-colony.jpg" alt="' . esc_attr__( 'NASA Space Colony illustration, cutaway view, exposing the interior of a toroidal colony. Trees and densely-packed housing line the inside of the torus.', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/toroidal-colony.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#3" alt="' . esc_attr__( 'Solid red square', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#3" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/bernal-cutaway.jpg" alt="' . esc_attr__( 'NASA Space Colony illustration, cutaway view of Bernal Sphere. The interior of the sphere is filled with greenery and houses, and a star shines brightly behind the colony.', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/bernal-cutaway.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#4" alt="' . esc_attr__( 'Solid red square', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#4" data-link="#"/></figure></li></ul></figure>
<!-- /wp:gallery --></div></div>
<!-- /wp:cover -->',
)
);
// Informational Section.
register_block_pattern(
'twentythirteen/informational-section',
array(
'title' => esc_html__( 'Informational Section', 'twentythirteen' ),
'categories' => array( 'twentythirteen' ),
'content' => '<!-- wp:media-text {"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/toroidal-colony.jpg","mediaType":"image","imageFill":false,"backgroundColor":"off-white"} -->
<div class="wp-block-media-text alignwide is-stacked-on-mobile has-off-white-background-color has-background"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/toroidal-colony.jpg" alt=""/></figure><div class="wp-block-media-text__content"><!-- wp:heading -->
<h2>' . esc_html__( 'Exploring Space', 'twentythirteen' ) . '</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>' . esc_html__( "In the 1970s, NASA's Ames Research Center illustrated some explorations around what future space colonies could look like. This piece, illustrated by Rick Guidice, shows the inside of a toroidal shaped colony.", 'twentythirteen' ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">' . esc_html__( 'Discover More', 'twentythirteen' ) . '</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div></div>
<!-- /wp:media-text -->',
)
);
// Decorative Columns.
register_block_pattern(
'twentythirteen/decorative-columns',
array(
'title' => esc_html__( 'Decorative Columns', 'twentythirteen' ),
'categories' => array( 'twentythirteen' ),
'content' => '<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:cover {"overlayColor":"yellow"} -->
<div class="wp-block-cover has-yellow-background-color has-background-dim"><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","textColor":"medium-brown","fontSize":"large"} -->
<p class="has-text-align-center has-medium-brown-color has-text-color has-large-font-size">' . esc_html__( 'Space', 'twentythirteen' ) . '</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:cover --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:cover {"url":"' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/torus-interior.jpg","dimRatio":0,"focalPoint":{"x":"0.63","y":"0.33"}} -->
<div class="wp-block-cover"><img class="wp-block-cover__image-background" alt="" src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/torus-interior.jpg" style="object-position:63% 33%" data-object-fit="cover" data-object-position="63% 33%"/><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","fontSize":"large"} -->
<p class="has-text-align-center has-large-font-size"></p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:cover --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:cover {"overlayColor":"yellow"} -->
<div class="wp-block-cover has-yellow-background-color has-background-dim"><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","textColor":"medium-brown","fontSize":"large"} -->
<p class="has-text-align-center has-medium-brown-color has-text-color has-large-font-size">' . esc_html__( 'Colonies', 'twentythirteen' ) . '</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:cover --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->',
)
);
// Callout Quote.
register_block_pattern(
'twentythirteen/callout-quote',
array(
'title' => esc_html__( 'Callout Quote', 'twentythirteen' ),
'categories' => array( 'twentythirteen' ),
'blockTypes' => array( 'core/quote' ),
'content' => '<!-- wp:columns {"verticalAlignment":"center"} -->
<div class="wp-block-columns are-vertically-aligned-center"><!-- wp:column {"verticalAlignment":"center"} -->
<div class="wp-block-column is-vertically-aligned-center"><!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator is-style-wide"/>
<!-- /wp:separator --></div>
<!-- /wp:column -->
<!-- wp:column {"verticalAlignment":"center"} -->
<div class="wp-block-column is-vertically-aligned-center"><!-- wp:quote -->
<blockquote class="wp-block-quote"><p>' . wp_kses_post( __( 'When you look at <br>the stars and the galaxy, you feel that you are not <br>just from any particular piece of land, but from the solar system.', 'twentythirteen' ) ) . '</p><cite>' . esc_html__( 'Kalpana Chawla', 'twentythirteen' ) . '</cite></blockquote>
<!-- /wp:quote --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->',
)
);
// Big Quote.
register_block_pattern(
'twentythirteen/big-quote',
array(
'title' => esc_html__( 'Big Quote', 'twentythirteen' ),
'categories' => array( 'twentythirteen' ),
'blockTypes' => array( 'core/quote' ),
'content' => '<!-- wp:cover {"overlayColor":"dark-gray","minHeight":100,"minHeightUnit":"vh","align":"full"} -->
<div class="wp-block-cover alignfull has-dark-gray-background-color has-background-dim" style="min-height:100vh"><div class="wp-block-cover__inner-container"><!-- wp:image {"align":"center","sizeSlug":"thumbnail","linkDestination":"none","className":"is-style-rounded"} -->
<div class="wp-block-image is-style-rounded"><figure class="aligncenter size-thumbnail"><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/bernal-cutaway.jpg" alt="alt="' . esc_attr__( 'NASA Space Colony illustration, cutaway view of Bernal Sphere. The interior of the sphere is filled with greenery and houses, and a star shines brightly behind the colony.', 'twentythirteen' ) . '"/></figure></div>
<!-- /wp:image -->
<!-- wp:quote {"align":"center","className":"is-style-large"} -->
<blockquote class="wp-block-quote has-text-align-center is-style-large"><p>' . esc_html__( 'When you look at the stars and the galaxy, you feel that you are not just from any particular piece of land, but from the solar system.', 'twentythirteen' ) . '</p><cite>' . esc_html__( 'Kalpana Chawla', 'twentythirteen' ) . '</cite></blockquote>
<!-- /wp:quote --></div></div>
<!-- /wp:cover -->',
)
);
// Informational List.
register_block_pattern(
'twentythirteen/informational-list',
array(
'title' => esc_html__( 'Informational List', 'twentythirteen' ),
'categories' => array( 'twentythirteen' ),
'content' => '<!-- wp:cover {"overlayColor":"red","contentPosition":"center center","align":"wide"} -->
<div class="wp-block-cover alignwide has-red-background-color has-background-dim"><div class="wp-block-cover__inner-container"><!-- wp:paragraph -->
<p><strong>' . esc_html__( 'FAMOUS ASTRONAUTS', 'twentythirteen' ) . '</strong></p>
<!-- /wp:paragraph -->
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p>' . wp_kses_post( __( 'Yuri Gagarin<br>Alan B. Shepard Jr.<br>Valentina Tereshkova<br>John Glenn Jr.', 'twentythirteen' ) ) . '</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p>' . wp_kses_post( __( 'Neil Armstrong<br>James Lovell Jr.<br>Dr. Sally Ride<br>Chris Hadfield', 'twentythirteen' ) ) . '</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div></div>
<!-- /wp:cover -->',
)
);
}

View File

@ -4,7 +4,7 @@ Tested up to: 5.7
Stable tag: 3.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, right-sidebar, custom-header, custom-menu, editor-style, featured-images, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready
Tags: blog, one-column, two-columns, right-sidebar, custom-header, custom-menu, editor-style, featured-images, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready, block-patterns
== Description ==
The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.

View File

@ -9,7 +9,7 @@ Requires at least: 3.6
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, right-sidebar, custom-header, custom-menu, editor-style, featured-images, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready
Tags: blog, one-column, two-columns, right-sidebar, custom-header, custom-menu, editor-style, featured-images, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready, block-patterns
Text Domain: twentythirteen
This theme, like WordPress, is licensed under the GPL.

View File

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