Changeset 13409
- Timestamp:
- 02/03/2023 08:19:48 PM (21 months ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-template.php
r13395 r13409 3559 3559 * @param array $button_args Array of arguments for the public message button HTML. 3560 3560 */ 3561 return apply_filters( 'bp_get_send_public_message_button', $button_args );3561 return (array) apply_filters( 'bp_get_send_public_message_button', $button_args ); 3562 3562 } 3563 3563 -
trunk/src/bp-blogs/bp-blogs-template.php
r13405 r13409 1595 1595 * @param array $button_args Array of arguments to be used for the button to visit a blog. 1596 1596 */ 1597 return apply_filters( 'bp_get_blogs_visit_blog_button', $button_args );1597 return (array) apply_filters( 'bp_get_blogs_visit_blog_button', $button_args ); 1598 1598 } 1599 1599 -
trunk/src/bp-friends/bp-friends-template.php
r13395 r13409 458 458 * @since 1.1.0 459 459 * 460 * @param string$button_args Button arguments for add friend button.461 */ 462 return apply_filters( 'bp_get_add_friend_button', $button_args );460 * @param array $button_args Button arguments for add friend button. 461 */ 462 return (array) apply_filters( 'bp_get_add_friend_button', $button_args ); 463 463 } 464 464 -
trunk/src/bp-groups/bp-groups-template.php
r13395 r13409 3700 3700 * @param object $group BuddyPress group object 3701 3701 */ 3702 return apply_filters( 'bp_get_group_join_button', $button_args, $group );3702 return (array) apply_filters( 'bp_get_group_join_button', $button_args, $group ); 3703 3703 } 3704 3704 /** -
trunk/src/bp-messages/bp-messages-template.php
r13395 r13409 1557 1557 * @param array $button_args See {@link BP_Button}. 1558 1558 */ 1559 return apply_filters( 'bp_get_send_message_button_args', $button_args );1559 return (array) apply_filters( 'bp_get_send_message_button_args', $button_args ); 1560 1560 } 1561 1561 -
trunk/src/bp-templates/bp-nouveau/includes/blogs/template-tags.php
r13303 r13409 200 200 } 201 201 202 $button_args = bp_get_blogs_visit_blog_button_args();203 204 202 // If we pass through parent classes add them to $button array 205 203 $parent_class = ''; … … 208 206 } 209 207 210 // Set defaults if not set. 211 $button_args = array_merge( array( 212 'wrapper_id' => '', 213 'link_id' => '', 214 'link_rel' => '' 215 ), $button_args ); 216 217 $buttons['visit_blog'] = array( 218 'id' => 'visit_blog', 219 'position' => 5, 220 'component' => $button_args['component'], 221 'must_be_logged_in' => $button_args['must_be_logged_in'], 222 'block_self' => $button_args['block_self'], 223 'parent_element' => $parent_element, 224 'button_element' => $button_element, 225 'link_text' => $button_args['link_text'], 226 'link_title' => $button_args['link_title'], 227 'parent_attr' => array( 228 'id' => $button_args['wrapper_id'], 229 'class' => $parent_class, 230 ), 231 'button_attr' => array( 232 'href' => $button_args['link_href'], 233 'id' => $button_args['link_id'], 234 'class' => $button_args['link_class'] . ' button', 235 'rel' => $button_args['link_rel'], 236 'title' => '', 237 ), 238 ); 208 $button_args = bp_get_blogs_visit_blog_button_args(); 209 if ( array_filter( $button_args ) ) { 210 // Set defaults if not set. 211 $button_args = array_merge( array( 212 'wrapper_id' => '', 213 'link_id' => '', 214 'link_rel' => '' 215 ), $button_args ); 216 217 $buttons['visit_blog'] = array( 218 'id' => 'visit_blog', 219 'position' => 5, 220 'component' => $button_args['component'], 221 'must_be_logged_in' => $button_args['must_be_logged_in'], 222 'block_self' => $button_args['block_self'], 223 'parent_element' => $parent_element, 224 'button_element' => $button_element, 225 'link_text' => $button_args['link_text'], 226 'link_title' => $button_args['link_title'], 227 'parent_attr' => array( 228 'id' => $button_args['wrapper_id'], 229 'class' => $parent_class, 230 ), 231 'button_attr' => array( 232 'href' => $button_args['link_href'], 233 'id' => $button_args['link_id'], 234 'class' => $button_args['link_class'] . ' button', 235 'rel' => $button_args['link_rel'], 236 'title' => '', 237 ), 238 ); 239 } 239 240 240 241 /** -
trunk/src/bp-templates/bp-nouveau/includes/members/template-tags.php
r13301 r13409 322 322 $button_args = bp_get_add_friend_button_args( $user_id ); 323 323 324 if ( $button_args) {324 if ( array_filter( $button_args ) ) { 325 325 $buttons['member_friendship'] = array( 326 326 'id' => 'member_friendship', … … 361 361 $button_args = bp_activity_get_public_message_button_args(); 362 362 363 /* 364 * This button should remain as an anchor link. 365 * Hardcode the use of anchor elements if button arg passed in for other elements. 366 */ 367 $buttons['public_message'] = array( 368 'id' => $button_args['id'], 369 'position' => 15, 370 'component' => $button_args['component'], 371 'must_be_logged_in' => $button_args['must_be_logged_in'], 372 'block_self' => $button_args['block_self'], 373 'parent_element' => $parent_element, 374 'button_element' => 'a', 375 'link_text' => $button_args['link_text'], 376 'link_title' => $button_args['link_title'], 377 'parent_attr' => array( 378 'id' => $button_args['wrapper_id'], 379 'class' => $parent_class, 380 ), 381 'button_attr' => array( 382 'href' => $button_args['link_href'], 383 'id' => '', 384 'class' => $button_args['link_class'], 385 ), 386 ); 363 if ( array_filter( $button_args ) ) { 364 /* 365 * This button should remain as an anchor link. 366 * Hardcode the use of anchor elements if button arg passed in for other elements. 367 */ 368 $buttons['public_message'] = array( 369 'id' => $button_args['id'], 370 'position' => 15, 371 'component' => $button_args['component'], 372 'must_be_logged_in' => $button_args['must_be_logged_in'], 373 'block_self' => $button_args['block_self'], 374 'parent_element' => $parent_element, 375 'button_element' => 'a', 376 'link_text' => $button_args['link_text'], 377 'link_title' => $button_args['link_title'], 378 'parent_attr' => array( 379 'id' => $button_args['wrapper_id'], 380 'class' => $parent_class, 381 ), 382 'button_attr' => array( 383 'href' => $button_args['link_href'], 384 'id' => '', 385 'class' => $button_args['link_class'], 386 ), 387 ); 388 } 387 389 } 388 390 … … 390 392 $button_args = bp_get_send_message_button_args(); 391 393 392 /* 393 * This button should remain as an anchor link. 394 * Hardcode the use of anchor elements if button arg passed in for other elements. 395 */ 396 $buttons['private_message'] = array( 397 'id' => $button_args['id'], 398 'position' => 25, 399 'component' => $button_args['component'], 400 'must_be_logged_in' => $button_args['must_be_logged_in'], 401 'block_self' => $button_args['block_self'], 402 'parent_element' => $parent_element, 403 'button_element' => 'a', 404 'link_text' => $button_args['link_text'], 405 'link_title' => $button_args['link_title'], 406 'parent_attr' => array( 407 'id' => $button_args['wrapper_id'], 408 'class' => $parent_class, 409 ), 410 'button_attr' => array( 411 'href' => bp_get_send_private_message_link(), 412 'id' => false, 413 'class' => $button_args['link_class'], 414 'rel' => '', 415 'title' => '', 416 ), 417 ); 394 if ( array_filter( $button_args ) ) { 395 /* 396 * This button should remain as an anchor link. 397 * Hardcode the use of anchor elements if button arg passed in for other elements. 398 */ 399 $buttons['private_message'] = array( 400 'id' => $button_args['id'], 401 'position' => 25, 402 'component' => $button_args['component'], 403 'must_be_logged_in' => $button_args['must_be_logged_in'], 404 'block_self' => $button_args['block_self'], 405 'parent_element' => $parent_element, 406 'button_element' => 'a', 407 'link_text' => $button_args['link_text'], 408 'link_title' => $button_args['link_title'], 409 'parent_attr' => array( 410 'id' => $button_args['wrapper_id'], 411 'class' => $parent_class, 412 ), 413 'button_attr' => array( 414 'href' => bp_get_send_private_message_link(), 415 'id' => false, 416 'class' => $button_args['link_class'], 417 'rel' => '', 418 'title' => '', 419 ), 420 ); 421 } 418 422 } 419 423 }
Note: See TracChangeset
for help on using the changeset viewer.