Make WordPress Core


Ignore:
Timestamp:
03/22/2012 07:17:26 AM (13 years ago)
Author:
koopersmith
Message:

Theme Customizer: Add a WP_Customize_Setting->visibility parameter to show/hide a control based upon the value of another control. Also shifts rendering the setting wrapper element into WP_Customize_Setting->render() and adds WP_Customize_Setting->render_content(). see #19910.

File:
1 edited

Legend:

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

    r20248 r20260  
    105105            'control' => $setting->control,
    106106        );
     107
     108        if ( $setting->visibility ) {
     109            $settings['controls'][ $id ]['visibility'] = array(
     110                'id'    => $setting->visibility[0],
     111                'value' => isset( $setting->visibility[1] ) ? $setting->visibility[1] : true,
     112            );
     113        }
    107114    }
    108115
Note: See TracChangeset for help on using the changeset viewer.