Ticket #11082: #11082.patch
File #11082.patch, 3.2 KB (added by , 15 years ago) |
---|
-
edit-form-advanced.php
56 56 case 10: 57 57 $message = sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); 58 58 break; 59 case 11: 60 $message = __('You attempted to save or publish an empty post. Provide some content before saving.'); 61 break; 59 62 } 60 63 } 61 64 -
edit-page-form.php
51 51 case 8: 52 52 $message = sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); 53 53 break; 54 case 11: 55 $message = __('You attempted to save or publish an empty page. Provide some content before saving.'); 56 break; 54 57 } 55 58 } 56 59 -
page.php
34 34 if ( 'post' == $_POST['originalaction'] && !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) { 35 35 $location = 'sidebar.php?a=b'; 36 36 } elseif ( isset($_POST['save']) || isset($_POST['publish']) ) { 37 if ( 0 == $post_ID ) { 38 $location = 'page-new.php?message=11'; 39 wp_redirect($location); 40 } else { 37 41 $status = get_post_status( $page_ID ); 38 42 39 43 if ( isset( $_POST['publish'] ) ) { … … 44 48 case 'future': 45 49 $message = 7; 46 50 break; 51 case '': 52 $message = 11; 53 break; 47 54 default: 48 55 $message = 4; 49 56 } 50 57 } else { 51 58 $message = 'draft' == $status ? 8 : 1; 52 59 } 53 60 } 54 61 $location = add_query_arg( 'message', $message, get_edit_post_link( $page_ID, 'url' ) ); 55 62 } elseif ( isset($_POST['addmeta']) ) { 56 63 $location = add_query_arg( 'message', 2, wp_get_referer() ); … … 211 218 wp_redirect($url); 212 219 exit(); 213 220 break; 214 215 default:216 wp_redirect('edit-pages.php');217 exit();218 break;219 221 } // end switch 220 222 include('admin-footer.php'); 221 223 ?> -
post.php
37 37 elseif ( isset($_POST['publish']) ) 38 38 $location = 'sidebar.php?a=b'; 39 39 } elseif ( isset($_POST['save']) || isset($_POST['publish']) ) { 40 if ( 0 == $post_ID ) { 41 $location = 'post-new.php?message=11'; 42 wp_redirect($location); 43 } else { 40 44 $status = get_post_status( $post_ID ); 41 45 42 46 if ( isset( $_POST['publish'] ) ) { … … 47 51 case 'future': 48 52 $message = 9; 49 53 break; 54 case '': 55 $message = 11; 56 break; 50 57 default: 51 58 $message = 6; 52 59 } 53 60 } else { 54 61 $message = 'draft' == $status ? 10 : 1; 55 62 } 63 } 56 64 57 65 $location = add_query_arg( 'message', $message, get_edit_post_link( $post_ID, 'url' ) ); 58 66 } elseif ( isset($_POST['addmeta']) && $_POST['addmeta'] ) { … … 253 261 wp_redirect($url); 254 262 exit(); 255 263 break; 256 257 default:258 wp_redirect('edit.php');259 exit();260 break;261 264 } // end switch 262 265 include('admin-footer.php'); 263 266 ?>