Hi, i have this snippet in a input field which allows you to transform all words from uppercase to lowercase. Is it possible to add to this a script with a list of prohibited words (to be inserted later) and an alert to the user indicating that he has entered a prohibited word when will he click the send button? Thank you
add_action( 'hivepress/v1/models/listing/update', 'custom_update_listing_title', 1000, 2);
function custom_update_listing_title($listing_id, $listing){
remove_action( 'hivepress/v1/models/listing/update', 'custom_update_listing_title', 1000, 2);
$listing->set_title(ucwords(strtolower($listing->get_title())))->save_title();
}