Commit c5e4e138 authored by Riad Benguella's avatar Riad Benguella
Browse files

Block Editor: Update the Core Block Patterns.

Backport the latest block patterns from the Gutenberg plugin.
The new patterns adapt properly to Core themes.

Props nrqsnchz.
Fixes #50550, #50594.

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


git-svn-id: https://core.svn.wordpress.org/trunk@48401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent cd5a3bf5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -25,8 +25,9 @@ function _register_core_block_patterns_and_categories() {
			'text-two-columns-with-images',
			'text-three-columns-buttons',
			'large-header',
			'large-header-paragraph',
			'large-header-button',
			'three-buttons',
			'heading-paragraph',
			'quote',
		);

+14 −0
Original line number Diff line number Diff line
<?php
/**
 * Heading and paragraph block pattern.
 *
 * @package WordPress
 */

return array(
	'title'         => __( 'Heading and paragraph' ),
	'content'       => "<!-- wp:group -->\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\"><!-- wp:heading {\"textColor\":\"black\",\"fontSize\":\"large\"} -->\n<h2 class=\"has-black-color has-text-color has-large-font-size\"><span style=\"color:#ba0c49\" class=\"has-inline-color\"><strong>2</strong>.</span><br>" . __( 'Which treats of the first sally the ingenious Don Quixote made from home' ) . "</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph {\"textColor\":\"black\"} -->\n<p class=\"has-black-color has-text-color\">" . __( 'These preliminaries settled, he did not care to put off any longer the execution of his design, urged on to it by the thought of all the world was losing by his delay, seeing what wrongs he intended to right, grievances to redress, injustices to repair, abuses to remove, and duties to discharge.' ) . "</p>\n<!-- /wp:paragraph --></div></div>\n<!-- /wp:group -->",
	'viewportWidth' => 1000,
	'categories'    => array( 'text' ),
	'description'   => _x( 'A heading preceded by a chapter number, and followed by a paragraph.', 'Block pattern description' ),
);
+14 −0
Original line number Diff line number Diff line
<?php
/**
 * Large header and a button block pattern.
 *
 * @package WordPress
 */

return array(
	'title'         => __( 'Large header with a heading and a button ' ),
	'content'       => "<!-- wp:cover {\"minHeight\":575,\"minHeightUnit\":\"px\",\"customGradient\":\"linear-gradient(135deg,rgb(249,72,72) 1%,rgb(179,22,22) 100%)\",\"contentPosition\":\"center center\",\"align\":\"wide\"} -->\n<div class=\"wp-block-cover alignwide has-background-dim has-background-gradient is-position-center-center\" style=\"background:linear-gradient(135deg,rgb(249,72,72) 1%,rgb(179,22,22) 100%);min-height:575px\"><div class=\"wp-block-cover__inner-container\"><!-- wp:columns {\"align\":\"wide\"} -->\n<div class=\"wp-block-columns alignwide\"><!-- wp:column {\"width\":12} -->\n<div class=\"wp-block-column\" style=\"flex-basis:12%\"><!-- wp:spacer -->\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer --></div>\n<!-- /wp:column -->\n\n<!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:spacer -->\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:paragraph {\"align\":\"left\",\"placeholder\":\"Write title…\",\"style\":{\"typography\":{\"fontSize\":68,\"lineHeight\":\"1.2\"},\"color\":{\"text\":\"#fffffa\"}}} -->\n<p class=\"has-text-align-left has-text-color\" style=\"line-height:1.2;font-size:68px;color:#fffffa\"><strong>" . __( 'Thou hast seen' ) . '</strong><br><strong>' . __( 'nothing yet' ) . "</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:buttons -->\n<div class=\"wp-block-buttons\"><!-- wp:button {\"borderRadius\":3,\"style\":{\"color\":{\"background\":\"#fffffa\",\"text\":\"#00000a\"}}} -->\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-text-color has-background\" style=\"border-radius:3px;background-color:#fffffa;color:#00000a\">Read now</a></div>\n<!-- /wp:button --></div>\n<!-- /wp:buttons -->\n\n<!-- wp:spacer -->\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer --></div>\n<!-- /wp:column -->\n\n<!-- wp:column {\"width\":12} -->\n<div class=\"wp-block-column\" style=\"flex-basis:12%\"><!-- wp:spacer -->\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer --></div>\n<!-- /wp:column --></div>\n<!-- /wp:columns --></div></div>\n<!-- /wp:cover -->",
	'viewportWidth' => 1000,
	'categories'    => array( 'header' ),
	'description'   => _x( 'A large hero section with a bright gradient background, a big heading and a filled button.', 'Block pattern description' ),
);
+0 −13
Original line number Diff line number Diff line
<?php
/**
 * Large header and a paragraph block pattern.
 *
 * @package WordPress
 */

