- Timestamp:
- 07/22/2022 10:50:40 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/members/template-tags.php
r13300 r13301 320 320 // It's any other members screen 321 321 } else { 322 /* 323 * This filter workaround is waiting for a core adaptation 324 * so that we can directly get the friends button arguments 325 * instead of the button. 326 * 327 * See https://buddypress.trac.wordpress.org/ticket/7126 328 */ 329 add_filter( 'bp_get_add_friend_button', 'bp_nouveau_members_catch_button_args', 100, 1 ); 330 331 bp_get_add_friend_button( $user_id ); 332 333 remove_filter( 'bp_get_add_friend_button', 'bp_nouveau_members_catch_button_args', 100, 1 ); 334 335 if ( isset( bp_nouveau()->members->button_args ) && bp_nouveau()->members->button_args ) { 336 $button_args = bp_nouveau()->members->button_args; 337 322 $button_args = bp_get_add_friend_button_args( $user_id ); 323 324 if ( $button_args ) { 338 325 $buttons['member_friendship'] = array( 339 326 'id' => 'member_friendship', … … 344 331 'parent_element' => $parent_element, 345 332 'link_text' => $button_args['link_text'], 333 'link_title' => $button_args['link_title'], 346 334 'parent_attr' => array( 347 335 'id' => $button_args['wrapper_id'], … … 364 352 $buttons['member_friendship']['button_attr']['href'] = $button_args['link_href']; 365 353 } 366 367 unset( bp_nouveau()->members->button_args );368 354 } 369 355 }
Note: See TracChangeset
for help on using the changeset viewer.