Skip to:
Content

BuddyPress.org


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-groups/bp-groups-forums.php

    r4961 r5191  
    2424}
    2525
     26/**
     27 * Updates group forum metadata (title, description, slug) when the group's details are edited
     28 *
     29 * @package BuddyPress
     30 * @subpackage Groups
     31 *
     32 * @param int $group_id Group id, passed from groups_details_updated
     33 */
    2634function groups_update_group_forum( $group_id ) {
    2735
    2836    $group = new BP_Groups_Group( $group_id );
    2937
    30     if ( empty( $group->enable_forum ) || !bp_is_active( 'forums' ) )
     38    /**
     39     * Bail in the following three situations:
     40     *  1. Forums are not enabled for this group
     41     *  2. The BP Forum component is not enabled
     42     *  3. The built-in bbPress forums are not correctly installed (usually means they've been
     43     *     uninstalled)
     44     */
     45    if ( empty( $group->enable_forum ) || !bp_is_active( 'forums' ) || ( function_exists( 'bp_forums_is_installed_correctly' ) && !bp_forums_is_installed_correctly() ) )
    3146        return false;
    3247
Note: See TracChangeset for help on using the changeset viewer.