diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 9effbadcd5..feec9b3de4 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -2607,16 +2607,19 @@ function add_theme_support( $feature, ...$args ) { case 'html5': // You can't just pass 'html5', you need to pass an array of types. - if ( empty( $args[0] ) ) { - // Build an array of types for back-compat. - $args = array( 0 => array( 'comment-list', 'comment-form', 'search-form' ) ); - } elseif ( ! isset( $args[0] ) || ! is_array( $args[0] ) ) { + if ( empty( $args[0] ) || ! is_array( $args[0] ) ) { _doing_it_wrong( "add_theme_support( 'html5' )", __( 'You need to pass an array of types.' ), '3.6.1' ); - return false; + + if ( ! empty( $args[0] ) && ! is_array( $args[0] ) ) { + return false; + } + + // Build an array of types for back-compat. + $args = array( 0 => array( 'comment-list', 'comment-form', 'search-form' ) ); } // Calling 'html5' again merges, rather than overwrites. diff --git a/wp-includes/version.php b/wp-includes/version.php index 290dfa1543..21c7d411db 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-52827'; +$wp_version = '6.0-alpha-52828'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.