Make WordPress Core

Changeset 25929


Ignore:
Timestamp:
10/26/2013 03:19:41 AM (10 years ago)
Author:
nacin
Message:

Have get_current_user_id() return 0 when pluggable.php is not yet included (which brings the ability to set or get the current user).

fixes #25690 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r25696 r25929  
    213213 */
    214214function get_current_user_id() {
     215    if ( ! function_exists( 'wp_get_current_user' ) )
     216        return 0;
    215217    $user = wp_get_current_user();
    216218    return ( isset( $user->ID ) ? (int) $user->ID : 0 );
Note: See TracChangeset for help on using the changeset viewer.