Make WordPress Core

Ticket #25690: 25690.ternary.diff

File 25690.ternary.diff, 470 bytes (added by georgestephanis, 10 years ago)
  • src/wp-includes/user.php

     
    212212 * @return int The current user's ID
    213213 */
    214214function get_current_user_id() {
    215         $user = wp_get_current_user();
     215        $user = function_exists( 'wp_get_current_user' ) ? wp_get_current_user() : new WP_User;
    216216        return ( isset( $user->ID ) ? (int) $user->ID : 0 );
    217217}
    218218