Preview by default the registered default image for custom backgrounds. props mfields, billerickson.

If there is a default color registered, show a 'Default' action rather than a 'Clear' action, as clearing the value would simply return to the default.

Make current_theme_supports() accept a second argument for 'custom-background' requests, the same as get_theme_support(). Missed in earlier changes, see #20249.

fixes #20734, fixes #18041.



git-svn-id: https://develop.svn.wordpress.org/trunk@20901 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-05-25 17:58:57 +00:00
parent efefd513c3
commit 85eb57bd89
3 changed files with 66 additions and 56 deletions

View File

@@ -1501,7 +1501,8 @@ function current_theme_supports( $feature ) {
break;
case 'custom-header':
// specific custom header capabilities can be registered by passing
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] );