WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Action Reference/customize controls enqueue scripts

Description

customize_controls_enqueue_scripts is action hook triggered after the WP Theme Customizer after customize_controls_init was called, its actions/callbacks executed, and its own styles and scripts enqueued, so you can use this hook to register your own scripts and styles for WP Theme Customizer.

Usage

<?php add_action( 'customize_controls_enqueue_scripts', 'function_name' ); ?>

where "function_name" is the name of the function to be called.

Parameters

This action hook doesn't have parameters.

Example

/**
 * Enqueue script for custom customize control.
 */
function custom_customize_enqueue() {
	wp_enqueue_script( 'custom-customize', get_template_directory_uri() . '/js/custom.customize.js', array( 'jquery', 'customize-controls' ), false, true );
}
add_action( 'customize_controls_enqueue_scripts', 'custom_customize_enqueue' );

Source File

The customize_controls_enqueue_scripts hook is found in wp-admin/customize.php.