mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Use get_current_user() and get_current_user_id() instead of global . Props filofo. see #13934 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@15315 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -501,8 +501,8 @@ function post_slug_meta_box($post) {
|
||||
* @param object $post
|
||||
*/
|
||||
function post_author_meta_box($post) {
|
||||
global $current_user, $user_ID;
|
||||
$authors = get_editable_user_ids( $current_user->id, true, $post->post_type ); // TODO: ROLE SYSTEM
|
||||
global $user_ID;
|
||||
$authors = get_editable_user_ids( get_current_user_id(), true, $post->post_type ); // TODO: ROLE SYSTEM
|
||||
if ( $post->post_author && !in_array($post->post_author, $authors) )
|
||||
$authors[] = $post->post_author;
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user