mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
General: Ensure that filtered arguments in get_search_form()
contain all required default values.
Props kellybleck, davidbaumwald, whyisjake, SergeyBiryukov. Merges [49355] to the 5.5 branch. Fixes #51645. Built from https://develop.svn.wordpress.org/branches/5.5@49356 git-svn-id: http://core.svn.wordpress.org/branches/5.5@49116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ecd6a4c549
commit
321e099745
@ -2480,7 +2480,7 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||
*/
|
||||
$args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
|
||||
|
||||
// Ensure that the filtered args contain all required default values.
|
||||
// Ensure that the filtered arguments contain all required default values.
|
||||
$args = array_merge( $defaults, $args );
|
||||
|
||||
// Remove `aria-describedby` from the email field if there's no associated description.
|
||||
|
@ -281,6 +281,9 @@ function get_search_form( $args = array() ) {
|
||||
*/
|
||||
$args = apply_filters( 'search_form_args', $args );
|
||||
|
||||
// Ensure that the filtered arguments contain all required default values.
|
||||
$args = array_merge( $defaults, $args );
|
||||
|
||||
$format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';
|
||||
|
||||
/**
|
||||
@ -303,7 +306,7 @@ function get_search_form( $args = array() ) {
|
||||
$form = ob_get_clean();
|
||||
} else {
|
||||
// Build a string containing an aria-label to use for the search form.
|
||||
if ( isset( $args['aria_label'] ) && $args['aria_label'] ) {
|
||||
if ( $args['aria_label'] ) {
|
||||
$aria_label = 'aria-label="' . esc_attr( $args['aria_label'] ) . '" ';
|
||||
} else {
|
||||
/*
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5.2-alpha-49340';
|
||||
$wp_version = '5.5.2-alpha-49356';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user