Changeset 6326
- Timestamp:
- 02/26/2017 08:46:22 PM (8 years ago)
- Location:
- trunk/src/includes/extend/buddypress
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/extend/buddypress/loader.php
r6321 r6326 278 278 $my_topics_link = bbp_get_user_topics_created_url( $user_id ); 279 279 $my_replies_link = bbp_get_user_replies_created_url( $user_id ); 280 $my_engagements_link = bbp_get_user_engagements_url( $user_id ); 280 281 $my_favorites_link = bbp_get_favorites_permalink( $user_id ); 281 282 $my_subscriptions_link = bbp_get_subscriptions_permalink( $user_id ); … … 289 290 $my_topics_link = trailingslashit( $forums_link . bbp_get_topic_archive_slug() ); 290 291 $my_replies_link = trailingslashit( $forums_link . bbp_get_reply_archive_slug() ); 292 $my_engagements_link = trailingslashit( $forums_link . bbp_get_user_engagements_slug() ); 291 293 $my_favorites_link = trailingslashit( $forums_link . bbp_get_user_favorites_slug() ); 292 294 $my_subscriptions_link = trailingslashit( $forums_link . bbp_get_user_subscriptions_slug() ); … … 317 319 ); 318 320 321 // Engagements 322 if ( bbp_is_engagements_active() ) { 323 $wp_admin_nav[] = array( 324 'parent' => 'my-account-' . $this->id, 325 'id' => 'my-account-' . $this->id . '-engagements', 326 'title' => __( 'Engagements', 'bbpress' ), 327 'href' => $my_engagements_link 328 ); 329 } 330 319 331 // Favorites 320 $wp_admin_nav[] = array( 321 'parent' => 'my-account-' . $this->id, 322 'id' => 'my-account-' . $this->id . '-favorites', 323 'title' => __( 'Favorite Topics', 'bbpress' ), 324 'href' => $my_favorites_link 325 ); 332 if ( bbp_is_favorites_active() ) { 333 $wp_admin_nav[] = array( 334 'parent' => 'my-account-' . $this->id, 335 'id' => 'my-account-' . $this->id . '-favorites', 336 'title' => __( 'Favorite Topics', 'bbpress' ), 337 'href' => $my_favorites_link 338 ); 339 } 326 340 327 341 // Subscriptions 328 $wp_admin_nav[] = array( 329 'parent' => 'my-account-' . $this->id, 330 'id' => 'my-account-' . $this->id . '-subscriptions', 331 'title' => __( 'Subscribed Topics', 'bbpress' ), 332 'href' => $my_subscriptions_link 333 ); 342 if ( bbp_is_subscriptions_active() ) { 343 $wp_admin_nav[] = array( 344 'parent' => 'my-account-' . $this->id, 345 'id' => 'my-account-' . $this->id . '-subscriptions', 346 'title' => __( 'Subscribed Topics', 'bbpress' ), 347 'href' => $my_subscriptions_link 348 ); 349 } 334 350 } 335 351 -
trunk/src/includes/extend/buddypress/members.php
r6321 r6326 69 69 */ 70 70 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 ); 74 75 } 75 76 … … 180 181 * @return string 181 182 */ 182 public function get_engagements_permalink( $u rl, $user_id ) {183 public function get_engagements_permalink( $user_id ) { 183 184 184 185 // Do not filter if not on BuddyPress root blog … … 217 218 } elseif ( bbp_is_subscriptions_active() && bp_is_current_action( bbp_get_user_subscriptions_slug() ) ) { 218 219 $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; 219 224 } 220 225 }
Note: See TracChangeset
for help on using the changeset viewer.