diff --git a/wp-includes/block-patterns.php b/wp-includes/block-patterns.php new file mode 100644 index 0000000000..77ce9cb6df --- /dev/null +++ b/wp-includes/block-patterns.php @@ -0,0 +1,33 @@ + _x( 'Buttons', 'Block pattern category', 'gutenberg' ) ) ); +register_block_pattern_category( 'columns', array( 'label' => _x( 'Columns', 'Block pattern category', 'gutenberg' ) ) ); +register_block_pattern_category( 'gallery', array( 'label' => _x( 'Gallery', 'Block pattern category', 'gutenberg' ) ) ); +register_block_pattern_category( 'header', array( 'label' => _x( 'Headers', 'Block pattern category', 'gutenberg' ) ) ); +register_block_pattern_category( 'text', array( 'label' => _x( 'Text', 'Block pattern category', 'gutenberg' ) ) ); diff --git a/wp-includes/block-patterns/large-header-paragraph.php b/wp-includes/block-patterns/large-header-paragraph.php new file mode 100644 index 0000000000..c6e520ac33 --- /dev/null +++ b/wp-includes/block-patterns/large-header-paragraph.php @@ -0,0 +1,13 @@ + __( 'Large header and a paragraph' ), + 'content' => "\n
\n
\n

" . __( '"Sir Knight"' ) . "

\n\n\n\n

" . __( '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.' ) . "

\n
\n
\n", + 'viewportWidth' => 1000, + 'categories' => array( 'header' ), +); diff --git a/wp-includes/block-patterns/large-header.php b/wp-includes/block-patterns/large-header.php new file mode 100644 index 0000000000..3e2a0199e8 --- /dev/null +++ b/wp-includes/block-patterns/large-header.php @@ -0,0 +1,13 @@ + __( 'Large header' ), + 'content' => "\n
\n
\n

" . __( 'Large header' ) . "

\n
\n
\n", + 'viewportWidth' => 1000, + 'categories' => array( 'header' ), +); diff --git a/wp-includes/block-patterns/quote.php b/wp-includes/block-patterns/quote.php new file mode 100644 index 0000000000..33c54b5892 --- /dev/null +++ b/wp-includes/block-patterns/quote.php @@ -0,0 +1,13 @@ + __( 'Quote' ), + 'content' => "\n

" . __( '"Sir Knight, 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."' ) . '

' . __( '— Don Quixote' ) . "
\n", + 'viewportWidth' => 800, + 'categories' => array( 'text' ), +); diff --git a/wp-includes/block-patterns/testimonials.php b/wp-includes/block-patterns/testimonials.php new file mode 100644 index 0000000000..3fa53c25c0 --- /dev/null +++ b/wp-includes/block-patterns/testimonials.php @@ -0,0 +1,13 @@ + __( 'Testimonials' ), + 'content' => "\n
\n
\n
\n
\n

" . __( '"Sir Knight, 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."' ) . "

\n
\n\n\n\n
\n
\n
\"\"/
\n
\n\n\n\n
\n

" . __( 'Doris Som' ) . "

\n
\n
\n
\n\n\n\n
\n
\n

" . __( '"Signor Castellano, the least thing in the world suffices me; for arms are the only things I value, and combat is my bed of repose."' ) . "

\n
\n\n\n\n
\n
\n
\"\"/
\n
\n\n\n\n
\n

" . __( 'Walt Art' ) . "

\n
\n
\n
\n
\n
\n", + 'viewportWidth' => 1000, + 'categories' => array( 'text' ), +); diff --git a/wp-includes/block-patterns/text-three-columns-buttons.php b/wp-includes/block-patterns/text-three-columns-buttons.php new file mode 100644 index 0000000000..5b640eab45 --- /dev/null +++ b/wp-includes/block-patterns/text-three-columns-buttons.php @@ -0,0 +1,13 @@ + __( 'Three columns of text with buttons' ), + 'categories' => array( 'columns' ), + 'content' => "\n
\n
\n
\n

" . __( 'With that he went and held Don Quixote\'s stirrup, who having ate nothing all that day, dismounted with no small trouble and difficulty.' ) . "

\n\n\n\n\n
\n\n\n\n
\n

" . __( 'In short, let if be what it will, so it comes quickly; for the weight of armour and the fatigue of travel are not to be supported without recruiting food.' ) . "

\n\n\n\n\n
\n\n\n\n
\n

" . __( 'Thereupon they laid the cloth at the inn-door for the benefit of the fresh air, and the landlord brought him a piece of the salt fish.' ) . "

