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
This commit is contained in:
ryan 2008-07-28 23:58:24 +00:00
parent 7339da643f
commit a6ab2ece1d
2 changed files with 1 additions and 5 deletions

View File

@ -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' );
?>

View File

@ -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] );
}