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
This commit is contained in:
parent
6879033b3a
commit
9c0fc2fa0a
|
@ -534,13 +534,10 @@ final class WP_Customize {
|
||||||
// Input type: checkbox
|
// Input type: checkbox
|
||||||
// With custom value
|
// With custom value
|
||||||
$this->add_setting( 'header_image', array(
|
$this->add_setting( 'header_image', array(
|
||||||
'label' => 'Random Image',
|
'label' => 'Header Image',
|
||||||
'section' => 'header',
|
'section' => 'header',
|
||||||
'control' => 'checkbox',
|
'control' => 'upload',
|
||||||
// @todo
|
'default' => get_theme_support( 'custom-header', 'default-image' ),
|
||||||
// not the default, it's the value.
|
|
||||||
// value is saved in get_theme_support( 'custom-header', 'random-default' )
|
|
||||||
'default' => 'random-default-image'
|
|
||||||
) );
|
) );
|
||||||
|
|
||||||
/* Custom Background */
|
/* Custom Background */
|
||||||
|
|
|
@ -278,6 +278,10 @@
|
||||||
api( 'background_image', function( control ) {
|
api( 'background_image', function( control ) {
|
||||||
control.uploader.param( 'post_data[context]', 'custom-background' );
|
control.uploader.param( 'post_data[context]', 'custom-background' );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
api( 'header_image', function( control ) {
|
||||||
|
control.uploader.param( 'post_data[context]', 'custom-header' );
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
})( wp, jQuery );
|
})( wp, jQuery );
|
Loading…
Reference in New Issue