WP_Customize_Manager::enqueue_control_scripts() WordPress Method
The WordPress Customize Manager enables theme developers to add settings to the WordPress Customizer and live preview them on the frontend of the site. In addition to settings, controls can also be added to the Customizer. Controls are responsible for rendering the UI for a setting, and they can be modified to support different types of input, such as text, checkboxes, radio buttons, select lists, or even custom code. The enqueue_control_scripts() method is used to load the scripts for a control. This method should be called from the control's constructor.
WP_Customize_Manager::enqueue_control_scripts() #
Enqueues scripts for customize controls.
Source
File: wp-includes/class-wp-customize-manager.php
public function enqueue_control_scripts() { foreach ( $this->controls as $control ) { $control->enqueue(); } if ( ! is_multisite() && ( current_user_can( 'install_themes' ) || current_user_can( 'update_themes' ) || current_user_can( 'delete_themes' ) ) ) { wp_enqueue_script( 'updates' ); wp_localize_script( 'updates', '_wpUpdatesItemCounts', array( 'totals' => wp_get_update_data(), ) ); } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |