Ticket #6775: 6775.3.diff
File 6775.3.diff, 5.0 KB (added by , 17 years ago) |
---|
-
wp-includes/js/autosave.js
180 180 post_data["comment_status"] = 'open'; 181 181 if ( jQuery("#ping_status").attr("checked") ) 182 182 post_data["ping_status"] = 'open'; 183 if ( jQuery("#excerpt") )183 if ( jQuery("#excerpt").size() ) 184 184 post_data["excerpt"] = jQuery("#excerpt").val(); 185 if ( jQuery("#post_author") )185 if ( jQuery("#post_author").size() ) 186 186 post_data["post_author"] = jQuery("#post_author").val(); 187 187 188 188 // Don't run while the TinyMCE spellcheck is on. Why? Who knows. -
wp-includes/script-loader.php
47 47 'broken' => __('An unidentified error has occurred.') 48 48 ) ); 49 49 50 $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '2008050 7' );50 $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080508' ); 51 51 52 52 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306'); 53 53 $this->localize( 'wp-ajax', 'WPAjaxL10n', array( -
wp-admin/revision.php
8 8 $left = absint($left); 9 9 $right = absint($right); 10 10 11 12 11 $parent_file = $redirect = 'edit.php'; 13 $submenu_file = 'edit.php';14 $title = __( 'Post Revision' );15 12 16 17 13 switch ( $action ) : 18 14 case 'delete' : // stubs 19 15 case 'edit' : … … 95 91 break; 96 92 endswitch; 97 93 94 if ( !$redirect && !in_array( $post->post_type, array( 'post', 'page' ) ) ) 95 $redirect = 'edit.php'; 96 98 97 if ( $redirect ) { 99 98 wp_redirect( $redirect ); 100 99 exit; 101 100 } 102 101 102 if ( 'page' == $post->post_type ) { 103 $submenu_file = 'edit-pages.php'; 104 $title = __( 'Page Revisions' ); 105 } else { 106 $submenu_file = 'edit.php'; 107 $title = __( 'Post Revisions' ); 108 } 109 103 110 // Converts post_author ID# into name 104 111 add_filter( '_wp_revision_field_post_author', 'get_author_name' ); 105 112 … … 163 170 164 171 <br class="clear" /> 165 172 166 <h2><?php _e( 'Post Revisions' ); ?></h2>173 <h2><?php echo $title; ?></h2> 167 174 168 175 <?php 169 176 -
wp-admin/edit-page-form.php
5 5 $messages[2] = __('Custom field updated.'); 6 6 $messages[3] = __('Custom field deleted.'); 7 7 $messages[4] = __('Page updated.'); 8 ?>9 <?php if (isset($_GET['message'])) : ?>10 <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>11 <?php endif;12 8 9 $notice = false; 10 $notices[1] = __( 'There is an autosave of this page that is more recent than the version below. <a href="%s">View the autosave</a>.' ); 11 13 12 if (!isset($post_ID) || 0 == $post_ID) { 14 13 $form_action = 'post'; 15 14 $nonce_action = 'add-page'; … … 20 19 $form_action = 'editpost'; 21 20 $nonce_action = 'update-page_' . $post_ID; 22 21 $form_extra = "<input type='hidden' id='post_ID' name='post_ID' value='$post_ID' />"; 22 $autosave = wp_get_autosave( $post_id ); 23 if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) 24 $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); 23 25 } 24 26 25 27 $temp_ID = (int) $temp_ID; … … 31 33 $sendto = 'redo'; 32 34 ?> 33 35 36 <?php if ( $notice ) : ?> 37 <div id="notice" class="error"><p><?php echo $notice ?></p></div> 38 <?php endif; ?> 39 <?php if (isset($_GET['message'])) : ?> 40 <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div> 41 <?php endif; ?> 42 34 43 <form name="post" action="page.php" method="post" id="post"> 35 44 <div class="wrap"> 36 45 <h2><?php _e('Write Page') ?></h2> … … 44 53 <input type="hidden" id="user-id" name="user_ID" value="<?php echo $user_ID ?>" /> 45 54 <input type="hidden" id="hiddenaction" name="action" value='<?php echo $form_action ?>' /> 46 55 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" /> 56 <input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" /> 47 57 <?php echo $form_extra ?> 48 58 <input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" /> 49 59 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" /> … … 282 292 </div> 283 293 <?php endif; ?> 284 294 295 <?php if ( isset($post_ID) && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) : ?> 296 <div id="revisionsdiv" class="postbox <?php echo postbox_classes('revisionsdiv', 'page'); ?>"> 297 <h3><?php _e('Page Revisions'); ?></h3> 298 <div class="inside"> 299 <?php wp_list_post_revisions(); ?> 300 </div> 301 </div> 302 <?php endif; ?> 303 304 285 305 <?php do_meta_boxes('page', 'advanced', $post); ?> 286 306 287 307 </div>