Ticket #23347: 23347.8.diff
File 23347.8.diff, 1.2 KB (added by , 11 years ago) |
---|
-
wp-includes/theme.php
1257 1257 $args = array_slice( func_get_args(), 1 ); 1258 1258 1259 1259 switch ( $feature ) { 1260 case ' post-formats' :1260 case 'structured-post-formats' : 1261 1261 if ( is_array( $args[0] ) ) 1262 1262 $args[0] = array_intersect( $args[0], array_keys( get_post_format_slugs() ) ); 1263 // structured-post-formats support automatically adds support for post-formats. 1264 $_wp_theme_features['post-formats'] = $args; 1265 case 'post-formats' : 1266 // An existing structured-post-formats support declaration overrides post-formats. 1267 if ( current_theme_supports( 'structured-post-formats' ) ) 1268 $args = get_theme_support( 'structured-post-formats' ); 1269 elseif ( is_array( $args[0] ) ) 1270 $args[0] = array_intersect( $args[0], array_keys( get_post_format_slugs() ) ); 1263 1271 break; 1264 1272 1265 1273 case 'custom-header-uploads' : … … 1545 1553 return in_array( $content_type, $_wp_theme_features[$feature][0] ); 1546 1554 break; 1547 1555 1556 case 'structured-post-formats': 1548 1557 case 'post-formats': 1549 1558 // specific post formats can be registered by passing an array of types to 1550 1559 // add_theme_support()