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
+8 -2
View File
@@ -308,8 +308,14 @@ class WP_Customize_Setting {
$style = '';
if ( $this->visibility ) {
$visibility_setting = $this->manager->get_setting( $this->visibility[0] );
$visibility_value = isset( $this->visibility[1] ) ? $this->visibility[1] : true;
if ( is_string( $this->visibility ) ) {
$visibility_id = $this->visibility;
$visibility_value = true;
} else {
$visibility_id = $this->visibility[0];
$visibility_value = $this->visibility[1];
}
$visibility_setting = $this->manager->get_setting( $visibility_id );
if ( $visibility_setting && $visibility_value != $visibility_setting->value() )
$style = 'style="display:none;"';