wpexpertsio / new-user-approve

WordPress plugin that allows an admin to approve new users
http://wordpress.org/plugins/new-user-approve/
GNU General Public License v2.0
60 stars 45 forks source link

Welcome msg is bugged, filter doesn't work #63

Open Rayken opened 7 years ago

Rayken commented 7 years ago

https://github.com/picklewagon/new-user-approve/blob/master/includes/messages.php#L54

That line doesn't work as it shows up as {sitename} front-end. If you change the 'tag' to %s, it does work. It doesn't pass the nua_tag thing for some reason. But then there's a filter:

$welcome = apply_filters( 'new_user_approve_welcome_message_default', $welcome );

But that filter isn't functioning for whatever reason, I can't override it to "fix" the bug.

add_filter( 'new_user_approve_welcome_message_default', 'change_welcome_message', 10, 1 );  
function change_welcome_message( $welcome ) {
    return 'Not working';
}

I've also tried running above on init, plugins_loaded, after_setup_theme, none of which seems to modify the message. Don't know why though.

Thanks!