Theme Customizer: Change 'Random Image' control to be a proper 'Header Image' control. First step to integrating header images. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20274 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b87fb24f21
commit
c41689115f
|
@ -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 */
|
||||
|
|
|
@ -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 );
|
Loading…
Reference in New Issue