Store current user rather than original post author when saving revisions. Props mdawaffe. fixes #7317 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@8480 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-07-28 23:58:24 +00:00
parent 79da5c32a9
commit 6c433a5dce
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] );
}