mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Theme Customizer: Add background repeat, position, and attachment settings. Change visibility parameter to accept a string or array( , ). see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20263 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -561,9 +561,49 @@ final class WP_Customize {
|
||||
) );
|
||||
|
||||
$this->add_setting( 'background_image', array(
|
||||
'label' => 'Background Image',
|
||||
'section' => 'background',
|
||||
'control' => 'upload',
|
||||
'label' => 'Background Image',
|
||||
'section' => 'background',
|
||||
'control' => 'upload',
|
||||
'default' => get_theme_support( 'custom-background', 'default-image' ),
|
||||
) );
|
||||
|
||||
$this->add_setting( 'background_repeat', array(
|
||||
'label' => 'Background Repeat',
|
||||
'section' => 'background',
|
||||
'visibility' => 'background_image',
|
||||
'control' => 'radio',
|
||||
'choices' => array(
|
||||
'no-repeat' => __('No Repeat'),
|
||||
'repeat' => __('Tile'),
|
||||
'repeat-x' => __('Tile Horizontally'),
|
||||
'repeat-y' => __('Tile Vertically'),
|
||||
),
|
||||
'default' => 'repeat',
|
||||
) );
|
||||
|
||||
$this->add_setting( 'background_position_x', array(
|
||||
'label' => 'Background Position',
|
||||
'section' => 'background',
|
||||
'visibility' => 'background_image',
|
||||
'control' => 'radio',
|
||||
'choices' => array(
|
||||
'left' => __('Left'),
|
||||
'center' => __('Center'),
|
||||
'right' => __('Right'),
|
||||
),
|
||||
'default' => 'left',
|
||||
) );
|
||||
|
||||
$this->add_setting( 'background_attachment', array(
|
||||
'label' => 'Background Attachment',
|
||||
'section' => 'background',
|
||||
'visibility' => 'background_image',
|
||||
'control' => 'radio',
|
||||
'choices' => array(
|
||||
'fixed' => __('Fixed'),
|
||||
'scroll' => __('Scroll'),
|
||||
),
|
||||
'default' => 'fixed',
|
||||
) );
|
||||
|
||||
/* Nav Menus */
|
||||
|
||||
Reference in New Issue
Block a user