Ticket #11082: new_#11082.patch
File new_#11082.patch, 4.2 KB (added by , 15 years ago) |
---|
-
wp-admin/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 '', … … 43 44 __('Page updated.'), 44 45 isset($_GET['revision']) ? sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 45 46 sprintf( __('Page published. <a href="%s">View page</a>'), get_permalink($post_ID) ), 47 '', 46 48 sprintf( __('Page submitted. <a target="_blank" href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ), 47 49 // translators: Publish box date format, see http://php.net/date - Same as in meta-boxes.php 48 50 sprintf( __('Page scheduled for: <b>%1$s</b>. <a target="_blank" href="%2$s">Preview page</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), get_permalink($post_ID) ), 49 sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) 51 sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ), 52 __('You attempted to save or publish an empty page. Provide some content before saving.') 50 53 ); 51 54 52 55 $message = false; -
wp-admin/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 $status = get_post_status( $post_id ); 61 62 if ( isset( $_POST['publish'] ) ) { 63 switch ( $status ) { 64 case 'pending': 65 $message = 8; 66 break; 67 case 'future': 68 $message = 9; 69 break; 70 default: 71 $message = 6; 72 } 60 if ( 0 == $post_id ){ 61 $location = "post-new.php?message=11"; 62 wp_redirect($location); 63 exit(); 73 64 } else { 74 $message = 'draft' == $status ? 10 : 1; 75 } 65 $status = get_post_status( $post_id ); 76 66 67 if ( isset( $_POST['publish'] ) ) { 68 switch ( $status ) { 69 case 'pending': 70 $message = 8; 71 break; 72 case 'future': 73 $message = 9; 74 break; 75 default: 76 $message = 6; 77 } 78 } else { 79 $message = 'draft' == $status ? 10 : 1; 80 } 81 } 77 82 $location = add_query_arg( 'message', $message, get_edit_post_link( $post_id, 'url' ) ); 78 83 } elseif ( isset($_POST['addmeta']) && $_POST['addmeta'] ) { 79 84 $location = add_query_arg( 'message', 2, wp_get_referer() ); -
wp-includes/functions.php
2460 2460 $html .= "</p><p>" . sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() ); 2461 2461 elseif ( wp_get_referer() ) 2462 2462 $html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>"; 2463 2463 2464 if( 0== $post_id ){ 2465 $location = "post-new.php?post_type=page&message=11"; 2466 wp_redirect($location); 2467 exit(); 2468 } 2464 2469 wp_die( $html, $title, array('response' => 403) ); 2465 2470 } 2466 2471