Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r17228 r14815  
    5252 */
    5353function redirect_post($post_id = '') {
    54     if ( isset($_POST['save']) || isset($_POST['publish']) ) {
     54    if ( !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) {
     55        if ( isset($_POST['saveasdraft']) )
     56            $location = 'sidebar.php?a=c';
     57        elseif ( isset($_POST['publish']) )
     58            $location = 'sidebar.php?a=b';
     59    } elseif ( isset($_POST['save']) || isset($_POST['publish']) ) {
    5560        $status = get_post_status( $post_id );
    5661
     
    8691
    8792    wp_redirect( apply_filters( 'redirect_post_location', $location, $post_id ) );
    88     exit;
    8993}
    9094
     
    140144
    141145    if ( empty( $post_id ) ) {
    142         wp_redirect( admin_url('post.php') );
     146        wp_redirect("post.php");
    143147        exit();
    144148    }
     
    163167        $submenu_file = "edit.php";
    164168    } else {
    165         if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true )
    166             $parent_file = $post_type_object->show_in_menu;
    167         else
    168             $parent_file = "edit.php?post_type=$post_type";
     169        $parent_file = "edit.php?post_type=$post_type";
    169170        $submenu_file = "edit.php?post_type=$post_type";
    170171    }
     
    270271
    271272default:
    272     wp_redirect( admin_url('edit.php') );
     273        wp_redirect('edit.php');
    273274    exit();
    274275    break;
Note: See TracChangeset for help on using the changeset viewer.