Custom_Image_Header::step() WordPress Method

The Custom_Image_Header::step() method is used to advance the custom image header upload process to the next step. This is typically called by the Custom_Image_Header::init() method after verifying that the current step is valid.

Custom_Image_Header::step() #

Get the current step.


Return

(int) Current step.


Top ↑

Source

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

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


Top ↑

Changelog

Changelog
VersionDescription
2.6.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.