Changeset 13299 for trunk/src/bp-activity/bp-activity-template.php
- Timestamp:
- 07/22/2022 09:00:42 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-template.php
r13215 r13299 3483 3483 * @since 1.2.0 3484 3484 * 3485 * @see bp_ get_send_public_message_button() for description of parameters.3486 * 3487 * @param array|string $args See {@link bp_ get_send_public_message_button()}.3485 * @see bp_activity_get_public_message_button_args() for description of parameters. 3486 * 3487 * @param array|string $args See {@link bp_activity_get_public_message_button_args()}. 3488 3488 */ 3489 3489 function bp_send_public_message_button( $args = '' ) { … … 3492 3492 3493 3493 /** 3494 * Return button for sending a public message (an @-mention). 3495 * 3496 * @since 1.2.0 3497 * 3494 * Get the arguments for the public message button. 3495 * 3496 * @since 11.0.0 3498 3497 * 3499 3498 * @param array|string $args { 3500 * All arguments are optional. See {@link BP_Button} for complete 3501 * descriptions. 3502 * @type string $id Default: 'public_message'. 3503 * @type string $component Default: 'activity'. 3504 * @type bool $must_be_logged_in Default: true. 3505 * @type bool $block_self Default: true. 3506 * @type string $wrapper_id Default: 'post-mention'. 3507 * @type string $link_href Default: the public message link for 3508 * the current member in the loop. 3509 * @type string $link_text Default: 'Public Message'. 3510 * @type string $link_class Default: 'activity-button mention'. 3499 * All arguments are optional. See {@link BP_Button} for complete 3500 * descriptions. 3501 * @type string $id Default: 'public_message'. 3502 * @type string $component Default: 'activity'. 3503 * @type bool $must_be_logged_in Default: true. 3504 * @type bool $block_self Default: true. 3505 * @type string $wrapper_id Default: 'post-mention'. 3506 * @type string $link_href Default: the public message link for 3507 * the current member in the loop. 3508 * @type string $link_title Default: 'Send a public message on your 3509 * activity stream.'. 3510 * @type string $link_text Default: 'Public Message'. 3511 * @type string $link_class Default: 'activity-button mention'. 3511 3512 * } 3512 * @return string The button for sending a public message. 3513 */ 3514 function bp_get_send_public_message_button( $args = '' ) { 3515 3516 $r = bp_parse_args( 3513 * @return array The arguments for the public message button. 3514 */ 3515 function bp_activity_get_public_message_button_args( $args = '' ) { 3516 $button_args = bp_parse_args( 3517 3517 $args, 3518 3518 array( … … 3523 3523 'wrapper_id' => 'post-mention', 3524 3524 'link_href' => bp_get_send_public_message_link(), 3525 'link_title' => __( 'Send a public message to this member.', 'buddypress' ), 3525 3526 'link_text' => __( 'Public Message', 'buddypress' ), 3526 3527 'link_class' => 'activity-button mention', … … 3533 3534 * @since 1.2.10 3534 3535 * 3535 * @param array $r Array of arguments for the public message button HTML. 3536 */ 3537 return bp_get_button( apply_filters( 'bp_get_send_public_message_button', $r ) ); 3536 * @param array $button_args Array of arguments for the public message button HTML. 3537 */ 3538 return apply_filters( 'bp_get_send_public_message_button', $button_args ); 3539 } 3540 3541 /** 3542 * Return button for sending a public message (an @-mention). 3543 * 3544 * @since 1.2.0 3545 * @since 11.0.0 uses `bp_activity_get_public_message_button_args()`. 3546 * 3547 * @see bp_activity_get_public_message_button_args() for description of parameters. 3548 * 3549 * @param array|string $args See {@link bp_activity_get_public_message_button_args()}. 3550 * @return string The button for sending a public message. 3551 */ 3552 function bp_get_send_public_message_button( $args = '' ) { 3553 $button_args = bp_activity_get_public_message_button_args( $args ); 3554 3555 if ( ! array_filter( $button_args ) ) { 3556 return ''; 3557 } 3558 3559 return bp_get_button( $button_args ); 3538 3560 } 3539 3561
Note: See TracChangeset
for help on using the changeset viewer.