Changes in trunk/wp-admin/post.php [14815:17228]
- File:
-
- 1 edited
-
trunk/wp-admin/post.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r14815 r17228 52 52 */ 53 53 function redirect_post($post_id = '') { 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']) ) { 54 if ( isset($_POST['save']) || isset($_POST['publish']) ) { 60 55 $status = get_post_status( $post_id ); 61 56 … … 91 86 92 87 wp_redirect( apply_filters( 'redirect_post_location', $location, $post_id ) ); 88 exit; 93 89 } 94 90 … … 144 140 145 141 if ( empty( $post_id ) ) { 146 wp_redirect( "post.php");142 wp_redirect( admin_url('post.php') ); 147 143 exit(); 148 144 } … … 167 163 $submenu_file = "edit.php"; 168 164 } else { 169 $parent_file = "edit.php?post_type=$post_type"; 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"; 170 169 $submenu_file = "edit.php?post_type=$post_type"; 171 170 } … … 271 270 272 271 default: 273 wp_redirect('edit.php');272 wp_redirect( admin_url('edit.php') ); 274 273 exit(); 275 274 break;
Note: See TracChangeset
for help on using the changeset viewer.