Skip to content

Commit 3f0530a

Browse files
committed
Rename OpenBy to OpenedBy
1 parent b5f06f2 commit 3f0530a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

packages/block-library/src/navigation/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function block_core_navigation_add_directives_to_submenu( $w, $block_attributes
103103
) ) {
104104
// Add directives to the parent `<li>`.
105105
$w->set_attribute( 'data-wp-interactive', true );
106-
$w->set_attribute( 'data-wp-context', '{ "core": { "navigation": { "submenuOpenBy": {}, "type": "submenu" } } }' );
106+
$w->set_attribute( 'data-wp-context', '{ "core": { "navigation": { "submenuOpenedBy": {}, "type": "submenu" } } }' );
107107
$w->set_attribute( 'data-wp-effect', 'effects.core.navigation.initMenu' );
108108
$w->set_attribute( 'data-wp-on--focusout', 'actions.core.navigation.handleMenuFocusout' );
109109
$w->set_attribute( 'data-wp-on--keydown', 'actions.core.navigation.handleMenuKeydown' );
@@ -711,7 +711,7 @@ function render_block_core_navigation( $attributes, $content, $block ) {
711711
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && $should_load_view_script ) {
712712
$nav_element_directives = '
713713
data-wp-interactive
714-
data-wp-context=\'{ "core": { "navigation": { "overlayOpenBy": {}, "type": "overlay", "roleAttribute": "" } } }\'
714+
data-wp-context=\'{ "core": { "navigation": { "overlayOpenedBy": {}, "type": "overlay", "roleAttribute": "" } } }\'
715715
';
716716
$open_button_directives = '
717717
data-wp-on--click="actions.core.navigation.openMenuOnClick"

packages/block-library/src/navigation/view.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ wpStore( {
8585
Object.values(
8686
context.core.navigation[
8787
context.core.navigation.type === 'overlay'
88-
? 'overlayOpenBy'
89-
: 'submenuOpenBy'
88+
? 'overlayOpenedBy'
89+
: 'submenuOpenedBy'
9090
]
9191
).filter( Boolean ).length > 0,
9292
menuOpenBy: ( { context } ) =>
9393
context.core.navigation[
9494
context.core.navigation.type === 'overlay'
95-
? 'overlayOpenBy'
96-
: 'submenuOpenBy'
95+
? 'overlayOpenedBy'
96+
: 'submenuOpenedBy'
9797
],
9898
},
9999
},
@@ -106,9 +106,9 @@ wpStore( {
106106
if (
107107
navigation.type === 'submenu' &&
108108
// Only open on hover if the overlay is closed.
109-
Object.values( navigation.overlayOpenBy || {} ).filter(
110-
Boolean
111-
).length === 0
109+
Object.values(
110+
navigation.overlayOpenedBy || {}
111+
).filter( Boolean ).length === 0
112112
)
113113
openMenu( store, 'hover' );
114114
},

0 commit comments

Comments
 (0)