Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/30/2011 09:22:18 PM (13 years ago)
Author:
boonebgorges
Message:

Check to make sure that BP pages exist before attempting to set the default slugs or exclude pages from the nav

File:
1 edited

Legend:

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

    r3955 r3972  
    2323    global $bp;
    2424
    25     if ( !defined( 'BP_MEMBERS_SLUG' ) )
     25    if ( !defined( 'BP_MEMBERS_SLUG' ) && !empty( $bp->pages->members ) )
    2626        define( 'BP_MEMBERS_SLUG', $bp->pages->members->slug );
    27 
    28     if ( !defined( 'BP_REGISTER_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 ) )
    2931        define( 'BP_REGISTER_SLUG', $bp->pages->register->slug );
    30 
    31     if ( !defined( 'BP_ACTIVATION_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 ) )
    3236        define( 'BP_ACTIVATION_SLUG', $bp->pages->activate->slug );
     37    else if ( !defined( 'BP_ACTIVATION_SLUG' ) )
     38        define( 'BP_ACTIVATION_SLUG', 'activate' );
    3339
    3440}
Note: See TracChangeset for help on using the changeset viewer.