Revert [23467]. Removes structured-post-format theme support.
see #23347, #24452. closes #24453. git-svn-id: https://develop.svn.wordpress.org/trunk@24386 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c436a18bbc
commit
234bebef0b
@ -1259,17 +1259,9 @@ function add_theme_support( $feature ) {
|
|||||||
$args = array_slice( func_get_args(), 1 );
|
$args = array_slice( func_get_args(), 1 );
|
||||||
|
|
||||||
switch ( $feature ) {
|
switch ( $feature ) {
|
||||||
case 'structured-post-formats' :
|
|
||||||
if ( is_array( $args[0] ) )
|
|
||||||
$args[0] = array_intersect( $args[0], get_post_format_slugs() );
|
|
||||||
// structured-post-formats support automatically adds support for post-formats.
|
|
||||||
$_wp_theme_features['post-formats'] = $args;
|
|
||||||
case 'post-formats' :
|
case 'post-formats' :
|
||||||
// An existing structured-post-formats support declaration overrides post-formats.
|
if ( is_array( $args[0] ) )
|
||||||
if ( current_theme_supports( 'structured-post-formats' ) )
|
$args[0] = array_intersect( $args[0], array_keys( get_post_format_slugs() ) );
|
||||||
$args = get_theme_support( 'structured-post-formats' );
|
|
||||||
elseif ( is_array( $args[0] ) )
|
|
||||||
$args[0] = array_intersect( $args[0], get_post_format_slugs() );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'custom-header-uploads' :
|
case 'custom-header-uploads' :
|
||||||
@ -1555,7 +1547,6 @@ function current_theme_supports( $feature ) {
|
|||||||
return in_array( $content_type, $_wp_theme_features[$feature][0] );
|
return in_array( $content_type, $_wp_theme_features[$feature][0] );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'structured-post-formats':
|
|
||||||
case 'post-formats':
|
case 'post-formats':
|
||||||
// specific post formats can be registered by passing an array of types to
|
// specific post formats can be registered by passing an array of types to
|
||||||
// add_theme_support()
|
// add_theme_support()
|
||||||
|
Loading…
Reference in New Issue
Block a user