Changeset 11791
- Timestamp:
- 01/04/2018 03:36:24 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-template.php
r11777 r11791 1388 1388 /** 1389 1389 * Output the 'Private Message' button for member profile headers. 1390 */ 1391 function bp_send_message_button() { 1392 echo bp_get_send_message_button(); 1390 * 1391 * @since 1.2.0 1392 * @since 3.0.0 Added `$args` parameter. 1393 * 1394 * @param array|string $args See {@link bp_get_send_message_button()}. 1395 */ 1396 function bp_send_message_button( $args = '' ) { 1397 echo bp_get_send_message_button( $args ); 1393 1398 } 1394 1399 /** 1395 1400 * Generate the 'Private Message' button for member profile headers. 1396 1401 * 1397 * @return string 1398 */ 1399 function bp_get_send_message_button() { 1402 * @since 1.2.0 1403 * @since 3.0.0 Added `$args` parameter. 1404 * 1405 * @param array|string $args { 1406 * All arguments are optional. See {@link BP_Button} for complete 1407 * descriptions. 1408 * @type string $id Default: 'private_message'. 1409 * @type string $component Default: 'messages'. 1410 * @type bool $must_be_logged_in Default: true. 1411 * @type bool $block_self Default: true. 1412 * @type string $wrapper_id Default: 'send-private-message'. 1413 * @type string $link_href Default: the private message link for 1414 * the current member in the loop. 1415 * @type string $link_text Default: 'Private Message'. 1416 * @type string $link_class Default: 'send-message'. 1417 * } 1418 * @return string 1419 */ 1420 function bp_get_send_message_button( $args = '' ) { 1421 1422 $r = bp_parse_args( $args, array( 1423 'id' => 'private_message', 1424 'component' => 'messages', 1425 'must_be_logged_in' => true, 1426 'block_self' => true, 1427 'wrapper_id' => 'send-private-message', 1428 'link_href' => bp_get_send_private_message_link(), 1429 'link_text' => __( 'Private Message', 'buddypress' ), 1430 'link_class' => 'send-message', 1431 ) ); 1432 1433 1400 1434 // Note: 'bp_get_send_message_button' is a legacy filter. Use 1401 1435 // 'bp_get_send_message_button_args' instead. See #4536. … … 1409 1443 * @param array $value See {@link BP_Button}. 1410 1444 */ 1411 bp_get_button( apply_filters( 'bp_get_send_message_button_args', array( 1412 'id' => 'private_message', 1413 'component' => 'messages', 1414 'must_be_logged_in' => true, 1415 'block_self' => true, 1416 'wrapper_id' => 'send-private-message', 1417 'link_href' => bp_get_send_private_message_link(), 1418 'link_text' => __( 'Private Message', 'buddypress' ), 1419 'link_class' => 'send-message', 1420 ) ) ) 1445 bp_get_button( apply_filters( 'bp_get_send_message_button_args', $r ) ) 1421 1446 ); 1422 1447 }
Note: See TracChangeset
for help on using the changeset viewer.