mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-31 04:31:35 +01:00
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:
parent
7339da643f
commit
a6ab2ece1d
@ -134,9 +134,6 @@ if ( 'page' == $post->post_type ) {
|
|||||||
$title = __( 'Post Revisions' );
|
$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' );
|
require_once( 'admin-header.php' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -3113,7 +3113,6 @@ function _wp_post_revision_fields( $post = null, $autosave = false ) {
|
|||||||
// Allow these to be versioned
|
// Allow these to be versioned
|
||||||
$fields = array(
|
$fields = array(
|
||||||
'post_title' => __( 'Title' ),
|
'post_title' => __( 'Title' ),
|
||||||
'post_author' => __( 'Author' ),
|
|
||||||
'post_content' => __( 'Content' ),
|
'post_content' => __( 'Content' ),
|
||||||
'post_excerpt' => __( 'Excerpt' ),
|
'post_excerpt' => __( 'Excerpt' ),
|
||||||
);
|
);
|
||||||
@ -3122,7 +3121,7 @@ function _wp_post_revision_fields( $post = null, $autosave = false ) {
|
|||||||
$fields = apply_filters( '_wp_post_revision_fields', $fields );
|
$fields = apply_filters( '_wp_post_revision_fields', $fields );
|
||||||
|
|
||||||
// WP uses these internally either in versioning or elsewhere - they cannot be versioned
|
// 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] );
|
unset( $fields[$protect] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user