Skip to main content

How to replace sounds in the plugin?

REQUIREMENTS

To be able to implement this guide, you need to learn how to insert PHP snippets to your website.

You can find guide here: WP Beginner

Plugin keeps sound notifications files in this folder: /plugins/bp-better-messages/assets/sounds

You need copy this folder to another location in your website which will not be overwritten on plugin update.

For example inside the root folder of your website you can create folder sounds.

With this filter you can overwrite the folder in which plugin will search for sound files.

<?php
add_filter('bp_better_messages_sounds_assets', function($sounds_url){
return 'https://yourwebsite.com/sounds/'; // New sounds url
});

Then you can replace sounds file for your own in that new folder.