mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Preserve author ID when editing pages. Bug 480. Hat tip: adsworth
git-svn-id: https://develop.svn.wordpress.org/trunk@1873 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -235,7 +235,11 @@ case 'editpost':
|
||||
$post_title = $_POST['post_title'];
|
||||
$prev_status = $_POST['prev_status'];
|
||||
$post_status = $_POST['post_status'];
|
||||
$post_author = (int) $_POST['post_author'];
|
||||
if (! empty($_POST['post_author'])) {
|
||||
$post_author = (int) $_POST['post_author'];
|
||||
} else {
|
||||
$post_author = (int) $_POST['user_ID'];
|
||||
}
|
||||
if ( !user_can_edit_user($user_ID, $post_author) )
|
||||
die( __('You cannot post as this user.') );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user