From 57686e8b5ddfd5ff1016c0dc889d4b0d2763dee8 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Wed, 9 Mar 2016 21:50:37 +0000 Subject: [PATCH] Themes: Support second argument in theme support for custom logo. See #33755. git-svn-id: https://develop.svn.wordpress.org/trunk@36909 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/theme.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php index 1727a17711..ba0efbd6d3 100644 --- a/src/wp-includes/theme.php +++ b/src/wp-includes/theme.php @@ -1751,6 +1751,7 @@ function get_theme_support( $feature ) { $args = array_slice( func_get_args(), 1 ); switch ( $feature ) { + case 'custom-logo' : case 'custom-header' : case 'custom-background' : if ( isset( $_wp_theme_features[ $feature ][0][ $args[0] ] ) ) @@ -1877,12 +1878,11 @@ function current_theme_supports( $feature ) { $type = $args[0]; return in_array( $type, $_wp_theme_features[$feature][0] ); + case 'custom-logo': case 'custom-header': - case 'custom-background' : - // specific custom header and background capabilities can be registered by passing - // an array to add_theme_support() - $header_support = $args[0]; - return ( isset( $_wp_theme_features[$feature][0][$header_support] ) && $_wp_theme_features[$feature][0][$header_support] ); + case 'custom-background': + // Specific capabilities can be registered by passing an array to add_theme_support(). + return ( isset( $_wp_theme_features[ $feature ][0][ $args[0] ] ) && $_wp_theme_features[ $feature ][0][ $args[0] ] ); } /**