WordPress at Your Fingertips
function is not described

Custom_Image_Header::step() public WP 2.6.0

Get the current step.

{} It's a method of the class: Custom_Image_Header{}

No Hooks.

Return

Int. Current step.

Usage

$Custom_Image_Header = new Custom_Image_Header();
$Custom_Image_Header->step();

Changelog

Since 2.6.0 Introduced.

Code of Custom_Image_Header::step() WP 5.8.2

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