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

    r4486 r4596  
    11<?php
    22
    3 /*******************************************************************************
    4  * Business functions are where all the magic happens in BuddyPress. They will
    5  * handle the actual saving or manipulation of information. Usually they will
    6  * hand off to a database class for data access, then return
    7  * true or false on success or failure.
    8  */
     3/**
     4 * Checks $bp pages global and looks for directory page
     5 *
     6 * @since 1.3
     7 *
     8 * @global object $bp Global BuddyPress settings object
     9 * @return bool True if set, False if empty
     10 */
     11function bp_blogs_has_directory() {
     12    global $bp;
     13
     14    return (bool) !empty( $bp->pages->blogs->id );
     15}
    916
    1017function bp_blogs_get_blogs( $args = '' ) {
Note: See TracChangeset for help on using the changeset viewer.