On this page
Custom_Image_Header::step(): int
Get the current step.
Return
int Current step.
Source
File: wp-admin/includes/class-custom-image-header.php. View all references
public function step() {
if ( ! isset( $_GET['step'] ) ) {
return 1;
}
$step = (int) $_GET['step'];
if ( $step < 1 || 3 < $step ||
( 2 === $step && ! wp_verify_nonce( $_REQUEST['_wpnonce-custom-header-upload'], 'custom-header-upload' ) ) ||
( 3 === $step && ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'custom-header-crop-image' ) )
) {
return 1;
}
return $step;
}
Related
Uses
| Uses | Description |
|---|---|
| wp_verify_nonce() wp-includes/pluggable.php | Verifies that a correct security nonce was used with time limit. |
Used By
| Used By | Description |
|---|---|
| Custom_Image_Header::admin_page() wp-admin/includes/class-custom-image-header.php | Display the page based on the current step. |
| Custom_Image_Header::js_includes() wp-admin/includes/class-custom-image-header.php | Set up the enqueue for the JavaScript files. |
| Custom_Image_Header::css_includes() wp-admin/includes/class-custom-image-header.php | Set up the enqueue for the CSS files |
| Custom_Image_Header::js() wp-admin/includes/class-custom-image-header.php | Execute JavaScript depending on step. |
Changelog
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/custom_image_header/step