X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/fa11948979fd6a4ea5705dc613b239699a459db3..53a5df18dd17a11c18781e78349feb3e139096b4:/wp-includes/user.php diff --git a/wp-includes/user.php b/wp-includes/user.php index 9a60cd20..a0cb8d81 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -212,6 +212,8 @@ function count_many_users_posts( $users, $post_type = 'post', $public_only = fal * @return int The current user's ID */ function get_current_user_id() { + if ( ! function_exists( 'wp_get_current_user' ) ) + return 0; $user = wp_get_current_user(); return ( isset( $user->ID ) ? (int) $user->ID : 0 ); }