Changeset 30014 for trunk/src/wp-includes/class-wp-customize-manager.php
- Timestamp:
- 10/24/2014 04:31:54 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r29903 r30014 55 55 56 56 /** 57 * Controls that may be rendered from JS templates. 58 * 59 * @since 4.1.0 60 */ 61 protected $registered_control_types = array(); 62 63 /** 57 64 * $_POST values for Customize Settings. 58 65 * … … 823 830 824 831 /** 832 * Register a customize control type. 833 * 834 * Registered types are eligible to be rendered 835 * via JS and created dynamically. 836 * 837 * @since 4.1.0 838 * 839 * @param string $control Name of a custom control which is a subclass of {@see WP_Customize_Control}. 840 */ 841 public function register_control_type( $control ) { 842 $this->registered_control_types[] = $control; 843 } 844 845 /** 846 * Render JS templates for all registered control types. 847 * 848 * @since 4.1.0 849 */ 850 public function render_control_templates() { 851 foreach( $this->registered_control_types as $control_type ) { 852 $control = new $control_type( $this, 'temp', array() ); 853 $control->print_template(); 854 } 855 } 856 857 /** 825 858 * Helper function to compare two objects by priority. 826 859 * … … 927 960 */ 928 961 public function register_controls() { 962 963 /* Control Types (custom control classes) */ 964 $this->register_control_type( 'WP_Customize_Color_Control' ); 929 965 930 966 /* Site Title & Tagline */
Note: See TracChangeset
for help on using the changeset viewer.