Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/08/2011 06:35:03 AM (16 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-functions.php

    r3982 r4088  
    11<?php
    22
    3 /********************************************************************************
    4  * Business Functions
    5  *
    6  * Business functions are where all the magic happens in BuddyPress. They will
    7  * handle the actual saving or manipulation of information. Usually they will
    8  * hand off to a database class for data access, then return
    9  * true or false on success or failure.
    10  */
     3/**
     4 * BuddyPress Member Functions
     5 *
     6 * Functions specific to the members component.
     7 *
     8 * @package BuddyPress
     9 * @subpackage Members
     10 */
     11
    1112
    1213/**
     
    2324        global $bp;
    2425
    25         if ( !defined( 'BP_MEMBERS_SLUG' ) && !empty( $bp->pages->members ) )
    26                 define( 'BP_MEMBERS_SLUG', $bp->pages->members->slug );
    27         else if ( !defined( 'BP_MEMBERS_SLUG' ) )
    28                 define( 'BP_MEMBERS_SLUG', 'members' );
    29 
    30         if ( !defined( 'BP_REGISTER_SLUG' ) && !empty( $bp->pages->register ) )
    31                 define( 'BP_REGISTER_SLUG', $bp->pages->register->slug );
    32         else if ( !defined( 'BP_REGISTER_SLUG' ) )
    33                 define( 'BP_REGISTER_SLUG', 'register' );
    34 
    35         if ( !defined( 'BP_ACTIVATION_SLUG' ) && !empty( $bp->pages->activate ) )
    36                 define( 'BP_ACTIVATION_SLUG', $bp->pages->activate->slug );
    37         else if ( !defined( 'BP_ACTIVATION_SLUG' ) )
    38                 define( 'BP_ACTIVATION_SLUG', 'activate' );
     26        // No custom members slug
     27        if ( !defined( 'BP_MEMBERS_SLUG' ) )
     28                if ( !empty( $bp->pages->members ) )
     29                        define( 'BP_MEMBERS_SLUG', $bp->pages->members->slug );
     30                else
     31                        define( 'BP_MEMBERS_SLUG', 'members' );
     32
     33        // No custom registration slug
     34        if ( !defined( 'BP_REGISTER_SLUG' ) )
     35                if ( !empty( $bp->pages->register ) )
     36                        define( 'BP_REGISTER_SLUG', $bp->pages->register->slug );
     37                else
     38                        define( 'BP_REGISTER_SLUG', 'register' );
     39
     40        // No custom activation slug
     41        if ( !defined( 'BP_ACTIVATION_SLUG' ) )
     42                if ( !empty( $bp->pages->activate ) )
     43                        define( 'BP_ACTIVATION_SLUG', $bp->pages->activate->slug );
     44                else
     45                        define( 'BP_ACTIVATION_SLUG', 'activate' );
    3946
    4047}
Note: See TracChangeset for help on using the changeset viewer.