Always save and continue except when referred from the permalink page for the post being edited.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fda19a41bf
commit
3f52602fa4
|
@ -122,9 +122,7 @@ case 'editpost':
|
||||||
$referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
|
$referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
|
||||||
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
|
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
|
||||||
|
|
||||||
if ( isset($_POST['save']) && ( 'draft' == $page->post_status || 'pending' == $page->post_status ) ) {
|
if ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
|
||||||
$location = "page.php?action=edit&post=$page_ID";
|
|
||||||
} elseif ( isset($_POST['save']) && (empty($referredby) || $referredby == $referer) ) {
|
|
||||||
$location = "page.php?action=edit&post=$page_ID";
|
$location = "page.php?action=edit&post=$page_ID";
|
||||||
} elseif ($_POST['addmeta']) {
|
} elseif ($_POST['addmeta']) {
|
||||||
$location = add_query_arg( 'message', 2, wp_get_referer() );
|
$location = add_query_arg( 'message', 2, wp_get_referer() );
|
||||||
|
|
|
@ -135,9 +135,7 @@ case 'editpost':
|
||||||
$referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
|
$referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
|
||||||
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
|
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
|
||||||
|
|
||||||
if ( isset($_POST['save']) && ( 'draft' == $post->post_status || 'pending' == $post->post_status ) ) {
|
if ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
|
||||||
$location = "post.php?action=edit&post=$post_ID";
|
|
||||||
} elseif ( isset($_POST['save']) && (empty($referredby) || $referredby == $referer) ) {
|
|
||||||
$location = "post.php?action=edit&post=$post_ID";
|
$location = "post.php?action=edit&post=$post_ID";
|
||||||
} elseif (isset($_POST['addmeta']) && $_POST['addmeta']) {
|
} elseif (isset($_POST['addmeta']) && $_POST['addmeta']) {
|
||||||
$location = add_query_arg( 'message', 2, wp_get_referer() );
|
$location = add_query_arg( 'message', 2, wp_get_referer() );
|
||||||
|
|
Loading…
Reference in New Issue