X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/177fd6fefd2e3d5a0ea6591c71d660cabdb3c1a4..refs/tags/wordpress-2.6.2:/wp-admin/edit-page-form.php diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index e800a467..eb58d20c 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -5,10 +5,12 @@ $messages[1] = sprintf( __( 'Page updated. Continue editing below or

-View the autosave
.' ); if (!isset($post_ID) || 0 == $post_ID) { $form_action = 'post'; @@ -20,17 +22,23 @@ if (!isset($post_ID) || 0 == $post_ID) { $form_action = 'editpost'; $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 ) ) + $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); } $temp_ID = (int) $temp_ID; $user_ID = (int) $user_ID; -$sendto = clean_url(stripslashes(wp_get_referer())); - -if ( 0 != $post_ID && $sendto == get_permalink($post_ID) ) - $sendto = 'redo'; ?> + +

+ + +

+ +

@@ -44,15 +52,11 @@ if (isset($mode) && 'bookmarklet' == $mode) + - + post_status ) wp_original_referer_field(true, 'previous'); ?>
@@ -68,14 +72,14 @@ else
- -

+

- +post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) : +?> post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'> - -post_status, 'private' ); ?> value='private'> post_status ) : ?> post_status, 'future' ); ?> value='future'> @@ -84,8 +88,10 @@ else post_status, 'draft' ); ?> value='draft'>

+ +

+ -

post_status ) { // scheduled for publishing at a future date @@ -140,6 +146,7 @@ if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) )
+

@@ -159,7 +166,7 @@ if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) )
-

+

@@ -174,7 +181,7 @@ endif; ?>
-

+

post_content); ?> @@ -188,13 +195,14 @@ endif; ?>

-
-

-
+ +
ID); list_meta($metadata); ?> @@ -205,83 +213,97 @@ list_meta($metadata);

use in your theme.'); ?>

- - +"> -

-
+function page_comments_status_meta_box($post){ +?>

trackbacks and pingbacks.'); ?>

-
- +"> -

-
-

+function page_password_meta_box($post){ +?> +

-
- +"> -

-
- -
- +function page_slug_meta_box($post){ +?> + +"> -

-
- post_parent); ?>

-
- + -
-

-
- page_template); ?>

-
-
- +"> -

-
-

+function page_order_meta_box($post){ +?> +

-
- - id ); // TODO: ROLE SYSTEM if ( $post->post_author && !in_array($post->post_author, $authors) ) $authors[] = $post->post_author; -if ( $authors && count( $authors ) > 1 ) : +if ( $authors && count( $authors ) > 1 ) { + function page_author_meta_box($post){ + global $current_user, $user_ID; + $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM + 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) ); ?> + + +if ( isset($post_ID) && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) : +function page_revisions_meta_box($post) { + wp_list_post_revisions(); +} +add_meta_box('revisionsdiv', __('Page Revisions'), 'page_revisions_meta_box', 'page', 'advanced', 'core'); +endif; + +do_meta_boxes('page', 'advanced', $post); +?>