Make WordPress Core


Ignore:
Timestamp:
03/22/2012 08:07:44 AM (14 years ago)
Author:
koopersmith
Message:

Theme Customizer: Add background repeat, position, and attachment settings. Change visibility parameter to accept a string or array( , ). see #19910.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-customize-setting.php

    r20261 r20263  
    309309        $style = '';
    310310        if ( $this->visibility ) {
    311             $visibility_setting = $this->manager->get_setting( $this->visibility[0] );
    312             $visibility_value   = isset( $this->visibility[1] ) ? $this->visibility[1] : true;
     311            if ( is_string( $this->visibility ) ) {
     312                $visibility_id    = $this->visibility;
     313                $visibility_value = true;
     314            } else {
     315                $visibility_id    = $this->visibility[0];
     316                $visibility_value = $this->visibility[1];
     317            }
     318            $visibility_setting = $this->manager->get_setting( $visibility_id );
    313319
    314320            if ( $visibility_setting && $visibility_value != $visibility_setting->value() )
Note: See TracChangeset for help on using the changeset viewer.