Make WordPress Core

Ticket #27278: 27278.6.diff

File 27278.6.diff, 1.0 KB (added by jond3r, 11 years ago)

A minimal patch. Only adding comment.

  • src/wp-includes/theme.php

     
    13791379 * The init hook may be too late for some features.
    13801380 *
    13811381 * @since 2.9.0
    1382  * @param string $feature the feature being added
     1382 * @param string $feature The feature being added.
     1383 * @return mixed False if $feature is 'html5' and not passing an array as 2nd argument (empty 2nd arg is deprecated usage).
    13831384 */
    13841385function add_theme_support( $feature ) {
    13851386        global $_wp_theme_features;
     
    13981399                case 'html5' :
    13991400                        // You can't just pass 'html5', you need to pass an array of types.
    14001401                        if ( empty( $args[0] ) ) {
     1402                                // This is deprecated usage, only here for back compat
    14011403                                $args = array( 0 => array( 'comment-list', 'comment-form', 'search-form' ) );
    14021404                        } elseif ( ! is_array( $args[0] ) ) {
    14031405                                _doing_it_wrong( "add_theme_support( 'html5' )", 'You need to pass an array of types.', '3.6.1' );