Make WordPress Core


Ignore:
Timestamp:
02/13/2024 01:10:05 PM (7 months ago)
Author:
youknowriad
Message:

Editor: Update Packages with the latest bug fixes for 6.5 beta1.

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/58964

Props youknowriad, get_dave.
See #60315.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/search.php

    r57578 r57619  
    4848    // This variable is a constant and its value is always false at this moment.
    4949    // 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;
    5151
    5252    $label_inner_html = empty( $attributes['label'] ) ? __( 'Search' ) : wp_kses_post( $attributes['label'] );
     
    180180        $aria_label_expanded  = __( 'Submit Search' );
    181181        $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        );
    182190        $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             data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
    186             data-wp-on--keydown="actions.handleSearchKeydown"
    187             data-wp-on--focusout="actions.handleSearchFocusout"
     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"
    188196        ';
    189197    }
Note: See TracChangeset for help on using the changeset viewer.