Make WordPress Core

Ticket #24932: 24392.diff

File 24392.diff, 2.4 KB (added by nathanrice, 11 years ago)
  • wp-includes/theme.php

     
    15271527        if ( 'custom-header-uploads' == $feature )
    15281528                return current_theme_supports( 'custom-header', 'uploads' );
    15291529
    1530         if ( !isset( $_wp_theme_features[$feature] ) )
     1530        if ( ! isset( $_wp_theme_features[$feature] ) )
    15311531                return false;
    15321532
    15331533        // If no args passed then no extra checks need be performed
     
    15411541                        // post-thumbnails can be registered for only certain content/post types by passing
    15421542                        // an array of types to add_theme_support(). If no array was passed, then
    15431543                        // any type is accepted
    1544                         if ( true === $_wp_theme_features[$feature] )  // Registered for all types
     1544                        if ( true === $_wp_theme_features[ $feature ] )  // Registered for all types
    15451545                                return true;
    15461546                        $content_type = $args[0];
    1547                         return in_array( $content_type, $_wp_theme_features[$feature][0] );
     1547                        return in_array( $content_type, $_wp_theme_features[ $feature ][0] );
    15481548                        break;
    15491549
    15501550                case 'post-formats':
    15511551                        // specific post formats can be registered by passing an array of types to
    15521552                        // add_theme_support()
    15531553                        $post_format = $args[0];
    1554                         return in_array( $post_format, $_wp_theme_features[$feature][0] );
     1554                        return in_array( $post_format, $_wp_theme_features[ $feature ][0] );
    15551555                        break;
    15561556
    15571557                case 'custom-header':
     
    15591559                        // specific custom header and background capabilities can be registered by passing
    15601560                        // an array to add_theme_support()
    15611561                        $header_support = $args[0];
    1562                         return ( isset( $_wp_theme_features[$feature][0][$header_support] ) && $_wp_theme_features[$feature][0][$header_support] );
     1562                        return ( isset( $_wp_theme_features[ $feature ][0][ $header_support ] ) && $_wp_theme_features[ $feature ][0][ $header_support ] );
    15631563                        break;
     1564
     1565                case 'html5':
     1566                        // just in case someone didn't pass an array to add_theme_support()
     1567                        if ( ! is_array( $_wp_theme_features[ $feature ][0] ) )
     1568                                return false;
     1569                        // specific features can be output in html5 by passing an array to add_theme_support()
     1570                        return in_array( $args[0], $_wp_theme_features[ $feature ][0] );
     1571                        break;
     1572
    15641573        }
    15651574
    1566         return apply_filters('current_theme_supports-' . $feature, true, $args, $_wp_theme_features[$feature]);
     1575        return apply_filters( 'current_theme_supports-' . $feature, true, $args, $_wp_theme_features[ $feature ] );
    15671576}
    15681577
    15691578/**