From 866e4df183c1be5f8469f8f40a009d504115c93b Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 19 Mar 2012 14:45:29 +0000 Subject: [PATCH] Return to step 1 on custom-header.php if not POST data is sent. Good for if step=2 or 3 is in the URL and the page is refreshed (otherwise a nonce check fails). see #20249. git-svn-id: https://develop.svn.wordpress.org/trunk@20211 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/custom-header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 3865c1e7a0..46de018a57 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -894,7 +894,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> if ( ! current_user_can('edit_theme_options') ) wp_die(__('You do not have permission to customize headers.')); $step = $this->step(); - if ( 1 == $step ) + if ( 1 == $step || ! $_POST ) $this->step_1(); elseif ( 2 == $step ) $this->step_2();