Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
fcd792d
Add interactivity runtime
luisherranz Apr 21, 2023
9b0a62e
Add it to the image block
luisherranz Apr 21, 2023
d2c0803
Add a separate webpack config
luisherranz Apr 21, 2023
ed1df51
Make sure the runtime is imported only once
luisherranz Apr 21, 2023
ed043f5
Use sideEffects instead of init
luisherranz Apr 21, 2023
c9f389f
Move script registration to a general file
luisherranz Apr 21, 2023
261dacf
Add `defer` to the interactivity scripts
luisherranz Apr 21, 2023
27cfc1f
Revert changes of the image block
luisherranz Apr 21, 2023
7cf6ba9
Fix init import name
luisherranz Apr 21, 2023
55d37ef
Add experimental setting to use Interactivity API
SantosGuillamot Apr 24, 2023
7cfbffa
Add basic `interactivity.js` file
SantosGuillamot Apr 24, 2023
2a970e3
Enqueue old script/interactivity API conditionally
SantosGuillamot Apr 24, 2023
84146ae
Add `tick()` function until Preact bug is solved
SantosGuillamot Apr 24, 2023
c2c96da
Add code to handle the overlayMenu
SantosGuillamot Apr 24, 2023
71fbd35
Add Interactivity API to submenu block
SantosGuillamot Apr 24, 2023
85bf58f
Add Interactivity API to page list block
SantosGuillamot Apr 24, 2023
027e2a1
Change code to be more declarative and simple
SantosGuillamot Apr 26, 2023
0e4a604
Use `__DIR__` instead of `__FILE__`
SantosGuillamot Apr 27, 2023
67ffd65
Change loading script conditional
SantosGuillamot Apr 27, 2023
122a154
Fix issues momentarily
SantosGuillamot Apr 27, 2023
a6b1e62
Fix some issues with focus
SantosGuillamot Apr 27, 2023
e63c002
Add tabindex to modal
SantosGuillamot Apr 27, 2023
8f388df
Revert to current navigation block
SantosGuillamot Apr 27, 2023
938d57d
Add directives through a filter
SantosGuillamot Apr 27, 2023
1d0472d
Dont add latest modifications to navigation block
SantosGuillamot Apr 27, 2023
d5250fa
Ensure focus doesn't get inside menu after closing
SantosGuillamot Apr 27, 2023
3ae8097
Add conditionals and change function names
SantosGuillamot Apr 28, 2023
624bdb0
Use `gutenberg_is_experiment_enabled` function
SantosGuillamot Apr 28, 2023
ebba7b4
Add interactivity runtime
luisherranz Apr 21, 2023
af59781
Add it to the image block
luisherranz Apr 21, 2023
cca3d60
Add a separate webpack config
luisherranz Apr 21, 2023
160a029
Make sure the runtime is imported only once
luisherranz Apr 21, 2023
7f16f27
Use sideEffects instead of init
luisherranz Apr 21, 2023
f4b2ee8
Move script registration to a general file
luisherranz Apr 21, 2023
378b041
Add `defer` to the interactivity scripts
luisherranz Apr 21, 2023
409d161
Revert changes of the image block
luisherranz Apr 21, 2023
29e11ab
Fix init import name
luisherranz Apr 21, 2023
f4b6c0a
Move and refactor the interactive scritps registration
gziolo Apr 28, 2023
3d94473
Fix code style violations
gziolo Apr 28, 2023
6ae760f
Use `wp-interactivity-` prefix for script handles
gziolo Apr 28, 2023
9d6869e
Improve the matcher for side effects in `package.json`
gziolo Apr 28, 2023
3393bc2
Merge branch 'add-interactivity-runtime' into navigation-block-with-i…
SantosGuillamot May 3, 2023
32013ae
Enqueue interactivity scripts through hook
SantosGuillamot May 3, 2023
f829206
Revert `client-assets.php` file
SantosGuillamot May 3, 2023
3258326
Adapt to latest changes in base branch
SantosGuillamot May 3, 2023
c6d02d8
Add custom useSignalEffect
DAreRodz May 4, 2023
bb36577
Merge branch 'add-interactivity-runtime' into navigation-block-with-i…
SantosGuillamot May 4, 2023
9c95302
Move role attribute to selectors
SantosGuillamot May 4, 2023
af55917
Call `init` after `store` has been initialized
DAreRodz May 4, 2023
b58e6af
Merge branch 'add-interactivity-runtime' into navigation-block-with-i…
SantosGuillamot May 5, 2023
66b765c
Change focusable elements
SantosGuillamot May 5, 2023
7f1db8c
Add namespaces to context
SantosGuillamot May 5, 2023
79fd7b7
Move PHP file to interactivity-api folder
SantosGuillamot May 5, 2023
b553b04
Add comments with the markup to the PHP filter
SantosGuillamot May 5, 2023
182ed89
Remove micromodal attributes
SantosGuillamot May 5, 2023
5751344
Add interactivity runtime
luisherranz Apr 21, 2023
e8201c2
Add it to the image block
luisherranz Apr 21, 2023
df844f0
Add a separate webpack config
luisherranz Apr 21, 2023
d883391
Make sure the runtime is imported only once
luisherranz Apr 21, 2023
b1ea5e3
Use sideEffects instead of init
luisherranz Apr 21, 2023
20d6213
Move script registration to a general file
luisherranz Apr 21, 2023
6fb8aa7
Add `defer` to the interactivity scripts
luisherranz Apr 21, 2023
6c96509
Revert changes of the image block
luisherranz Apr 21, 2023
e843b80
Fix init import name
luisherranz Apr 21, 2023
cdf74b9
Move and refactor the interactive scritps registration
gziolo Apr 28, 2023
de0e874
Fix code style violations
gziolo Apr 28, 2023
fa7c00d
Use `wp-interactivity-` prefix for script handles
gziolo Apr 28, 2023
0d88c77
Improve the matcher for side effects in `package.json`
gziolo Apr 28, 2023
142050c
Add custom useSignalEffect
DAreRodz May 4, 2023
e65b91e
Call `init` after `store` has been initialized
DAreRodz May 4, 2023
9a31bb4
Update lib/experimental/interactivity-api/script-loader.php
gziolo May 5, 2023
0cdab08
Plugin: Ensure that translations are set correctly when overriding sc…
gziolo May 5, 2023
5dcf88e
Remove unnecessary comment in webpack config
SantosGuillamot May 5, 2023
5171e47
Merge branch 'add-interactivity-runtime' into navigation-block-with-i…
SantosGuillamot May 5, 2023
5af4b51
Clean up code to fix PHP coding standards issues
SantosGuillamot May 5, 2023
d4a16f3
Remove extra space
SantosGuillamot May 5, 2023
6f34728
Merge branch 'trunk' into navigation-block-with-interactivity-api
SantosGuillamot May 5, 2023
066d946
Add tests to the navigation block interactivity
SantosGuillamot May 8, 2023
91796b9
Modify `saveSiteEditorEntities` function to wait
SantosGuillamot May 8, 2023
c358346
Fix page-list tests
SantosGuillamot May 9, 2023
68b3dec
Remove e2e tests that are already included in trunk
gziolo May 9, 2023
c6ee68a
Fix the navigation menu when the overlay is not present
gziolo May 10, 2023
15d3546
Ensure that all scripts using Intereactivity API have defer attribute
gziolo May 10, 2023
4367b4d
Remove unused param in the callback used by hook
gziolo May 10, 2023
1626f90
Merge remote-tracking branch 'origin/trunk' into navigation-block-wit…
gziolo May 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert to current navigation block
  • Loading branch information
