diff --git a/wp-includes/block-patterns.php b/wp-includes/block-patterns.php index 133c6d54ea..50ca1a4263 100644 --- a/wp-includes/block-patterns.php +++ b/wp-includes/block-patterns.php @@ -79,6 +79,11 @@ function _register_core_block_patterns_and_categories() { 'query-grid-posts', 'query-large-title-posts', 'query-offset-posts', + 'navigation-overlay', + 'navigation-overlay-black-bg', + 'navigation-overlay-accent-bg', + 'navigation-overlay-centered', + 'navigation-overlay-centered-with-extras', ); foreach ( $core_block_patterns as $core_block_pattern ) { @@ -228,6 +233,13 @@ function _register_core_block_patterns_and_categories() { 'description' => __( 'A variety of header designs displaying your site title and navigation.' ), ) ); + register_block_pattern_category( + 'navigation', + array( + 'label' => _x( 'Navigation', 'Block pattern category' ), + 'description' => __( 'A variety of designs displaying site navigation.' ), + ) + ); } /** diff --git a/wp-includes/block-patterns/navigation-overlay-accent-bg.php b/wp-includes/block-patterns/navigation-overlay-accent-bg.php new file mode 100644 index 0000000000..f9139f38fc --- /dev/null +++ b/wp-includes/block-patterns/navigation-overlay-accent-bg.php @@ -0,0 +1,29 @@ + _x( 'Overlay with orange background', 'Block pattern title' ), + 'blockTypes' => array( 'core/template-part/navigation-overlay' ), + 'categories' => array( 'navigation' ), + 'content' => ' + +', +); diff --git a/wp-includes/block-patterns/navigation-overlay-black-bg.php b/wp-includes/block-patterns/navigation-overlay-black-bg.php new file mode 100644 index 0000000000..0ec87fff32 --- /dev/null +++ b/wp-includes/block-patterns/navigation-overlay-black-bg.php @@ -0,0 +1,19 @@ + _x( 'Overlay with black background', 'Block pattern title' ), + 'blockTypes' => array( 'core/template-part/navigation-overlay' ), + 'categories' => array( 'navigation' ), + 'content' => ' + +', +); diff --git a/wp-includes/block-patterns/navigation-overlay-centered-with-extras.php b/wp-includes/block-patterns/navigation-overlay-centered-with-extras.php new file mode 100644 index 0000000000..14748a4331 --- /dev/null +++ b/wp-includes/block-patterns/navigation-overlay-centered-with-extras.php @@ -0,0 +1,45 @@ + _x( 'Overlay with site info and CTA', 'Block pattern title' ), + 'blockTypes' => array( 'core/template-part/navigation-overlay' ), + 'categories' => array( 'navigation' ), + 'content' => ' + +', +); diff --git a/wp-includes/block-patterns/navigation-overlay-centered.php b/wp-includes/block-patterns/navigation-overlay-centered.php new file mode 100644 index 0000000000..3428aabf50 --- /dev/null +++ b/wp-includes/block-patterns/navigation-overlay-centered.php @@ -0,0 +1,21 @@ + _x( 'Overlay with centered navigation', 'Block pattern title' ), + 'blockTypes' => array( 'core/template-part/navigation-overlay' ), + 'categories' => array( 'navigation' ), + 'content' => ' + +', +); diff --git a/wp-includes/block-patterns/navigation-overlay.php b/wp-includes/block-patterns/navigation-overlay.php new file mode 100644 index 0000000000..c979973a82 --- /dev/null +++ b/wp-includes/block-patterns/navigation-overlay.php @@ -0,0 +1,19 @@ + _x( 'Navigation Overlay', 'Block pattern title' ), + 'blockTypes' => array( 'core/template-part/navigation-overlay' ), + 'categories' => array( 'navigation' ), + 'content' => ' +
+
+ + +
+', +); diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php index df016c4a1d..ed23647ab0 100644 --- a/wp-includes/block-template-utils.php +++ b/wp-includes/block-template-utils.php @@ -19,6 +19,9 @@ if ( ! defined( 'WP_TEMPLATE_PART_AREA_SIDEBAR' ) ) { if ( ! defined( 'WP_TEMPLATE_PART_AREA_UNCATEGORIZED' ) ) { define( 'WP_TEMPLATE_PART_AREA_UNCATEGORIZED', 'uncategorized' ); } +if ( ! defined( 'WP_TEMPLATE_PART_AREA_NAVIGATION_OVERLAY' ) ) { + define( 'WP_TEMPLATE_PART_AREA_NAVIGATION_OVERLAY', 'navigation-overlay' ); +} /** * For backward compatibility reasons, @@ -96,6 +99,15 @@ function get_allowed_block_template_part_areas() { 'icon' => 'footer', 'area_tag' => 'footer', ), + array( + 'area' => WP_TEMPLATE_PART_AREA_NAVIGATION_OVERLAY, + 'label' => _x( 'Navigation Overlay', 'template part area' ), + 'description' => __( + 'The Navigation Overlay template defines a full-screen overlay area that typically contains navigation links and can be toggled on and off.' + ), + 'icon' => 'overlay', + 'area_tag' => 'div', + ), ); /** diff --git a/wp-includes/version.php b/wp-includes/version.php index f967502000..a905d40bb0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.0-alpha-61608'; +$wp_version = '7.0-alpha-61609'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.