Custom_Image_Header::js() WordPress Method

The Custom_Image_Header::js() method is used to enqueue the necessary Javascript files for the custom image header feature. This method should be called from the 'wp_enqueue_scripts' action.

Custom_Image_Header::js() #

Execute JavaScript depending on step.


Source

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

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

		if ( ( 1 === $step || 3 === $step ) && current_theme_supports( 'custom-header', 'header-text' ) ) {
			$this->js_1();
		} elseif ( 2 === $step ) {
			$this->js_2();
		}
	}


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.