/** * Return button for sending a public message (an @-mention). * * @since BuddyPress (1.2.0) * * @uses bp_get_send_public_message_link() * @uses wp_parse_args() * @uses bp_get_button() * @uses apply_filters() To call the 'bp_get_send_public_message_button' hook. * * @param array $args { * All arguments are optional. See {@link BP_Button} for complete * descriptions. * @type string $id Default: 'public_message'. * @type string $component Default: 'activity'. * @type bool $must_be_logged_in Default: true. * @type bool $block_self Default: true. * @type string $wrapper_id Default: 'post-mention'. * @type string $link_href Default: the public message link for * the current member in the loop. * @type string $link_title Default: 'Send a public message on your * activity stream.'. * @type string $link_text Default: 'Public Message'. * @type string $link_class Default: 'activity-button mention'. * } * @return string The button for sending a public message. */ function bp_get_send_public_message_button($args = '') { $r = bp_parse_args($args, array('id' => 'public_message', 'component' => 'activity', 'must_be_logged_in' => true, 'block_self' => true, 'wrapper_id' => 'post-mention', 'link_href' => bp_get_send_public_message_link(), 'link_title' => __('Send a public message on your activity stream.', 'buddypress'), 'link_text' => __('Public Message', 'buddypress'), 'link_class' => 'activity-button mention')); /** * Filters the public message button HTML. * * @since BuddyPress (1.2.10) * * @param array $r Array of arguments for the public message button HTML. */ return bp_get_button(apply_filters('bp_get_send_public_message_button', $r)); }
/** * Return button for sending a public message * * @since 1.2.0 * * @param array $args Optional * * @uses bp_get_send_public_message_link() * @uses nxt_parse_args() * @uses bp_get_button() * @uses apply_filters() To call the 'bp_get_send_public_message_button' hook * * @return string The button for sending a public message */ function bp_get_send_public_message_button($args = '') { $defaults = array('id' => 'public_message', 'component' => 'activity', 'must_be_logged_in' => true, 'block_self' => true, 'wrapper_id' => 'post-mention', 'link_href' => bp_get_send_public_message_link(), 'link_title' => __('Send a public message on your activity stream.', 'buddypress'), 'link_text' => __('Public Message', 'buddypress'), 'link_class' => 'activity-button mention'); $button = nxt_parse_args($args, $defaults); // Filter and return the HTML button return bp_get_button(apply_filters('bp_get_send_public_message_button', $button)); }
/** * bp_get_send_public_message_button( $args ) * * Return button for sending a public message * * @param array $args * @return string */ function bp_get_send_public_message_button( $args = '' ) { $defaults = array( 'id' => 'public_message', 'component' => 'activity', 'must_be_logged_in' => true, 'block_self' => true, 'wrapper_id' => 'post-mention', 'link_href' => bp_get_send_public_message_link(), 'link_title' => __( 'Mention this user in a new public message, this will send the user a notification to get their attention.', 'buddypress' ), 'link_text' => __( 'Mention this User', 'buddypress' ) ); $button = wp_parse_args( $args, $defaults ); // Filter and return the HTML button return bp_get_button( apply_filters( 'bp_get_send_public_message_button', $button ) ); }