Changeset 12020 for trunk/wp-admin/edit-page-form.php
- Timestamp:
- 10/11/2009 12:37:26 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-page-form.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-page-form.php
r11897 r12020 21 21 $temp_ID = 0; 22 22 23 if ( isset($_GET['message']) ) 23 $message = false; 24 if ( isset($_GET['message']) ) { 24 25 $_GET['message'] = absint( $_GET['message'] ); 25 $messages[1] = sprintf(__('Page updated. <a href="%s">View page</a>'), get_permalink($post_ID));26 $messages[2] = __('Custom field updated.');27 $messages[3] = __('Custom field deleted.');28 $messages[5] = sprintf(__('Page published. <a href="%s">View page</a>'), get_permalink($post_ID));29 $messages[6] = sprintf(__('Page submitted. <a href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) );30 // translators: Publish box date formt, see http://php.net/date - Same as in meta-boxes.php31 $messages[7] = sprintf(__('Page scheduled for: <b>%1$s</b>. <a href="%2$s">Preview post</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), get_permalink($post_ID));32 26 33 if ( isset($_GET['revision']) ) 34 $messages[5] = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); 27 switch ( $_GET['message'] ) { 28 case 1: 29 $message = sprintf( __('Page updated. <a target="_blank" href="%s">View page</a>'), get_permalink($post_ID) ); 30 break; 31 case 2: 32 $message = __('Custom field updated.'); 33 break; 34 case 3: 35 $message = __('Custom field deleted.'); 36 break; 37 case 4: 38 $message = sprintf( __('Page published. <a target="_blank" href="%s">View page</a>'), get_permalink($post_ID) ); 39 break; 40 case 5: 41 if ( isset($_GET['revision']) ) 42 $message = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); 43 break; 44 case 6: 45 $message = sprintf( __('Page submitted. <a target="_blank" href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); 46 break; 47 case 7: 48 // translators: Publish box date formt, see http://php.net/date - Same as in meta-boxes.php 49 $message = 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) ); 50 break; 51 case 8: 52 $message = sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); 53 break; 54 } 55 } 35 56 36 57 $notice = false; 37 $notices[1] = __( 'There is an autosave of this page that is more recent than the version below. <a href="%s">View the autosave</a>.' );38 39 58 if ( 0 == $post_ID) { 40 59 $form_action = 'post'; … … 49 68 $autosave = wp_get_post_autosave( $post_ID ); 50 69 if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) 51 $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) );70 $notice = sprintf( __( 'There is an autosave of this page that is more recent than the version below. <a href="%s">View the autosave</a>.' ), get_edit_post_link( $autosave->ID ) ); 52 71 } 53 72 … … 88 107 <div id="notice" class="error"><p><?php echo $notice ?></p></div> 89 108 <?php endif; ?> 90 <?php if ( isset($_GET['message'])) : ?>91 <div id="message" class="updated fade"><p><?php echo $message s[$_GET['message']]; ?></p></div>109 <?php if ( $message ) : ?> 110 <div id="message" class="updated fade"><p><?php echo $message; ?></p></div> 92 111 <?php endif; ?> 93 112
Note: See TracChangeset
for help on using the changeset viewer.