Skip to content

Commit

Permalink
Removed gutenberg_ for IS_GUTENBERG_PLUGIN only method
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Jun 27, 2023
1 parent 47908c7 commit d766b45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function block_core_navigation_sort_menu_items_by_parent_id( $menu_items ) {
*
* @return string Submenu markup with the directives injected.
*/
function gutenberg_block_core_navigation_add_directives_to_submenu( $w, $block_attributes ) {
function block_core_navigation_add_directives_to_submenu( $w, $block_attributes ) {
while ( $w->next_tag(
array(
'tag_name' => 'LI',
Expand Down Expand Up @@ -124,7 +124,7 @@ function gutenberg_block_core_navigation_add_directives_to_submenu( $w, $block_a
};

// Iterate through subitems if exist.
gutenberg_block_core_navigation_add_directives_to_submenu( $w, $block_attributes );
block_core_navigation_add_directives_to_submenu( $w, $block_attributes );
}
return $w->get_updated_html();
};
Expand Down Expand Up @@ -677,7 +677,7 @@ function render_block_core_navigation( $attributes, $content, $block ) {
// Add directives to the submenu if needed.
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && $has_submenus && $should_load_view_script ) {
$w = new WP_HTML_Tag_Processor( $inner_blocks_html );
$inner_blocks_html = gutenberg_block_core_navigation_add_directives_to_submenu( $w, $attributes );
$inner_blocks_html = block_core_navigation_add_directives_to_submenu( $w, $attributes );
}

$modal_unique_id = wp_unique_id( 'modal-' );
Expand Down

0 comments on commit d766b45

Please sign in to comment.