\n\n\n\n\n
\n
\n
\n", + 'viewportWidth' => 800, +); diff --git a/wp-includes/block-patterns/text-two-columns-with-images.php b/wp-includes/block-patterns/text-two-columns-with-images.php new file mode 100644 index 0000000000..f5f1b1f8d3 --- /dev/null +++ b/wp-includes/block-patterns/text-two-columns-with-images.php @@ -0,0 +1,12 @@ + __( 'Two columns of text with images' ), + 'categories' => array( 'columns' ), + 'content' => "\n
\n
\n
\n
\"\"
\n\n\n\n

" . __( 'This language, which they did not understand, and the extraordinary appearance of the knight, increased their laughter, which also increased his displeasure, and he would probably have shown it in a less civil way, but for the timely arrival of the innkeeper.' ) . "

\n
\n\n\n\n
\n
\"\"
\n\n\n\n

" . __( 'He was a man whose burden of fat inclined him to peace and quietness, yet when he observed such a strange disguise of human shape in his old armour and equipage, he could hardly forbear laughter; but having the fear of such a warlike appearance before his eyes, he resolved to give him good words, and therefore accosted him civilly.' ) . "

\n
\n
\n
\n", +); diff --git a/wp-includes/block-patterns/text-two-columns.php b/wp-includes/block-patterns/text-two-columns.php new file mode 100644 index 0000000000..0d2385fa69 --- /dev/null +++ b/wp-includes/block-patterns/text-two-columns.php @@ -0,0 +1,12 @@ + __( 'Two columns of text' ), + 'categories' => array( 'columns' ), + 'content' => "\n
\n
\n

" . __( 'CHAPTER 1. Loomings' ) . "

\n\n\n\n

" . __( 'Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation.' ) . "

\n
\n\n\n\n
\n

" . __( 'Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people’s hats off—then, I account it high time to get to sea as soon as I can.' ) . "

\n
\n
\n", +); diff --git a/wp-includes/block-patterns/three-buttons.php b/wp-includes/block-patterns/three-buttons.php new file mode 100644 index 0000000000..84953401aa --- /dev/null +++ b/wp-includes/block-patterns/three-buttons.php @@ -0,0 +1,13 @@ + __( 'Three buttons' ), + 'content' => "\n
\n
" . __( 'One' ) . "
\n\n\n\n
" . __( 'Two' ) . "
\n\n\n\n
" . __( 'Three' ) . "
\n
\n", + 'viewportWidth' => 500, + 'categories' => array( 'buttons' ), +); diff --git a/wp-includes/block-patterns/two-buttons.php b/wp-includes/block-patterns/two-buttons.php new file mode 100644 index 0000000000..b0db97a96b --- /dev/null +++ b/wp-includes/block-patterns/two-buttons.php @@ -0,0 +1,13 @@ + __( 'Two buttons' ), + 'content' => "\n
\n
" . __( 'Button One' ) . "
\n\n\n\n
" . __( 'Button Two' ) . "
\n
\n", + 'viewportWidth' => 500, + 'categories' => array( 'buttons' ), +); diff --git a/wp-includes/block-patterns/two-images.php b/wp-includes/block-patterns/two-images.php new file mode 100644 index 0000000000..232c0b318e --- /dev/null +++ b/wp-includes/block-patterns/two-images.php @@ -0,0 +1,12 @@ + __( 'Two images side by side' ), + 'categories' => array( 'gallery' ), + 'content' => "\n\n", +); diff --git a/wp-includes/class-wp-block-patterns-registry.php b/wp-includes/class-wp-block-patterns-registry.php index 96df2da2f1..bfffb860d7 100644 --- a/wp-includes/class-wp-block-patterns-registry.php +++ b/wp-includes/class-wp-block-patterns-registry.php @@ -38,7 +38,7 @@ final class WP_Block_Patterns_Registry { */ public function register( $pattern_name, $pattern_properties ) { if ( ! isset( $pattern_name ) || ! is_string( $pattern_name ) ) { - _doing_it_wrong( __METHOD__, s__( 'Pattern name must be a string.' ), '5.5.0' ); + _doing_it_wrong( __METHOD__, __( 'Pattern name must be a string.' ), '5.5.0' ); return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index fca8e7c154..fafa51e86e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-48333'; +$wp_version = '5.5-alpha-48334'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-settings.php b/wp-settings.php index 01d605844f..7fdc067158 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -286,6 +286,7 @@ require ABSPATH . WPINC . '/class-wp-block-list.php'; require ABSPATH . WPINC . '/class-wp-block-parser.php'; require ABSPATH . WPINC . '/blocks.php'; require ABSPATH . WPINC . '/blocks/index.php'; +require ABSPATH . WPINC . '/block-patterns.php'; $GLOBALS['wp_embed'] = new WP_Embed();