Changeset 20260 for trunk/wp-includes/class-wp-customize-setting.php
- Timestamp:
- 03/22/2012 07:17:26 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-customize-setting.php
r20254 r20260 21 21 public $default = ''; 22 22 public $sanitize_callback = ''; 23 public $visibility; 23 24 24 25 protected $id_data = array(); … … 297 298 298 299 /** 299 * Render the control. 300 * Render the control. Renders the control wrapper, then calls $this->render_content(). 300 301 * 301 302 * @since 3.4.0 302 303 */ 303 304 protected function render() { 305 306 $id = 'customize-control-' . $this->id; 307 $class = 'customize-control customize-control-' . $this->control; 308 309 $style = ''; 310 if ( $this->visibility ) { 311 $visibility_setting = $this->manager->get_setting( $this->visibility[0] ); 312 $visibility_value = isset( $this->visibility[1] ) ? $this->visibility[1] : true; 313 314 if ( $visibility_setting && $visibility_value != $visibility_setting->value() ) 315 $style = 'style="display:none;"'; 316 } 317 318 ?><li id="<?php echo esc_attr( $id ); ?>" class="<?php echo esc_attr( $class ); ?>" <?php echo $style; ?>> 319 <?php $this->render_content(); ?> 320 </li><?php 321 } 322 323 /** 324 * Render the control's content. 325 * 326 * Allows the content to be overriden without having to rewrite the wrapper. 327 * 328 * @since 3.4.0 329 */ 330 protected function render_content() { 304 331 switch( $this->control ) { 305 332 case 'text':
Note: See TracChangeset
for help on using the changeset viewer.