How Can We Help?

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/';
}
Table of Contents