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:
Daryl Koopersmith
2012-03-22 08:07:44 +00:00
parent c22a8a6cf6
commit 95ab797033
4 changed files with 72 additions and 12 deletions
+43 -3
View File
@@ -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 */