From 9c0fc2fa0a81822e864e96673a0a19506004a696 Mon Sep 17 00:00:00 2001 From: koopersmith Date: Fri, 23 Mar 2012 22:43:00 +0000 Subject: [PATCH] Theme Customizer: Change 'Random Image' control to be a proper 'Header Image' control. First step to integrating header images. see #19910. git-svn-id: http://svn.automattic.com/wordpress/trunk@20274 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize.php | 9 +++------ wp-includes/js/customize-controls.dev.js | 4 ++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/wp-includes/class-wp-customize.php b/wp-includes/class-wp-customize.php index 9eabe31048..e97c547b43 100644 --- a/wp-includes/class-wp-customize.php +++ b/wp-includes/class-wp-customize.php @@ -534,13 +534,10 @@ final class WP_Customize { // Input type: checkbox // With custom value $this->add_setting( 'header_image', array( - 'label' => 'Random Image', + 'label' => 'Header Image', 'section' => 'header', - 'control' => 'checkbox', - // @todo - // not the default, it's the value. - // value is saved in get_theme_support( 'custom-header', 'random-default' ) - 'default' => 'random-default-image' + 'control' => 'upload', + 'default' => get_theme_support( 'custom-header', 'default-image' ), ) ); /* Custom Background */ diff --git a/wp-includes/js/customize-controls.dev.js b/wp-includes/js/customize-controls.dev.js index 315211ec9e..79c64cfa0f 100644 --- a/wp-includes/js/customize-controls.dev.js +++ b/wp-includes/js/customize-controls.dev.js @@ -278,6 +278,10 @@ api( 'background_image', function( control ) { control.uploader.param( 'post_data[context]', 'custom-background' ); }); + + api( 'header_image', function( control ) { + control.uploader.param( 'post_data[context]', 'custom-header' ); + }); }); })( wp, jQuery ); \ No newline at end of file