SantosGuillamot committed Apr 27, 2023
commit 8f388df4ee8a048073ee54e70dddd0b5be5bedce
82 changes: 12 additions & 70 deletions packages/block-library/src/navigation-submenu/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

/**
* Server-side rendering of the `core/navigation-submenu` block.
*
Expand Down Expand Up @@ -70,12 +69,6 @@ function block_core_navigation_submenu_render_submenu_icon() {
* @return string Returns the post content with the legacy widget added.
*/
function render_block_core_navigation_submenu( $attributes, $content, $block ) {
$is_interactivity_api_enabled = false;
$gutenberg_experiments = get_option( 'gutenberg-experiments' );
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-interactivity-api-navigation-block', $gutenberg_experiments ) ) {
$is_interactivity_api_enabled = true;
}

$navigation_link_has_id = isset( $attributes['id'] ) && is_numeric( $attributes['id'] );
$is_post_type = isset( $attributes['kind'] ) && 'post-type' === $attributes['kind'];
$is_post_type = $is_post_type || isset( $attributes['type'] ) && ( 'post' === $attributes['type'] || 'page' === $attributes['type'] );
Expand Down Expand Up @@ -106,8 +99,8 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
$wrapper_attributes = get_block_wrapper_attributes(
array(
'class' => $css_classes . ' wp-block-navigation-item' . ( $has_submenu ? ' has-child' : '' ) .
( $open_on_click ? ' open-on-click' : '' ) . ( $open_on_hover_and_click ? ' open-on-hover-click' : '' ) .
( $is_active ? ' current-menu-item' : '' ),
( $open_on_click ? ' open-on-click' : '' ) . ( $open_on_hover_and_click ? ' open-on-hover-click' : '' ) .
( $is_active ? ' current-menu-item' : '' ),
'style' => $style_attribute,
)
);
Expand All @@ -124,11 +117,7 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
wp_strip_all_tags( $label )
);

