Changeset 57619 for trunk/src/wp-includes/blocks/search.php
- Timestamp:
- 02/13/2024 01:10:05 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/search.php
r57578 r57619 48 48 // This variable is a constant and its value is always false at this moment. 49 49 // It is defined this way because some values depend on it, in case it changes in the future. 50 $open_by_default = 'false';50 $open_by_default = false; 51 51 52 52 $label_inner_html = empty( $attributes['label'] ) ? __( 'Search' ) : wp_kses_post( $attributes['label'] ); … … 180 180 $aria_label_expanded = __( 'Submit Search' ); 181 181 $aria_label_collapsed = __( 'Expand search field' ); 182 $form_context = data_wp_context( 183 array( 184 'isSearchInputVisible' => $open_by_default, 185 'inputId' => $input_id, 186 'ariaLabelExpanded' => $aria_label_expanded, 187 'ariaLabelCollapsed' => $aria_label_collapsed, 188 ) 189 ); 182 190 $form_directives = ' 183 data-wp-interactive=\'{ "namespace": "core/search" }\'184 data-wp-context=\'{ "isSearchInputVisible": ' . $open_by_default . ', "inputId": "' . $input_id . '", "ariaLabelExpanded": "' . $aria_label_expanded . '", "ariaLabelCollapsed": "' . $aria_label_collapsed . '" }\'185 186 187 191 data-wp-interactive=\'"core/search"\'' 192 . $form_context . 193 'data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible" 194 data-wp-on--keydown="actions.handleSearchKeydown" 195 data-wp-on--focusout="actions.handleSearchFocusout" 188 196 '; 189 197 }
Note: See TracChangeset
for help on using the changeset viewer.