On this page
Custom_Image_Header::js()
Execute JavaScript depending on step.
Source
File: wp-admin/includes/class-custom-image-header.php. View all references
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();
}
}
Related
Uses
| Uses | Description |
|---|---|
| Custom_Image_Header::step() wp-admin/includes/class-custom-image-header.php | Get the current step. |
| Custom_Image_Header::js_1() wp-admin/includes/class-custom-image-header.php | Display JavaScript based on Step 1 and 3. |
| Custom_Image_Header::js_2() wp-admin/includes/class-custom-image-header.php | Display JavaScript based on Step 2. |
| current_theme_supports() wp-includes/theme.php | Checks a theme’s support for a given feature. |
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/custom_image_header/js