Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/10/2014 03:50:07 PM (7 years ago)
Author:
boonebgorges
Message:

Pass current group ID to BP_Group_Extension::display().

This creates greater parity with the other display methods in the class.

Props fahmiadib.
Fixes #5533.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-classes.php

    r9127 r9130  
    30463046
    30473047    // The content of the group tab
    3048     public function display() {}
     3048    public function display( $group_id = null ) {}
    30493049
    30503050    // Content displayed in a widget sidebar, if applicable
     
    35013501     */
    35023502    public function _display_hook() {
    3503         add_action( 'bp_template_content', array( &$this, 'display' ) );
     3503        add_action( 'bp_template_content', array( &$this, 'call_display' ) );
    35043504        bp_core_load_template( apply_filters( 'bp_core_template_plugin', $this->template_file ) );
     3505    }
     3506
     3507    /**
     3508     * Call the display() method.
     3509     *
     3510     * We use this wrapper so that we can pass the group_id to the
     3511     * display() callback.
     3512     *
     3513     * @since BuddyPress (2.1.1)
     3514     */
     3515    public function call_display() {
     3516        $this->display( $this->group_id );
    35053517    }
    35063518
Note: See TracChangeset for help on using the changeset viewer.