Custom_Image_Header::js_includes()publicWP 2.1.0

Sets up the enqueue for the JavaScript files.

Method of the class: Custom_Image_Header{}

No Hooks.

Return

null. Nothing (null).

Usage

$Custom_Image_Header = new Custom_Image_Header();
$Custom_Image_Header->js_includes();

Changelog

Since 2.1.0 Introduced.

Custom_Image_Header::js_includes() code WP 6.5.2

public function js_includes() {
	$step = $this->step();

	if ( ( 1 === $step || 3 === $step ) ) {
		wp_enqueue_media();
		wp_enqueue_script( 'custom-header' );
		if ( current_theme_supports( 'custom-header', 'header-text' ) ) {
			wp_enqueue_script( 'wp-color-picker' );
		}
	} elseif ( 2 === $step ) {
		wp_enqueue_script( 'imgareaselect' );
	}
}