Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/13/2012 06:35:33 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Group Forums:

  • Update bp_is_group_forum() to include checks for if forums is active and installed correctly.
  • @todo moves checks out of templates.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-template.php

    r6503 r6511  
    14071407
    14081408function bp_is_group_forum() {
     1409        $retval = false;
     1410
     1411        // At a forum URL
    14091412        if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'forum' ) )
    1410                 return true;
    1411 
    1412         return false;
     1413                $retval = true;
     1414
     1415        // If at a forum URL, set back to false if forums are inactive, or not
     1416        // installed correctly.
     1417        if ( true === $retval ) {
     1418                if ( ! bp_is_active( 'forums' ) || ! bp_forums_is_installed_correctly() ) {
     1419                        $retval = false;
     1420                }
     1421        }
     1422
     1423        return $retval;
    14131424}
    14141425
Note: See TracChangeset for help on using the changeset viewer.