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-groups/bp-groups-functions.php

    r4558 r4596  
    77 * true or false on success or failure.
    88 */
     9
     10/**
     11 * Checks $bp pages global and looks for directory page
     12 *
     13 * @since 1.3
     14 *
     15 * @global object $bp Global BuddyPress settings object
     16 * @return bool True if set, False if empty
     17 */
     18function bp_groups_has_directory() {
     19    global $bp;
     20
     21    return (bool) !empty( $bp->pages->groups->id );
     22}
    923
    1024function groups_get_group( $args = '' ) {
Note: See TracChangeset for help on using the changeset viewer.