Ticket #11082: 11082.2.diff
File 11082.2.diff, 3.8 KB (added by , 15 years ago) |
---|
-
wp-admin/edit-form-advanced.php
35 35 sprintf( __('Post scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview post</a>'), 36 36 // translators: Publish box date format, see http://php.net/date 37 37 date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), get_permalink($post_ID) ), 38 sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) 38 sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ), 39 __('You attempted to save or publish an empty post. Provide some content before saving.') 39 40 ); 40 41 $messages['page'] = array( 41 42 '', … … 48 49 __('Page saved.'), 49 50 sprintf( __('Page submitted. <a target="_blank" href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ), 50 51 sprintf( __('Page scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview page</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), 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 sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ), 53 __('You attempted to save or publish an empty page. Provide some content before saving.') 52 54 ); 53 55 54 56 $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; 60 if ( isset( $_POST['auto_draft'] ) && '1' == $_POST['auto_draft'] ) { 61 $location = 'post-new.php?message=11'; 62 if ( isset($_POST['post_type']) ) { 63 $post_type_object = get_post_type_object($_POST['post_type']); 64 if ( $post_type_object && 'post' != $post_type_object->name ) 65 $location = add_query_arg( 'post_type', $post_type_object->name, $location ); 72 66 } 73 67 } else { 68 $status = get_post_status( $post_id ); 69 70 if ( isset( $_POST['publish'] ) ) { 71 switch ( $status ) { 72 case 'pending': 73 $message = 8; 74 break; 75 case 'future': 76 $message = 9; 77 break; 78 default: 79 $message = 6; 80 } 81 } else { 74 82 $message = 'draft' == $status ? 10 : 1; 83 } 84 85 $location = add_query_arg( 'message', $message, get_edit_post_link( $post_id, 'url' ) ); 75 86 } 76 77 $location = add_query_arg( 'message', $message, get_edit_post_link( $post_id, 'url' ) );78 87 } elseif ( isset($_POST['addmeta']) && $_POST['addmeta'] ) { 79 88 $location = add_query_arg( 'message', 2, wp_get_referer() ); 80 89 $location = explode('#', $location); -
wp-includes/js/autosave.dev.js
144 144 145 145 function autosave_update_post_ID( postID ) { 146 146 if ( !isNaN(postID) && postID > 0 ) { 147 if ( postID == parseInt(jQuery('#post_ID').val(), 10) ) { return; } // no need to do this more than once148 147 notSaved = false; 149 148 autosave_enable_buttons(); 150 149 jQuery('#delete-action a.submitdelete').fadeIn();