From a6ab2ece1d4fd029339f9b9e79d607f4111ea3cf Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 28 Jul 2008 23:58:24 +0000 Subject: [PATCH] Store current user rather than original post author when saving revisions. Props mdawaffe. fixes #7317 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@8480 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/revision.php | 3 --- wp-includes/post.php | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/wp-admin/revision.php b/wp-admin/revision.php index a72433327..4820abc3c 100644 --- a/wp-admin/revision.php +++ b/wp-admin/revision.php @@ -134,9 +134,6 @@ if ( 'page' == $post->post_type ) { $title = __( 'Post Revisions' ); } -// Converts post_author ID# into name -add_filter( '_wp_post_revision_field_post_author', 'get_author_name' ); - require_once( 'admin-header.php' ); ?> diff --git a/wp-includes/post.php b/wp-includes/post.php index 4ecfdbebf..1fa9d183a 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3113,7 +3113,6 @@ function _wp_post_revision_fields( $post = null, $autosave = false ) { // Allow these to be versioned $fields = array( 'post_title' => __( 'Title' ), - 'post_author' => __( 'Author' ), 'post_content' => __( 'Content' ), 'post_excerpt' => __( 'Excerpt' ), ); @@ -3122,7 +3121,7 @@ function _wp_post_revision_fields( $post = null, $autosave = false ) { $fields = apply_filters( '_wp_post_revision_fields', $fields ); // WP uses these internally either in versioning or elsewhere - they cannot be versioned - foreach ( array( 'ID', 'post_name', 'post_parent', 'post_date', 'post_date_gmt', 'post_status', 'post_type', 'comment_count' ) as $protect ) + foreach ( array( 'ID', 'post_name', 'post_parent', 'post_date', 'post_date_gmt', 'post_status', 'post_type', 'comment_count', 'post_author' ) as $protect ) unset( $fields[$protect] ); }