Changeset 45340
- Timestamp:
- 05/17/2019 02:21:20 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r45134 r45340 210 210 do_action( 'pre_get_search_form' ); 211 211 212 $format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';213 214 /*215 * Back compat: to ensure previous uses of get_search_form continue to216 * function as expected, we handle a value for the boolean $echo param removed217 * in 5.2.0. Then we deal with the $args array and cast its defaults.218 */219 212 $echo = true; 220 if ( false === $args ) {221 $echo = false;222 }223 213 224 214 if ( ! is_array( $args ) ) { 215 /* 216 * Back compat: to ensure previous uses of get_search_form() continue to 217 * function as expected, we handle a value for the boolean $echo param removed 218 * in 5.2.0. Then we deal with the $args array and cast its defaults. 219 */ 220 $echo = (bool) $args; 221 225 222 // Set an empty array and allow default arguments to take over. 226 223 $args = array(); … … 243 240 */ 244 241 $args = apply_filters( 'search_form_args', $args ); 242 243 $format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml'; 245 244 246 245 /**
Note: See TracChangeset
for help on using the changeset viewer.