Changeset 4616
- Timestamp:
- 12/21/2012 08:46:31 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/extend/buddypress/members.php
r4397 r4616 42 42 */ 43 43 private function setup_actions() { 44 45 // Allow unsubscribe/unfavorite links to work 46 add_action( 'bp_template_redirect', array( $this, 'set_member_forum_query_vars' ) ); 44 47 45 48 /** Favorites *********************************************************/ … … 140 143 return $url; 141 144 } 145 146 /** 147 * Set favorites and subscriptions query variables if viewing member profile 148 * pages. 149 * 150 * @since bbPress (r4615) 151 * 152 * @global WP_Query $wp_query 153 * @return If not viewing your own profile 154 */ 155 public function set_member_forum_query_vars() { 156 157 // Special handling for forum component 158 if ( ! bp_is_my_profile() ) 159 return; 160 161 global $wp_query; 162 163 // 'favorites' action 164 if ( bbp_is_favorites_active() && bp_is_current_action( 'favorites' ) ) { 165 $wp_query->bbp_is_single_user_favs = true; 166 167 // 'subscriptions' action 168 } elseif ( bbp_is_subscriptions_active() && bp_is_current_action( 'subscriptions' ) ) { 169 $wp_query->bbp_is_single_user_subs = true; 170 } 171 } 142 172 } 143 173 endif;
Note: See TracChangeset
for help on using the changeset viewer.