Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/04/2011 02:07:08 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Introduce _has_directory() functions for forums, groups, members, and activity components. This replaces the need for enabling/disabling the forum directory, since if it is not set it does not exist.

File:
1 edited

Legend:

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

    r4594 r4596  
    1010 */
    1111
     12/**
     13 * Checks $bp pages global and looks for directory page
     14 *
     15 * @since 1.3
     16 *
     17 * @global object $bp Global BuddyPress settings object
     18 * @return bool True if set, False if empty
     19 */
     20function bp_members_has_directory() {
     21    global $bp;
     22
     23    return (bool) !empty( $bp->pages->members->id );
     24}
    1225
    1326/**
Note: See TracChangeset for help on using the changeset viewer.