Changeset 7913 for trunk/wp-admin/edit-page-form.php
- Timestamp:
- 05/09/2008 03:59:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-page-form.php
r7883 r7913 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; 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>.' ); 12 11 13 12 if (!isset($post_ID) || 0 == $post_ID) { … … 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 … … 31 33 $sendto = 'redo'; 32 34 ?> 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; ?> 33 42 34 43 <form name="post" action="page.php" method="post" id="post"> … … 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 ?>" /> … … 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
Note: See TracChangeset
for help on using the changeset viewer.