return array(
	'title'         => __( 'Large header and a paragraph' ),
	'content'       => "<!-- wp:group {\"align\":\"wide\"} -->\n<div class=\"wp-block-group alignwide\"><div class=\"wp-block-group__inner-container\"><!-- wp:cover {\"customGradient\":\"radial-gradient(rgb(122,220,180) 0%,rgb(0,208,130) 100%)\",\"contentPosition\":\"center center\",\"align\":\"wide\"} -->\n<div class=\"wp-block-cover alignwide has-background-dim has-background-gradient is-position-center-center\" style=\"background:radial-gradient(rgb(122,220,180) 0%,rgb(0,208,130) 100%)\"><div class=\"wp-block-cover__inner-container\"><!-- wp:paragraph {\"align\":\"center\",\"placeholder\":\"Write title…\",\"textColor\":\"black\",\"style\":{\"typography\":{\"fontSize\":90,\"lineHeight\":\"1.2\"}}} -->\n<p class=\"has-text-align-center has-black-color has-text-color\" style=\"line-height:1.2;font-size:90px\"><strong>" . __( '"Sir Knight"' ) . "</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph {\"align\":\"center\",\"textColor\":\"black\"} -->\n<p class=\"has-text-align-center has-black-color has-text-color\">" . __( 'If your worship be disposed to alight, you will fail of nothing here but of a bed as for all other accommodations, you may be supplied to your mind.' ) . "</p>\n<!-- /wp:paragraph --></div></div>\n<!-- /wp:cover --></div></div>\n<!-- /wp:group -->",
	'viewportWidth' => 1000,
	'categories'    => array( 'header' ),
);
+3 −2
Original line number Diff line number Diff line
@@ -6,8 +6,9 @@
 */

return array(
	'title'         => __( 'Large header' ),
	'content'       => "<!-- wp:group {\"align\":\"wide\"} -->\n<div class=\"wp-block-group alignwide\"><div class=\"wp-block-group__inner-container\"><!-- wp:cover {\"gradient\":\"pale-ocean\",\"align\":\"wide\"} -->\n<div class=\"wp-block-cover alignwide has-background-dim has-background-gradient has-pale-ocean-gradient-background\"><div class=\"wp-block-cover__inner-container\"><!-- wp:paragraph {\"align\":\"center\",\"placeholder\":\"Write title…\",\"textColor\":\"black\",\"style\":{\"typography\":{\"fontSize\":72}}} -->\n<p class=\"has-text-align-center has-black-color has-text-color\" style=\"font-size:72px\"><strong>" . __( 'Large header' ) . "</strong></p>\n<!-- /wp:paragraph --></div></div>\n<!-- /wp:cover --></div></div>\n<!-- /wp:group -->",
	'title'         => __( 'Large header with a heading' ),
	'content'       => "<!-- wp:cover {\"url\":\"https://s.w.org/images/core/5.5/don-quixote-06.jpg\",\"id\":165,\"dimRatio\":15,\"focalPoint\":{\"x\":\"0.40\",\"y\":\"0.26\"},\"minHeight\":375,\"minHeightUnit\":\"px\",\"contentPosition\":\"center center\",\"align\":\"wide\"} -->\n<div class=\"wp-block-cover alignwide has-background-dim-20 has-background-dim is-position-center-center\" style=\"background-image:url(https://s.w.org/images/core/5.5/don-quixote-06.jpg);min-height:375px;background-position:40% 26%\"><div class=\"wp-block-cover__inner-container\"><!-- wp:paragraph {\"align\":\"center\",\"placeholder\":\"Write title…\",\"style\":{\"typography\":{\"fontSize\":74,\"lineHeight\":\"1.1\"},\"color\":{\"text\":\"#fffffa\"}}} -->\n<p class=\"has-text-align-center has-text-color\" style=\"line-height:1.1;font-size:74px;color:#fffffa\"><strong>" . __( 'Don Quixote' ) . "</strong></p>\n<!-- /wp:paragraph --></div></div>\n<!-- /wp:cover -->",
	'viewportWidth' => 1000,
	'categories'    => array( 'header' ),
	'description'   => _x( 'A large hero section with an example background image and a heading in the center.', 'Block pattern description' ),
);
Loading