Accessibility: In back-compat code added for `get_search_form()` in [44956], when checking the (previously boolean) `$args` value, account for non-strict comparison.
Props dkarfa, sachyya-sachet. Fixes #47177. See #42057. Built from https://develop.svn.wordpress.org/trunk@45340 git-svn-id: http://core.svn.wordpress.org/trunk@45151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
00255ae0be
commit
e06afa8a80
|
@ -209,19 +209,16 @@ function get_search_form( $args = array() ) {
|
|||
*/
|
||||
do_action( 'pre_get_search_form' );
|
||||
|
||||
$format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';
|
||||
$echo = true;
|
||||
|
||||
if ( ! is_array( $args ) ) {
|
||||
/*
|
||||
* Back compat: to ensure previous uses of get_search_form continue to
|
||||
* Back compat: to ensure previous uses of get_search_form() continue to
|
||||
* function as expected, we handle a value for the boolean $echo param removed
|
||||
* in 5.2.0. Then we deal with the $args array and cast its defaults.
|
||||
*/
|
||||
$echo = true;
|
||||
if ( false === $args ) {
|
||||
$echo = false;
|
||||
}
|
||||
$echo = (bool) $args;
|
||||
|
||||
if ( ! is_array( $args ) ) {
|
||||
// Set an empty array and allow default arguments to take over.
|
||||
$args = array();
|
||||
}
|
||||
|
@ -243,6 +240,8 @@ function get_search_form( $args = array() ) {
|
|||
*/
|
||||
$args = apply_filters( 'search_form_args', $args );
|
||||
|
||||
$format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';
|
||||
|
||||
/**
|
||||
* Filters the HTML format of the search form.
|
||||
*
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-alpha-45338';
|
||||
$wp_version = '5.3-alpha-45340';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue