Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/22/2012 08:00:55 AM (13 years ago)
Author:
johnjamesjacoby
Message:

User Options:

  • Introduce bbp-user-options.php to handle all user option related code.
  • Add $user_options array to main bbPress class to allow for easy, static, per-user option overrides.
  • Tweak action order for option and user_option overrides in bbp-core-hooks.php.
  • Replace all appropriate user_meta calls with user_option calls to automatically prefix keys with blog ID.
  • Update favorites, subscriptions, and topic/reply count option keys to be per-blog in multisite configurations.
  • Fixes #1826.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-common-functions.php

    r3902 r3911  
    693693 * @uses get_option() To get the throttle time
    694694 * @uses get_transient() To get the last posted transient of the ip
    695  * @uses get_user_meta() To get the last posted meta of the user
     695 * @uses bbp_get_user_last_posted() To get the last posted time of the user
    696696 * @uses current_user_can() To check if the current user can throttle
    697697 * @return bool True if there is no flooding, false if there is
     
    715715    } elseif ( !empty( $author_id ) ) {
    716716        $author_id   = (int) $author_id;
    717         $last_posted = get_user_meta( $author_id, '_bbp_last_posted', true );
     717        $last_posted = bbp_get_user_last_posted( $author_id );
    718718
    719719        if ( isset( $last_posted ) && time() < $last_posted + $throttle_time && !current_user_can( 'throttle' ) ) {
Note: See TracChangeset for help on using the changeset viewer.