Make WordPress Core

Changeset 7253


Ignore:
Timestamp:
03/11/2008 09:37:23 PM (19 years ago)
Author:
westi
Message:

Allow plugins to filter the result of get_user_option().

File:
1 edited

Legend:

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

    r6902 r7253  
    9090
    9191        if ( isset( $user->{$wpdb->prefix . $option} ) ) // Blog specific
    92                 return $user->{$wpdb->prefix . $option};
     92                $result = $user->{$wpdb->prefix . $option};
    9393        elseif ( isset( $user->{$option} ) ) // User specific and cross-blog
    94                 return $user->{$option};
     94                $result = $user->{$option};
    9595        else // Blog global
    96                 return get_option( $option );
     96                $result = get_option( $option );
     97       
     98        return apply_filters("get_user_option_{$option}", $result, $option, $user);
    9799}
    98100
Note: See TracChangeset for help on using the changeset viewer.