From 6d3300b437fcca5e45ec58811d2bb4747dfb4b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helen=20Hou-Sand=C3=AD?= Date: Tue, 27 Oct 2020 21:01:07 +0000 Subject: [PATCH] Bundled Themes: Introduce block patterns for Twenty Twenty. Props melchoyce, Anlino, kjellr, ryelle. Fixes #51098. Built from https://develop.svn.wordpress.org/trunk@49347 git-svn-id: http://core.svn.wordpress.org/trunk@49107 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentytwenty/functions.php | 3 + .../twentytwenty/inc/block-patterns.php | 203 ++++++++++++++++++ wp-includes/version.php | 2 +- 3 files changed, 207 insertions(+), 1 deletion(-) create mode 100644 wp-content/themes/twentytwenty/inc/block-patterns.php diff --git a/wp-content/themes/twentytwenty/functions.php b/wp-content/themes/twentytwenty/functions.php index b350091349..292e2a4cff 100644 --- a/wp-content/themes/twentytwenty/functions.php +++ b/wp-content/themes/twentytwenty/functions.php @@ -178,6 +178,9 @@ require get_template_directory() . '/classes/class-twentytwenty-non-latin-langua // Custom CSS. require get_template_directory() . '/inc/custom-css.php'; +// Block Patterns. +require get_template_directory() . '/inc/block-patterns.php'; + /** * Register and Enqueue Styles. */ diff --git a/wp-content/themes/twentytwenty/inc/block-patterns.php b/wp-content/themes/twentytwenty/inc/block-patterns.php new file mode 100644 index 0000000000..6e6427bbd3 --- /dev/null +++ b/wp-content/themes/twentytwenty/inc/block-patterns.php @@ -0,0 +1,203 @@ + esc_html__( 'Twenty Twenty', 'twentytwenty' ) ) + ); +} + +/** + * Register Block Patterns. + */ +if ( function_exists( 'register_block_pattern' ) ) { + + // Call to Action. + register_block_pattern( + 'twentytwenty/call-to-action', + array( + 'title' => esc_html__( 'Call to Action', 'twentytwenty' ), + 'categories' => array( 'twentytwenty' ), + 'viewportWidth' => 1400, + 'content' => implode( + '', + array( + '', + '
', + '
', + '

' . esc_html__( 'Support the Museum and Get Exclusive Offers', 'twentytwenty' ) . '

', + '', + '', + '

' . esc_html__( 'Members get access to exclusive exhibits and sales. Our memberships cost $99.99 and are billed annually.', 'twentytwenty' ) . '

', + '', + '', + '', + '
', + '
', + '', + ) + ) + ) + ); + + // Double Call to Action. + register_block_pattern( + 'twentytwenty/double-call-to-action', + array( + 'title' => esc_html__( 'Double Call to Action', 'twentytwenty' ), + 'categories' => array( 'twentytwenty' ), + 'viewportWidth' => 1400, + 'content' => implode( + '', + array( + '', + '
', + '
', + '
', + '

' . esc_html__( 'The Museum', 'twentytwenty' ) . '

', + '', + '', + '

' . esc_html__( 'Award-winning exhibitions featuring internationally-renowned artists.', 'twentytwenty' ) . '

', + '', + '', + '', + '
', + '
', + '', + '', + '
', + '
', + '

' . esc_html__( 'The Store', 'twentytwenty' ) . '

', + '', + '', + '

' . esc_html__( 'An awe-inspiring collection of books, prints, and gifts from our exhibitions.', 'twentytwenty' ) . '

', + '', + '', + '', + '
', + '
', + '
', + '', + ) + ) + ) + ); + + // Event Details. + register_block_pattern( + 'twentytwenty/event-details', + array( + 'title' => esc_html__( 'Event Details', 'twentytwenty' ), + 'categories' => array( 'twentytwenty' ), + 'viewportWidth' => 1400, + 'content' => implode( + '', + array( + '', + '
', + '
', + '
', + '

' . wp_kses_post( __( 'Dates
Aug 1 — Dec 1', 'twentytwentyone' ) ) . '

', + '
', + '', + '', + '
', + '

' . wp_kses_post( __( 'Location
Exhibit Hall B', 'twentytwentyone' ) ) . '

', + '
', + '', + '', + '
', + '

' . wp_kses_post( __( 'Price
Included', 'twentytwentyone' ) ) . '

', + '
', + '
', + '
', + '', + ) + ) + ) + ); + + // Featured Content. + register_block_pattern( + 'twentytwenty/featured-content', + array( + 'title' => esc_html__( 'Featured Content', 'twentytwenty' ), + 'categories' => array( 'twentytwenty' ), + 'viewportWidth' => 1400, + 'content' => implode( + '', + array( + '', + '
', + '
', + '
' . esc_attr__( 'Abstract Rectangles', 'twentytwenty' ) . '
', + '', + '', + '

' . esc_html__( 'Works and Days', 'twentytwenty' ) . '

', + '', + '', + '

' . esc_html__( 'August 1 — December 1', 'twentytwenty' ) . '

', + '', + '', + '', + '
', + '', + '', + '
', + '
' . esc_attr__( 'Abstract Rectangles', 'twentytwenty' ) . '
', + '', + '', + '

' . esc_html__( 'The Life I Deserve', 'twentytwenty' ) . '

', + '', + '', + '

' . esc_html__( 'August 1 — December 1', 'twentytwenty' ) . '

', + '', + '', + '', + '
', + '
', + '', + ) + ) + ) + ); + + // Introduction. + register_block_pattern( + 'twentytwenty/introduction', + array( + 'title' => esc_html__( 'Introduction', 'twentytwenty' ), + 'categories' => array( 'twentytwenty' ), + 'viewportWidth' => 1400, + 'content' => implode( + '', + array( + '', + '

' . esc_html__( 'The Premier Destination for Modern Art in Sweden', 'twentytwenty' ) . '

', + '', + '', + '

' . esc_html__( 'With seven floors of striking architecture, UMoMA shows exhibitions of international contemporary art, sometimes along with art historical retrospectives. Existential, political, and philosophical issues are intrinsic to our program. As visitor, you are invited to guided tours artist talks, lectures, film screenings, and other events with free admission.', 'twentytwenty' ) . '

', + '', + ) + ) + ) + ); +} diff --git a/wp-includes/version.php b/wp-includes/version.php index f64cbe8d98..1dcbd49be8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-beta1-49346'; +$wp_version = '5.6-beta1-49347'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.