Skip to main content

better_messages_single_message_class

REQUIREMENTS

To be able to implement this guide, you need to learn how to use JS snippets at your website.

One of guides: https://dev.to/david_woolf/how-to-get-started-with-wordpress-hooks-in-javascript-400o

Compatibility
This filter compatible with Better Messages 2.0.101 or higher
wp.hooks.addFilter('better_messages_single_message_class', 'my_custom_actions', function (classes, message) {
console.log( message ); // Here you can get message object

classes += ' custom_class';
return classes; // Processing to default click event
})