Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/10/2012 08:25:00 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Legacy Group Forums:

  • Retire bbPress 1.1 group forums component.
  • Creates new "Retired" components group, where old components go to die.
  • Deprecate "Forums" settings tab; use Legacy Forums Setting instead.
  • Remove associated code for old forums admin UI.
  • See #4493.
  • Fixes #3598.
File:
1 edited

Legend:

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

    r6342 r6581  
    3535     *
    3636     * @since BuddyPress (1.5)
    37      * @global BuddyPress $bp The one true BuddyPress instance
    3837     */
    3938    function setup_globals() {
    40         global $bp;
     39        $bp = buddypress();
    4140
    4241        // Define the parent forum ID
     
    8079        );
    8180
    82         // Admin area
    83         if ( is_admin() )
    84             $includes[] = 'admin';
    85 
    8681        // bbPress stand-alone
    8782        if ( !defined( 'BB_PATH' ) )
     
    9388    /**
    9489     * Setup BuddyBar navigation
    95      *
    96      * @global BuddyPress $bp The one true BuddyPress instance
    9790     */
    9891    function setup_nav() {
    99         global $bp;
    10092
    10193        // Stop if forums haven't been set up yet
     
    151143        );
    152144
    153         // Favorite forums items. Disabled until future release.
    154         /*
    155         $sub_nav[] = array(
    156             'name'            => __( 'Favorites', 'buddypress' ),
    157             'slug'            => 'favorites',
    158             'parent_url'      => $forums_link,
    159             'parent_slug'     => $this->slug,
    160             'screen_function' => 'bp_member_forums_screen_favorites',
    161             'position'        => 60,
    162             'item_css_id'     => 'favorites'
    163         );
    164         */
    165 
    166145        parent::setup_nav( $main_nav, $sub_nav );
    167146    }
     
    169148    /**
    170149     * Set up the Toolbar
    171      *
    172      * @global BuddyPress $bp The one true BuddyPress instance
    173150     */
    174151    function setup_admin_bar() {
    175         global $bp;
    176152
    177153        // Prevent debug notices
     
    186162            // Add the "My Account" sub menus
    187163            $wp_admin_nav[] = array(
    188                 'parent' => $bp->my_account_menu_id,
     164                'parent' => buddypress()->my_account_menu_id,
    189165                'id'     => 'my-account-' . $this->id,
    190166                'title'  => __( 'Forums', 'buddypress' ),
     
    222198    /**
    223199     * Sets up the title for pages and <title>
    224      *
    225      * @global BuddyPress $bp The one true BuddyPress instance
    226200     */
    227201    function setup_title() {
    228         global $bp;
     202        $bp = buddypress();
    229203
    230204        // Adjust title based on view
     
    247221
    248222function bp_setup_forums() {
    249     global $bp;
    250 
    251     $bp->forums = new BP_Forums_Component();
     223    buddypress()->forums = new BP_Forums_Component();
    252224}
    253225add_action( 'bp_setup_components', 'bp_setup_forums', 6 );
Note: See TracChangeset for help on using the changeset viewer.