if ( $is_interactivity_api_enabled ) {
$html = '<li data-wp-context=\' { "isMenuOpen": false, "overlay": false } \'' . $wrapper_attributes . '>';
} else {
$html = '<li ' . $wrapper_attributes . '>';
}
$html = '<li ' . $wrapper_attributes . '>';

// If Submenus open on hover, we render an anchor tag with attributes.
// If submenu icons are set to show, we also render a submenu button, so the submenu can be opened on click.
Expand Down Expand Up @@ -175,45 +164,11 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
if ( $show_submenu_indicators ) {
// The submenu icon is rendered in a button here
// so that there's a clickable element to open the submenu.
if ( $is_interactivity_api_enabled ) {
// Once directives priorities are supported,
// we should be able to move the `wp-on.keydown`
// and `wp-on.focusout` to the parent <li> and
// remove it from here and the <ul>
$html .= '<button
data-wp-on.click="actions.core.navigation.openMenu"
data-wp-on.keydown="actions.core.navigation.handleMenuKeydown"
data-wp-on.focusout="actions.core.navigation.handleMenuFocusout"
aria-label="' . esc_attr( $aria_label ) . '"
class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle"
aria-expanded="false"
data-wp-bind.aria-expanded="context.isMenuOpen"
>'
. block_core_navigation_submenu_render_submenu_icon() .
'</button>';
} else {
$html .= '<button aria-label="' . esc_attr( $aria_label ) . '" class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">' . block_core_navigation_submenu_render_submenu_icon() . '</button>';
}
$html .= '<button aria-label="' . esc_attr( $aria_label ) . '" class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">' . block_core_navigation_submenu_render_submenu_icon() . '</button>';
}
} else {
// If menus open on click, we render the parent as a button.
if ( $is_interactivity_api_enabled ) {
// Once directives priorities are supported,
// we should be able to move the `wp-on.keydown`
// and `wp-on.focusout` to the parent <li> and
// remove it from here and the <ul>
$html .= '<button
data-wp-on.click="actions.core.navigation.openMenu"
data-wp-on.keydown="actions.core.navigation.handleMenuKeydown"
data-wp-on.focusout="actions.core.navigation.handleMenuFocusout"
aria-label="' . esc_attr( $aria_label ) . '"
class="wp-block-navigation-item__content wp-block-navigation-submenu__toggle"
aria-expanded="false"
data-wp-bind.aria-expanded="context.isMenuOpen"
>';
} else {
$html .= '<button aria-label="' . esc_attr( $aria_label ) . '" class="wp-block-navigation-item__content wp-block-navigation-submenu__toggle" aria-expanded="false">';
}
$html .= '<button aria-label="' . esc_attr( $aria_label ) . '" class="wp-block-navigation-item__content wp-block-navigation-submenu__toggle" aria-expanded="false">';

// Wrap title with span to isolate it from submenu icon.
$html .= '<span class="wp-block-navigation-item__label">';
Expand All @@ -225,6 +180,7 @@ class="wp-block-navigation-item__content wp-block-navigation-submenu__toggle"
$html .= '</button>';

$html .= '<span class="wp-block-navigation__submenu-icon">' . block_core_navigation_submenu_render_submenu_icon() . '</span>';

}

