Skip to:
Content

BuddyPress.org

Changeset 4635


Ignore:
Timestamp:
07/09/2011 10:21:26 PM (13 years ago)
Author:
boonebgorges
Message:

Introduces bp_forums_parent_forum_id() to avoid constant referencing throughout. See #3314

File:
1 edited

Legend:

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

    r4596 r4635  
    3838        'forum_name'        => '',
    3939        'forum_desc'        => '',
    40         'forum_parent_id'   => BP_FORUMS_PARENT_FORUM_ID,
     40        'forum_parent_id'   => bp_forums_parent_forum_id(),
    4141        'forum_order'       => false,
    4242        'forum_is_category' => 0
     
    5757        'forum_desc'        => '',
    5858        'forum_slug'        => '',
    59         'forum_parent_id'   => BP_FORUMS_PARENT_FORUM_ID,
     59        'forum_parent_id'   => bp_forums_parent_forum_id(),
    6060        'forum_order'       => false,
    6161        'forum_is_category' => 0
     
    490490add_filter( 'user_has_cap', 'bp_forums_filter_caps' );
    491491
     492/**
     493 * Returs the parent forum id for the bbPress abstraction layer
     494 *
     495 * @package BuddyPress
     496 * @since 1.3
     497 *
     498 * @return int
     499 */
     500function bp_forums_parent_forum_id() {
     501    return apply_filters( 'bp_forums_parent_forum_id', BP_FORUMS_PARENT_FORUM_ID );
     502}
     503
    492504
    493505/********************************************************************************
Note: See TracChangeset for help on using the changeset viewer.