Custom_Image_Header::js_includes() WordPress Method

The Custom_Image_Header::js_includes() method includes the necessary JavaScript files for managing the custom image header on the WordPress Administration Settings page. This method is called by the Custom_Image_Header::admin_head() method.

Custom_Image_Header::js_includes() #

Set up the enqueue for the JavaScript files.


Source

File: wp-admin/includes/class-custom-image-header.php

	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' );
		}
	}


Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.