Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/08/2011 06:35:03 AM (14 years ago)
Author:
johnjamesjacoby
Message:

More auditing of _slug and _root_slug functions.

Introduce functions for updating '$bp->is_' globals to prevent loading $bp global in several functions.

Various phpDoc fixes and whitespace clean-up. (1.3 trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-loader.php

    r4084 r4088  
    77 *
    88 * @package BuddyPress
    9  * @subpackage Member Core
     9 * @subpackage Members
    1010 */
    1111
     
    7373        $bp->loggedin_user->fullname       = bp_core_get_user_displayname( $bp->loggedin_user->id );
    7474
    75         // is_super_admin() hits the DB on single WP installs, so we need to get this separately so we can call it in a loop.
    76         $bp->loggedin_user->is_super_admin = is_super_admin();
    77         $bp->loggedin_user->is_site_admin  = $bp->loggedin_user->is_super_admin; // deprecated 1.2.6
     75        // Hits the DB on single WP installs so get this separately
     76        $bp->loggedin_user->is_super_admin = $bp->loggedin_user->is_site_admin = is_super_admin();
    7877
    7978        // The domain for the user currently logged in. eg: http://domain.com/members/andy
     
    8887         * something, is_item_admin is used. This is a generic variable so it
    8988         * can be used by other components. It can also be modified, so when
    90          * viewing a group 'is_item_admin' would be 1 if they are a group
    91          * admin, 0 if they are not.
     89         * viewing a group 'is_item_admin' would be 'true' if they are a group
     90         * admin, and 'false' if they are not.
    9291         */
    93         $bp->is_item_admin = bp_user_has_access();
     92        bp_update_is_item_admin( bp_user_has_access(), 'members' );
    9493
    95         // Used to determine if the logged in user is a moderator for
    96         // the current content.
    97         $bp->is_item_mod = false;
     94        // Is the logged in user is a mod for the current item?
     95        bp_update_is_item_mod  ( false,                'members' );
    9896
    9997        /** Displayed user ****************************************************/
Note: See TracChangeset for help on using the changeset viewer.