From 12f7384bd3bcfcacd263d86e0ea79d7c9374b05d Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Sat, 10 Dec 2022 13:42:51 +0200 Subject: [PATCH] [Patterns]: Remove bundled patterns --- lib/compat/wordpress-6.2/block-patterns.php | 45 ---------------- .../centered-footer-with-social-links.php | 41 -------------- .../block-patterns/centered-footer.php | 25 --------- .../block-patterns/centered-header.php | 19 ------- .../centered-logo-in-navigation.php | 25 --------- ...ith-background-color-and-three-columns.php | 53 ------------------- ...footer-with-credit-line-and-navigation.php | 28 ---------- .../footer-with-large-font-size.php | 25 --------- ...footer-with-navigation-and-credit-line.php | 27 ---------- ...with-search-site-title-and-credit-line.php | 47 ---------------- ...footer-with-site-title-and-credit-line.php | 27 ---------- .../header-with-large-font-size.php | 17 ------ .../block-patterns/left-aligned-footer.php | 23 -------- .../block-patterns/right-aligned-footer.php | 23 -------- .../simple-header-inside-image.php | 34 ------------ .../simple-header-with-background-color.php | 23 -------- .../simple-header-with-image.php | 29 ---------- .../simple-header-with-tagline-2.php | 27 ---------- .../simple-header-with-tagline.php | 23 -------- .../block-patterns/simple-header.php | 23 -------- .../site-title-and-menu-button.php | 21 -------- .../site-title-and-vertical-navigation.php | 28 ---------- 22 files changed, 633 deletions(-) delete mode 100644 lib/compat/wordpress-6.2/block-patterns/centered-footer-with-social-links.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/centered-footer.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/centered-header.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/centered-logo-in-navigation.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/footer-with-background-color-and-three-columns.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/footer-with-credit-line-and-navigation.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/footer-with-large-font-size.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/footer-with-navigation-and-credit-line.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/footer-with-search-site-title-and-credit-line.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/footer-with-site-title-and-credit-line.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/header-with-large-font-size.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/left-aligned-footer.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/right-aligned-footer.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/simple-header-inside-image.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/simple-header-with-background-color.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/simple-header-with-image.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/simple-header-with-tagline-2.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/simple-header-with-tagline.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/simple-header.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/site-title-and-menu-button.php delete mode 100644 lib/compat/wordpress-6.2/block-patterns/site-title-and-vertical-navigation.php diff --git a/lib/compat/wordpress-6.2/block-patterns.php b/lib/compat/wordpress-6.2/block-patterns.php index 8f50c9ff33c5d6..1eaff746fe5d16 100644 --- a/lib/compat/wordpress-6.2/block-patterns.php +++ b/lib/compat/wordpress-6.2/block-patterns.php @@ -74,51 +74,6 @@ function gutenberg_register_core_block_patterns_and_categories() { } add_action( 'init', 'gutenberg_register_core_block_patterns_and_categories' ); -/** - * Registers Gutenberg-bundled patterns, with a focus on headers and footers - * for site editing. - * - * @since 6.2.0 - * @access private - */ -function gutenberg_register_core_block_patterns() { - if ( ! get_theme_support( 'core-block-patterns' ) ) { - return; - } - - $core_block_patterns = array( - 'centered-footer', - 'centered-footer-with-social-links', - 'centered-header', - 'centered-logo-in-navigation', - 'footer-with-background-color-and-three-columns', - 'footer-with-credit-line-and-navigation', - 'footer-with-large-font-size', - 'footer-with-navigation-and-credit-line', - 'footer-with-search-site-title-and-credit-line', - 'footer-with-site-title-and-credit-line', - 'header-with-large-font-size', - 'left-aligned-footer', - 'right-aligned-footer', - 'simple-header', - 'simple-header-inside-image', - 'simple-header-with-background-color', - 'simple-header-with-image', - 'simple-header-with-tagline', - 'simple-header-with-tagline-2', - 'site-title-and-menu-button', - 'site-title-and-vertical-navigation', - ); - - foreach ( $core_block_patterns as $core_block_pattern ) { - register_block_pattern( - 'core/' . $core_block_pattern, - require __DIR__ . '/block-patterns/' . $core_block_pattern . '.php' - ); - } -} -add_action( 'init', 'gutenberg_register_core_block_patterns' ); - /** * Register any patterns that the active theme may provide under its * `./patterns/` directory. Each pattern is defined as a PHP file and defines diff --git a/lib/compat/wordpress-6.2/block-patterns/centered-footer-with-social-links.php b/lib/compat/wordpress-6.2/block-patterns/centered-footer-with-social-links.php deleted file mode 100644 index ceb7e6b5dccd86..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/centered-footer-with-social-links.php +++ /dev/null @@ -1,41 +0,0 @@ - _x( 'Centered footer with social links', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/footer' ), - 'categories' => array( 'footer' ), - 'content' => ' -
- - - - - - - - - - - - - - - - -

' - . sprintf( - /* translators: %s: WordPress */ - __( 'Proudly powered by %s', 'gutenberg' ), - 'WordPress' - ) . - '

