Ticket #11082: #11082_new.patch
File #11082_new.patch, 2.0 KB (added by , 15 years ago) |
---|
-
edit-form-advanced.php
33 33 sprintf( __('Post submitted. <a target="_blank" href="%s">Preview post</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ), 34 34 // translators: Publish box date format, see http://php.net/date - Same as in meta-boxes.php 35 35 sprintf( __('Post scheduled for: <b>%1$s</b>. <a target="_blank" href="%2$s">Preview post</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), get_permalink($post_ID) ), 36 sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) 36 sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ), 37 __('You attempted to save or publish an empty post. Provide some content before saving.') 37 38 ); 38 39 $messages['page'] = array( 39 40 '', -
post.php
57 57 elseif ( isset($_POST['publish']) ) 58 58 $location = 'sidebar.php?a=b'; 59 59 } elseif ( isset($_POST['save']) || isset($_POST['publish']) ) { 60 if( 0== $post_id ){ 61 $location = "post-new.php?message=11"; 62 wp_redirect($location); 63 exit(); 64 } else { 60 65 $status = get_post_status( $post_id ); 61 66 62 67 if ( isset( $_POST['publish'] ) ) { … … 73 78 } else { 74 79 $message = 'draft' == $status ? 10 : 1; 75 80 } 81 } 76 82 77 83 $location = add_query_arg( 'message', $message, get_edit_post_link( $post_id, 'url' ) ); 78 84 } elseif ( isset($_POST['addmeta']) && $_POST['addmeta'] ) { … … 278 284 wp_redirect($url); 279 285 exit(); 280 286 break; 281 282 default:283 if ( $post_type_object->hierarchical )284 wp_redirect('edit-pages.php');285 else286 wp_redirect('edit.php');287 exit();288 break;289 287 } // end switch 290 288 include('admin-footer.php'); 291 289 ?>