Ticket #24932: 24392.diff
File 24392.diff, 2.4 KB (added by , 11 years ago) |
---|
-
wp-includes/theme.php
1527 1527 if ( 'custom-header-uploads' == $feature ) 1528 1528 return current_theme_supports( 'custom-header', 'uploads' ); 1529 1529 1530 if ( ! isset( $_wp_theme_features[$feature] ) )1530 if ( ! isset( $_wp_theme_features[$feature] ) ) 1531 1531 return false; 1532 1532 1533 1533 // If no args passed then no extra checks need be performed … … 1541 1541 // post-thumbnails can be registered for only certain content/post types by passing 1542 1542 // an array of types to add_theme_support(). If no array was passed, then 1543 1543 // any type is accepted 1544 if ( true === $_wp_theme_features[ $feature] ) // Registered for all types1544 if ( true === $_wp_theme_features[ $feature ] ) // Registered for all types 1545 1545 return true; 1546 1546 $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] ); 1548 1548 break; 1549 1549 1550 1550 case 'post-formats': 1551 1551 // specific post formats can be registered by passing an array of types to 1552 1552 // add_theme_support() 1553 1553 $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] ); 1555 1555 break; 1556 1556 1557 1557 case 'custom-header': … … 1559 1559 // specific custom header and background capabilities can be registered by passing 1560 1560 // an array to add_theme_support() 1561 1561 $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 ] ); 1563 1563 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 1564 1573 } 1565 1574 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 ] ); 1567 1576 } 1568 1577 1569 1578 /**