bp_get_message_activate_deactivate_link()
Get the URL for deactivating the current notice.
Description
Return
(string)
Source
File: bp-messages/bp-messages-template.php
function bp_get_message_activate_deactivate_link() {
global $messages_template;
if ( 1 === (int) $messages_template->thread->is_active ) {
$link = wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices/deactivate/' . $messages_template->thread->id ), 'messages_deactivate_notice' );
} else {
$link = wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices/activate/' . $messages_template->thread->id ), 'messages_activate_notice' );
}
/**
* Filters the URL for deactivating the current notice.
*
* @since BuddyPress 1.0.0
*
* @param string $link URL for deactivating the current notice.
*/
return apply_filters( 'bp_get_message_activate_deactivate_link', $link );
}
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.