Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/26/2017 08:46:22 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Engagements/BuddyPress: Finish integration, and clean-up favorites & subscriptions support.

See #3068.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/extend/buddypress/members.php

    r6321 r6326  
    6969     */
    7070    private function setup_filters() {
    71         add_filter( 'bbp_pre_get_user_profile_url',    array( $this, 'user_profile_url'            )        );
    72         add_filter( 'bbp_get_favorites_permalink',     array( $this, 'get_favorites_permalink'     ), 10, 2 );
    73         add_filter( 'bbp_get_subscriptions_permalink', array( $this, 'get_subscriptions_permalink' ), 10, 2 );
     71        add_filter( 'bbp_pre_get_user_profile_url',     array( $this, 'user_profile_url'            )        );
     72        add_filter( 'bbp_pre_get_user_engagements_url', array( $this, 'get_engagements_permalink'   )        );
     73        add_filter( 'bbp_get_favorites_permalink',      array( $this, 'get_favorites_permalink'     ), 10, 2 );
     74        add_filter( 'bbp_get_subscriptions_permalink',  array( $this, 'get_subscriptions_permalink' ), 10, 2 );
    7475    }
    7576
     
    180181     * @return string
    181182     */
    182     public function get_engagements_permalink( $url, $user_id ) {
     183    public function get_engagements_permalink( $user_id ) {
    183184
    184185        // Do not filter if not on BuddyPress root blog
     
    217218        } elseif ( bbp_is_subscriptions_active() && bp_is_current_action( bbp_get_user_subscriptions_slug() ) ) {
    218219            $wp_query->bbp_is_single_user_subs = true;
     220
     221        // 'engagements' action
     222        } elseif ( bbp_is_engagements_active() && bp_is_current_action( bbp_get_user_engagements_slug() ) ) {
     223            $wp_query->bbp_is_single_user_engagements = true;
    219224        }
    220225    }
Note: See TracChangeset for help on using the changeset viewer.