Custom messages location

You are here:
< All Topics

This function will output plugin layout at any place:

/**
* Displaying messages in custom place
*/
echo BP_Better_Messages()->functions->get_page();

Need point to custom place location with next filter, so the notifications of plugin are directing to the right place:

/**
* Replacing plugin URL
*/
add_filter('bp_better_messages_page', 'overwrite_better_messages_location', 10, 2 );
function overwrite_better_messages_location( $url, $user_id ) {
    return bp_core_get_user_domain( $user_id ) . 'settings/messages/';
}
Previous Creating link to new thread screen with prefilled username and message
Next Dark Mode with CSS
Table of Contents