Make WordPress Core


Ignore:
Timestamp:
02/13/2008 08:55:17 AM (18 years ago)
Author:
ryan
Message:

Update post save notifications and redirects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/post.php

    r6770 r6807  
    127127                $referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
    128128
    129                 if ($_POST['save']) {
    130                         $location = "post.php?action=edit&post=$post_ID";
    131                 } elseif ($_POST['addemeta']) {
     129                if ($_POST['addemeta']) {
    132130                        $location = add_query_arg( 'message', 2, wp_get_referer() );
    133131                        $location = explode('#', $location);
     
    141139                        if ( $_POST['referredby'] == 'redo' )
    142140                                $location = get_permalink( $post_ID );
     141                        if (false !== strpos($location, 'edit.php') )
     142                                $location = add_query_arg('posted', $post_ID, $location);
    143143                } elseif ($action == 'editattachment') {
    144144                        $location = 'attachments.php';
    145145                } else {
    146                         $location = 'edit.php?posted=' . $post_ID;
     146                        $location = "post.php?action=edit&post=$post_ID";
    147147                }
    148148        }
Note: See TracChangeset for help on using the changeset viewer.