From c7d5844b9a2badd7749b89dd30dcfce483dbfaee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20S=C3=A1nchez?= Date: Tue, 12 May 2020 18:59:08 -0500 Subject: [PATCH] Add 'Hero and two columns" pattern (#21130) * Add 'Hero and two columns" pattern * Update gradient * Updated font styles and spacing * Change from json to php * Rename pattern * Register pattern * Update pattern to php * Fix naming on pattern registry * Fix line indentation * Remove deprecated register_pattern --- lib/client-assets.php | 2 ++ lib/patterns/hero-right-column.php | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 lib/patterns/hero-right-column.php diff --git a/lib/client-assets.php b/lib/client-assets.php index 885ba362710dd3..5427ee3abfdf3c 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -683,6 +683,7 @@ function gutenberg_extend_settings_custom_units( $settings ) { /* * Register default patterns if not registered in Core already. */ + if ( class_exists( 'WP_Block_Patterns_Registry' ) && ! WP_Block_Patterns_Registry::get_instance()->is_registered( 'text-two-columns' ) ) { register_block_pattern( 'core/text-two-columns', gutenberg_load_block_pattern( 'text-two-columns' ) ); register_block_pattern( 'core/two-buttons', gutenberg_load_block_pattern( 'two-buttons' ) ); @@ -691,5 +692,6 @@ function gutenberg_extend_settings_custom_units( $settings ) { register_block_pattern( 'core/hero-two-columns', gutenberg_load_block_pattern( 'hero-two-columns' ) ); register_block_pattern( 'core/numbered-features', gutenberg_load_block_pattern( 'numbered-features' ) ); register_block_pattern( 'core/its-time', gutenberg_load_block_pattern( 'its-time' ) ); + register_block_pattern( 'core/hero-right-column', gutenberg_load_block_pattern( 'hero-right-column' ) ); register_block_pattern( 'core/testimonials', gutenberg_load_block_pattern( 'testimonials' ) ); } diff --git a/lib/patterns/hero-right-column.php b/lib/patterns/hero-right-column.php new file mode 100644 index 00000000000000..19bf4e44fee4fb --- /dev/null +++ b/lib/patterns/hero-right-column.php @@ -0,0 +1,11 @@ + __( 'Hero Right Column', 'gutenberg' ), + 'content' => "\n
\n
\n
\n

Easy & Accessible

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

Extend it with over 54,000 plugins to help your website meet your needs. Hundreds of thousands of developers and site owners trust it worldwide. Add an online store, galleries, mailing lists, forums, analytics, and much more.

\n\n\n\n

Hundreds of thousands of developers and site owners trust it worldwide. Add an online store, galleries, mailing lists, forums, analytics, and much more.

\n\n\n\n
\n\n\n\n\n
\n
\n
\n", +);