Changeset 31188 for trunk/src/wp-includes/class-wp-customize-manager.php
- Timestamp:
- 01/16/2015 01:05:52 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r31085 r31188 696 696 */ 697 697 public function add_setting( $id, $args = array() ) { 698 if ( is_a( $id, 'WP_Customize_Setting' ) )698 if ( $id instanceof WP_Customize_Setting ) { 699 699 $setting = $id; 700 else700 } else { 701 701 $setting = new WP_Customize_Setting( $this, $id, $args ); 702 702 } 703 703 $this->settings[ $setting->id ] = $setting; 704 704 } … … 738 738 */ 739 739 public function add_panel( $id, $args = array() ) { 740 if ( is_a( $id, 'WP_Customize_Panel' )) {740 if ( $id instanceof WP_Customize_Panel ) { 741 741 $panel = $id; 742 } 743 else { 742 } else { 744 743 $panel = new WP_Customize_Panel( $this, $id, $args ); 745 744 } … … 784 783 */ 785 784 public function add_section( $id, $args = array() ) { 786 if ( is_a( $id, 'WP_Customize_Section' ) )785 if ( $id instanceof WP_Customize_Section ) { 787 786 $section = $id; 788 else787 } else { 789 788 $section = new WP_Customize_Section( $this, $id, $args ); 790 789 } 791 790 $this->sections[ $section->id ] = $section; 792 791 } … … 826 825 */ 827 826 public function add_control( $id, $args = array() ) { 828 if ( is_a( $id, 'WP_Customize_Control' ) )827 if ( $id instanceof WP_Customize_Control ) { 829 828 $control = $id; 830 else829 } else { 831 830 $control = new WP_Customize_Control( $this, $id, $args ); 832 831 } 833 832 $this->controls[ $control->id ] = $control; 834 833 }
Note: See TracChangeset
for help on using the changeset viewer.