-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/centered-footer.php b/lib/compat/wordpress-6.2/block-patterns/centered-footer.php deleted file mode 100644 index a341cdf0442d05..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/centered-footer.php +++ /dev/null @@ -1,25 +0,0 @@ - _x( 'Centered footer', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/footer' ), - 'categories' => array( 'footer' ), - 'content' => ' -
-
-

' - . sprintf( - /* translators: %s: WordPress */ - __( 'Proudly powered by %s', 'gutenberg' ), - 'WordPress' - ) . - '

-
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/centered-header.php b/lib/compat/wordpress-6.2/block-patterns/centered-header.php deleted file mode 100644 index a72de34bf5b10d..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/centered-header.php +++ /dev/null @@ -1,19 +0,0 @@ - _x( 'Centered header', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/header' ), - 'categories' => array( 'header' ), - 'content' => ' -
- - - -
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/centered-logo-in-navigation.php b/lib/compat/wordpress-6.2/block-patterns/centered-logo-in-navigation.php deleted file mode 100644 index 856fca10ffbe64..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/centered-logo-in-navigation.php +++ /dev/null @@ -1,25 +0,0 @@ - _x( 'Centered logo in navigation', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/header' ), - 'categories' => array( 'header' ), - 'content' => ' -
- - - - - - - - - -
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/footer-with-background-color-and-three-columns.php b/lib/compat/wordpress-6.2/block-patterns/footer-with-background-color-and-three-columns.php deleted file mode 100644 index 93cfbb77a68d08..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/footer-with-background-color-and-three-columns.php +++ /dev/null @@ -1,53 +0,0 @@ - _x( 'Footer with background color and three columns', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/footer' ), - 'categories' => array( 'footer' ), - 'content' => ' - - ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/footer-with-credit-line-and-navigation.php b/lib/compat/wordpress-6.2/block-patterns/footer-with-credit-line-and-navigation.php deleted file mode 100644 index e7ef17af12ec04..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/footer-with-credit-line-and-navigation.php +++ /dev/null @@ -1,28 +0,0 @@ - _x( 'Footer with credit line and navigation', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/footer' ), - 'categories' => array( 'footer' ), - 'content' => ' -
-
-

' - . sprintf( - /* translators: %s: WordPress */ - __( 'Proudly powered by %s', 'gutenberg' ), - 'WordPress' - ) . - '

- - - -
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/footer-with-large-font-size.php b/lib/compat/wordpress-6.2/block-patterns/footer-with-large-font-size.php deleted file mode 100644 index 0bd3e0f6f2be6a..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/footer-with-large-font-size.php +++ /dev/null @@ -1,25 +0,0 @@ - _x( 'Footer with Large Font Size', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/footer' ), - 'categories' => array( 'footer' ), - 'content' => ' -
- - -

' - . sprintf( - /* translators: %s: WordPress */ - __( 'Proudly powered by %s', 'gutenberg' ), - 'WordPress' - ) . - '

-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/footer-with-navigation-and-credit-line.php b/lib/compat/wordpress-6.2/block-patterns/footer-with-navigation-and-credit-line.php deleted file mode 100644 index 7b7d83675b0b7e..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/footer-with-navigation-and-credit-line.php +++ /dev/null @@ -1,27 +0,0 @@ - _x( 'Footer with navigation and credit line', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/footer' ), - 'categories' => array( 'footer' ), - 'content' => ' -
-
- - -

' - . sprintf( - /* translators: %s: WordPress */ - __( 'Proudly powered by %s', 'gutenberg' ), - 'WordPress' - ) . - '

-
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/footer-with-search-site-title-and-credit-line.php b/lib/compat/wordpress-6.2/block-patterns/footer-with-search-site-title-and-credit-line.php deleted file mode 100644 index fc44d40cdcf0c9..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/footer-with-search-site-title-and-credit-line.php +++ /dev/null @@ -1,47 +0,0 @@ - _x( 'Footer with search, site title, and credit line', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/footer' ), - 'categories' => array( 'footer' ), - 'content' => ' -
-
-
-
-
- - - -
-
- - - - - - - -
-
- - - -
-

' - . sprintf( - /* translators: %s: WordPress */ - __( 'Proudly powered by %s', 'gutenberg' ), - 'WordPress' - ) . - '

-
-
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/footer-with-site-title-and-credit-line.php b/lib/compat/wordpress-6.2/block-patterns/footer-with-site-title-and-credit-line.php deleted file mode 100644 index c7d9d8e8736bc1..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/footer-with-site-title-and-credit-line.php +++ /dev/null @@ -1,27 +0,0 @@ - _x( 'Footer with site title and credit line', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/footer' ), - 'categories' => array( 'footer' ), - 'content' => ' -
-
- - -

' - . sprintf( - /* translators: %s: WordPress */ - __( 'Proudly powered by %s', 'gutenberg' ), - 'WordPress' - ) . - '

-
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/header-with-large-font-size.php b/lib/compat/wordpress-6.2/block-patterns/header-with-large-font-size.php deleted file mode 100644 index 2a34032575f83b..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/header-with-large-font-size.php +++ /dev/null @@ -1,17 +0,0 @@ - _x( 'Header with Large Font Size', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/header' ), - 'categories' => array( 'header' ), - 'content' => ' -
- -
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/left-aligned-footer.php b/lib/compat/wordpress-6.2/block-patterns/left-aligned-footer.php deleted file mode 100644 index adb8ab3974dfa0..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/left-aligned-footer.php +++ /dev/null @@ -1,23 +0,0 @@ - _x( 'Left-aligned footer', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/footer' ), - 'categories' => array( 'footer' ), - 'content' => ' -
-

' - . sprintf( - /* translators: %s: WordPress */ - __( 'Proudly powered by %s', 'gutenberg' ), - 'WordPress' - ) . - '

-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/right-aligned-footer.php b/lib/compat/wordpress-6.2/block-patterns/right-aligned-footer.php deleted file mode 100644 index 2e7693cc3a2422..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/right-aligned-footer.php +++ /dev/null @@ -1,23 +0,0 @@ - _x( 'Right-aligned footer', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/footer' ), - 'categories' => array( 'footer' ), - 'content' => ' -
-

' - . sprintf( - /* translators: %s: WordPress */ - __( 'Proudly powered by %s', 'gutenberg' ), - 'WordPress' - ) . - '

-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/simple-header-inside-image.php b/lib/compat/wordpress-6.2/block-patterns/simple-header-inside-image.php deleted file mode 100644 index 7a9edac03dbf00..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/simple-header-inside-image.php +++ /dev/null @@ -1,34 +0,0 @@ - _x( 'Simple header inside image', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/header' ), - 'categories' => array( 'header' ), - 'content' => ' -
-
-
-
-
- -
-
- - - -
-
-
- - - - -
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/simple-header-with-background-color.php b/lib/compat/wordpress-6.2/block-patterns/simple-header-with-background-color.php deleted file mode 100644 index 2d003ab63d878d..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/simple-header-with-background-color.php +++ /dev/null @@ -1,23 +0,0 @@ - _x( 'Simple header with background color', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/header' ), - 'categories' => array( 'header' ), - 'content' => ' -
-
-
- -
- - -
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/simple-header-with-image.php b/lib/compat/wordpress-6.2/block-patterns/simple-header-with-image.php deleted file mode 100644 index 043cead1552b3d..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/simple-header-with-image.php +++ /dev/null @@ -1,29 +0,0 @@ - _x( 'Simple header with image', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/header' ), - 'categories' => array( 'header' ), - 'content' => ' -
-
-
- -
- - -
- - - -
-

-
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/simple-header-with-tagline-2.php b/lib/compat/wordpress-6.2/block-patterns/simple-header-with-tagline-2.php deleted file mode 100644 index 8995de8436389d..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/simple-header-with-tagline-2.php +++ /dev/null @@ -1,27 +0,0 @@ - _x( 'Simple header with tagline', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/header' ), - 'categories' => array( 'header' ), - 'content' => ' -
-
-
- - -
- -
-
- - -
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/simple-header-with-tagline.php b/lib/compat/wordpress-6.2/block-patterns/simple-header-with-tagline.php deleted file mode 100644 index 9047e851127475..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/simple-header-with-tagline.php +++ /dev/null @@ -1,23 +0,0 @@ - _x( 'Text-only header with tagline', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/header' ), - 'categories' => array( 'header' ), - 'content' => ' -
-
-
- -
- - -
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/simple-header.php b/lib/compat/wordpress-6.2/block-patterns/simple-header.php deleted file mode 100644 index 2ceeeb3c71865f..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/simple-header.php +++ /dev/null @@ -1,23 +0,0 @@ - _x( 'Simple header', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/header' ), - 'categories' => array( 'header' ), - 'content' => ' -
-
-
- -
- - -
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/site-title-and-menu-button.php b/lib/compat/wordpress-6.2/block-patterns/site-title-and-menu-button.php deleted file mode 100644 index d9c44a4e5bb782..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/site-title-and-menu-button.php +++ /dev/null @@ -1,21 +0,0 @@ - _x( 'Site title and menu button', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/header' ), - 'categories' => array( 'header' ), - 'content' => ' -
-
-
- - -
-
- ', -); diff --git a/lib/compat/wordpress-6.2/block-patterns/site-title-and-vertical-navigation.php b/lib/compat/wordpress-6.2/block-patterns/site-title-and-vertical-navigation.php deleted file mode 100644 index 8b78e96185b361..00000000000000 --- a/lib/compat/wordpress-6.2/block-patterns/site-title-and-vertical-navigation.php +++ /dev/null @@ -1,28 +0,0 @@ - _x( 'Site title and vertical navigation', 'Block pattern title', 'gutenberg' ), - 'blockTypes' => array( 'core/template-part/header' ), - 'categories' => array( 'header' ), - 'content' => ' -
-
-
-
-
- - - -
-
-
-
-
-
- ', -);