X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/11be8dc178e77d0b46189bbd8e33a216a9b90942..9c40b4d36daed9e28e48a5fe9205c32557195a4b:/wp-admin/edit-page-form.php diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 5d1caea0..2d436be7 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -18,10 +18,9 @@ if ( ! isset( $temp_ID ) ) if ( isset($_GET['message']) ) $_GET['message'] = absint( $_GET['message'] ); -$messages[1] = sprintf( __( 'Page updated. Continue editing below or go back.' ), attribute_escape( stripslashes( ( isset( $_GET['_wp_original_http_referer'] ) ? $_GET['_wp_original_http_referer'] : '') ) ) ); +$messages[1] = sprintf(__('Page updated. View page'), get_permalink($post_ID)); $messages[2] = __('Custom field updated.'); $messages[3] = __('Custom field deleted.'); -$messages[4] = __('Page updated.'); $messages[5] = sprintf(__('Page published. View page'), get_permalink($post_ID)); $messages[6] = sprintf(__('Page submitted. Preview page'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); @@ -42,7 +41,7 @@ if ( 0 == $post_ID) { $nonce_action = 'update-page_' . $post_ID; $form_extra = ""; $autosave = wp_get_post_autosave( $post_ID ); - if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) + if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); } @@ -67,22 +66,29 @@ function page_submit_meta_box($post) {
- +
post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> -post_status ) { ?>style="display:none" type="submit" name="save" id="save-post" value="" tabindex="4" class="button button-highlighted" /> +post_status ) { ?>style="display:none" type="submit" name="save" id="save-post" value="" tabindex="4" class="button button-highlighted" /> post_status && $can_publish ) { ?> - +
-post_status ? clean_url(get_permalink($post->ID)) : clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?> - - +post_status ) { + $preview_link = esc_url(get_permalink($post->ID)); + $preview_button = __('Preview Changes'); +} else { + $preview_link = esc_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); + $preview_button = __('Preview'); +} +?> +
@@ -92,7 +98,7 @@ function page_submit_meta_box($post) {
- + post_status ) { case 'private': @@ -112,12 +118,12 @@ switch ( $post->post_status ) { break; } ?> - + post_status || 'private' == $post->post_status || $can_publish ) { ?> post_status ) { ?>style="display:none;" class="edit-post-status hide-if-no-js" tabindex='4'>
- + - - + + />
/>
-
+
/>
-

- - -

+

+

ID ) { if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date $stamp = __('Scheduled for: %1$s'); @@ -192,15 +198,14 @@ if ( 0 != $post->ID ) { $stamp = __('Publish immediately'); $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); } -?> - + +if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
- - +
-
- +
@@ -211,29 +216,32 @@ if ( 0 != $post->ID ) {
ID) ) { ?> -ID", 'delete-page_' . $post->ID); ?>" onclick="if ( confirm('post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )); ?>') ) {return true;}return false;"> +ID", 'delete-page_' . $post->ID); ?>" onclick="if ( confirm('post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )); ?>') ) {return true;}return false;">
post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { ?> - - post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> - - - - - - - - - - - - - - +post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> + + + + + + + + + + + +
@@ -253,7 +261,7 @@ function page_password_meta_box($post){ ?>

-

+

- + $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column'=> 'menu_order, post_title')); ?>

+ if ( 0 != count( get_page_templates() ) ) { ?>
- page_template); ?>

+ } ?>
-

+

ID); -list_meta($metadata); -meta_form(); -?> -
+ $metadata = has_meta($post->ID); + list_meta($metadata); + meta_form(); ?> +

use in your theme.'); ?>

- + 1 ) { if ( $post->post_author && !in_array($post->post_author, $authors) ) $authors[] = $post->post_author; ?> - $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> + $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> -

+

@@ -409,33 +414,29 @@ if (isset($mode) && 'bookmarklet' == $mode) echo ''; ?> - - - + + + - - - + + + post_status ) wp_original_referer_field(true, 'previous'); ?> -
+
- +$side_meta_boxes = do_meta_boxes('page', 'side', $post); ?>
-
-
- +
+
- + +
ID); ?> @@ -450,38 +451,36 @@ endif; ?>
post_content); ?> -
- - + + + +
  display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); + printf(__('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); } else { printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); } } ?> - -
- +
- - - - - +