if ( $has_submenu ) {
Expand Down Expand Up @@ -276,26 +232,12 @@ class="wp-block-navigation-item__content wp-block-navigation-submenu__toggle"
)
);

if ( $is_interactivity_api_enabled ) {
$html .= sprintf(
'<ul
data-wp-effect="effects.core.navigation.initModal"
data-wp-on.focusout="actions.core.navigation.handleMenuFocusout"
data-wp-on.keydown="actions.core.navigation.handleMenuKeydown"
%s
>
%s
</ul>',
$wrapper_attributes,
$inner_blocks_html
);
} else {
$html .= sprintf(
'<ul %s>%s</ul>',
$wrapper_attributes,
$inner_blocks_html
);
}
$html .= sprintf(
'<ul %s>%s</ul>',
$wrapper_attributes,
$inner_blocks_html
);

}

$html .= '</li>';
Expand Down
160 changes: 43 additions & 117 deletions packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

/**
* Server-side rendering of the `core/navigation` block.
*
Expand Down Expand Up @@ -80,6 +79,9 @@ function block_core_navigation_sort_menu_items_by_parent_id( $menu_items ) {
* @return array An array of parsed block data.
*/
function block_core_navigation_parse_blocks_from_menu_items( $menu_items, $menu_items_by_parent_id ) {

_deprecated_function( __FUNCTION__, '6.3.0', 'WP_Navigation_Fallback_Gutenberg::parse_blocks_from_menu_items' );

if ( empty( $menu_items ) ) {
return array();
}
Expand Down Expand Up @@ -255,6 +257,9 @@ function block_core_navigation_render_submenu_icon() {
* @return object WP_Term The classic navigation.
*/
function block_core_navigation_get_classic_menu_fallback() {

_deprecated_function( __FUNCTION__, '6.3.0', 'WP_Navigation_Fallback_Gutenberg::get_classic_menu_fallback' );

$classic_nav_menus = wp_get_nav_menus();

// If menus exist.
Expand All @@ -280,7 +285,7 @@ function block_core_navigation_get_classic_menu_fallback() {
// Otherwise return the most recently created classic menu.
usort(
$classic_nav_menus,
function ( $a, $b ) {
function( $a, $b ) {
return $b->term_id - $a->term_id;
}
);
Expand All @@ -295,6 +300,9 @@ function ( $a, $b ) {
* @return array the normalized parsed blocks.
*/
function block_core_navigation_get_classic_menu_fallback_blocks( $classic_nav_menu ) {

_deprecated_function( __FUNCTION__, '6.3.0', 'WP_Navigation_Fallback_Gutenberg::get_classic_menu_fallback_blocks' );

// BEGIN: Code that already exists in wp_nav_menu().
$menu_items = wp_get_nav_menu_items( $classic_nav_menu->term_id, array( 'update_post_term_cache' => false ) );

Expand Down Expand Up @@ -331,6 +339,9 @@ function block_core_navigation_get_classic_menu_fallback_blocks( $classic_nav_me
* @return array the normalized parsed blocks.
*/
function block_core_navigation_maybe_use_classic_menu_fallback() {

_deprecated_function( __FUNCTION__, '6.3.0', 'WP_Navigation_Fallback_Gutenberg::create_classic_menu_fallback' );

// See if we have a classic menu.
$classic_nav_menu = block_core_navigation_get_classic_menu_fallback();

Expand Down Expand Up @@ -371,6 +382,9 @@ function block_core_navigation_maybe_use_classic_menu_fallback() {
* @return WP_Post|null the first non-empty Navigation or null.
*/
function block_core_navigation_get_most_recently_published_navigation() {

_deprecated_function( __FUNCTION__, '6.3.0', 'WP_Navigation_Fallback_Gutenberg::get_most_recently_published_navigation' );

// Default to the most recently created menu.
$parsed_args = array(
'post_type' => 'wp_navigation',
Expand Down Expand Up @@ -403,7 +417,7 @@ function block_core_navigation_get_most_recently_published_navigation() {
function block_core_navigation_filter_out_empty_blocks( $parsed_blocks ) {
$filtered = array_filter(
$parsed_blocks,
function ( $block ) {
function( $block ) {
return isset( $block['blockName'] );
}
);
Expand Down Expand Up @@ -452,14 +466,7 @@ function block_core_navigation_get_fallback_blocks() {
// If `core/page-list` is not registered then return empty blocks.
$fallback_blocks = $registry->is_registered( 'core/page-list' ) ? $page_list_fallback : array();

// Default to a list of Pages.
$navigation_post = block_core_navigation_get_most_recently_published_navigation();

// If there are no navigation posts then try to find a classic menu
// and convert it into a block based navigation menu.
if ( ! $navigation_post ) {
$navigation_post = block_core_navigation_maybe_use_classic_menu_fallback();
}
$navigation_post = WP_Navigation_Fallback_Gutenberg::get_fallback();

// Use the first non-empty Navigation as fallback if available.
if ( $navigation_post ) {
Expand Down Expand Up @@ -530,12 +537,6 @@ function block_core_navigation_from_block_get_post_ids( $block ) {
* @return string Returns the post content with the legacy widget added.
*/
function render_block_core_navigation( $attributes, $content, $block ) {
$is_interactivity_api_enabled = false;
$gutenberg_experiments = get_option( 'gutenberg-experiments' );
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-interactivity-api-navigation-block', $gutenberg_experiments ) ) {
$is_interactivity_api_enabled = true;
}

static $seen_menu_names = array();

// Flag used to indicate whether the rendered output is considered to be
Expand Down Expand Up @@ -566,7 +567,9 @@ function render_block_core_navigation( $attributes, $content, $block ) {
*/
$has_old_responsive_attribute = ! empty( $attributes['isResponsive'] ) && $attributes['isResponsive'];
$is_responsive_menu = isset( $attributes['overlayMenu'] ) && 'never' !== $attributes['overlayMenu'] || $has_old_responsive_attribute;
if ( $is_interactivity_api_enabled ) {

$gutenberg_experiments = get_option( 'gutenberg-experiments' );
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-interactivity-api-navigation-block', $gutenberg_experiments ) ) {
$should_load_interactivity_script = ! wp_script_is( 'wp-block-interactivity-navigation' ) && ( $is_responsive_menu || $attributes['openSubmenusOnClick'] || $attributes['showSubmenuIcon'] );
if ( $should_load_interactivity_script ) {
wp_enqueue_script(
Expand Down Expand Up @@ -751,7 +754,6 @@ function render_block_core_navigation( $attributes, $content, $block ) {
}

$inner_block_content = $inner_block->render();

if ( ! empty( $inner_block_content ) ) {
if ( in_array( $inner_block->name, $needs_list_item_wrapper, true ) ) {
$inner_blocks_html .= '<li class="wp-block-navigation-item">' . $inner_block_content . '</li>';
Expand Down Expand Up @@ -819,111 +821,35 @@ function render_block_core_navigation( $attributes, $content, $block ) {
$toggle_aria_label_open = $should_display_icon_label ? 'aria-label="' . __( 'Open menu' ) . '"' : ''; // Open button label.
$toggle_aria_label_close = $should_display_icon_label ? 'aria-label="' . __( 'Close menu' ) . '"' : ''; // Close button label.

if ( $is_interactivity_api_enabled ) {
$responsive_container_markup = sprintf(
// Once directives priorities are supported,
// we should be able to move the `wp-on.keydown`
// and `wp-on.focusout` to the parent <nav> and
// remove it from here and the <div>
'<button
data-wp-on.click="actions.core.navigation.openMenu"
data-wp-on.keydown="actions.core.navigation.handleMenuKeydown"
aria-haspopup="true"
%3$s
class="%6$s""
>
%9$s
</button>
<div
class="%5$s"
data-wp-class.has-modal-open="context.isMenuOpen"
data-wp-class.is-menu-open="context.isMenuOpen"
data-wp-bind.aria-hidden="!context.isMenuOpen"
data-wp-effect="effects.core.navigation.initModal"
data-wp-on.keydown="actions.core.navigation.handleMenuKeydown"
data-wp-on.focusout="actions.core.navigation.handleMenuFocusout"
style="%7$s"
id="%1$s"
tabindex="-1"
>
<div class="wp-block-navigation__responsive-close" tabindex="-1">
<div
class="wp-block-navigation__responsive-dialog"
aria-label="%8$s"
data-wp-bind.aria-modal="context.isMenuOpen"
data-wp-bind.role="context.roleAttribute"
data-wp-effect="effects.core.navigation.focusFirstElement"
>
<button
%4$s
class="wp-block-navigation__responsive-container-close"
data-wp-on.click="actions.core.navigation.closeMenu"
>
%10$s
</button>
$responsive_container_markup = sprintf(
'<button aria-haspopup="true" %3$s class="%6$s" data-micromodal-trigger="%1$s">%9$s</button>
<div class="%5$s" style="%7$s" id="%1$s">
<div class="wp-block-navigation__responsive-close" tabindex="-1" data-micromodal-close>
<div class="wp-block-navigation__responsive-dialog" aria-label="%8$s">
<button %4$s data-micromodal-close class="wp-block-navigation__responsive-container-close">%10$s</button>
<div class="wp-block-navigation__responsive-container-content" id="%1$s-content">
%2$s
</div>
</div>
</div>
</div>',
esc_attr( $modal_unique_id ),
$inner_blocks_html,
$toggle_aria_label_open,
$toggle_aria_label_close,
esc_attr( implode( ' ', $responsive_container_classes ) ),
esc_attr( implode( ' ', $open_button_classes ) ),
esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ),
__( 'Menu' ),
$toggle_button_content,
$toggle_close_button_content
);
} else {
$responsive_container_markup = sprintf(
'<button aria-haspopup="true" %3$s class="%6$s" data-micromodal-trigger="%1$s">%9$s</button>
<div class="%5$s" style="%7$s" id="%1$s">
<div class="wp-block-navigation__responsive-close" tabindex="-1" data-micromodal-close>
<div class="wp-block-navigation__responsive-dialog" aria-label="%8$s">
<button %4$s data-micromodal-close class="wp-block-navigation__responsive-container-close">%10$s</button>
<div class="wp-block-navigation__responsive-container-content" id="%1$s-content">
%2$s
</div>
</div>
</div>
</div>',
esc_attr( $modal_unique_id ),
$inner_blocks_html,
$toggle_aria_label_open,
$toggle_aria_label_close,
esc_attr( implode( ' ', $responsive_container_classes ) ),
esc_attr( implode( ' ', $open_button_classes ) ),
esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ),
__( 'Menu' ),
$toggle_button_content,
$toggle_close_button_content
);
}
esc_attr( $modal_unique_id ),
$inner_blocks_html,
$toggle_aria_label_open,
$toggle_aria_label_close,
esc_attr( implode( ' ', $responsive_container_classes ) ),
esc_attr( implode( ' ', $open_button_classes ) ),
esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ),
__( 'Menu' ),
$toggle_button_content,
$toggle_close_button_content
);

if ( $is_interactivity_api_enabled ) {
return sprintf(
'<nav
data-wp-island
data-wp-context=\'{ "isMenuOpen": false, "overlay": true, "roleAttribute": "" }\'
%2$s
>
%3$s
</nav>',
$modal_unique_id,
$wrapper_attributes,
$responsive_container_markup
);
} else {
return sprintf(
'<nav %1$s>%2$s</nav>',
$wrapper_attributes,
$responsive_container_markup
);
}
return sprintf(
'<nav %1$s>%2$s</nav>',
$wrapper_attributes,
$responsive_container_markup
);
}

/**
Expand Down
Loading