WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/21/2008 05:54:56 PM (10 years ago)
Author:
ryan
Message:

Post and page edit redirect fixes. fixes #6720 for trunk

File:
1 edited

Legend:

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

    r7747 r7759  
    99function redirect_page($page_ID) {
    1010    $referredby = '';
    11     if ( !empty($_POST['referredby']) )
     11    if ( !empty($_POST['referredby']) ) {
    1212        $referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
     13        $referredby = remove_query_arg('_wp_original_http_referer', $referredby);
     14    }
    1315    $referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
    1416
     
    3234    } elseif (!empty($referredby) && $referredby != $referer) {
    3335        $location = $_POST['referredby'];
     36        $location = remove_query_arg('_wp_original_http_referer', $location);
    3437        if ( $_POST['referredby'] == 'redo' )
    3538            $location = get_permalink( $page_ID );
Note: See TracChangeset for help on using the changeset viewer.