WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: New User Approve] Using Filters to Customize Messages

[Resolved] [Plugin: New User Approve] Using Filters to Customize Messages

  • Hi Picklewagon,
    Thanks for your work on this plugin. It’s been working good so far. I wanted to tweak the output of the messages on the login and register pages and I see you provided filters in order to do that within the plugin, but I’m not very good with PHP and the function I’ve written (my theme’s functions.php) to tap into your filters keeps causing 500 Internal server error’s.

    // Plugs into New User Approve Plugin to customise login message
    
    function customize_welcome_message($welcome) {
          $welcome = echo 'This login is for students of Naada Yoga\'s Teacher Training program only. If you are looking to pay for or sign up for classes go <a href="http://clients.mindbodyonline.com/asp/ws.asp?studioid=6387">here.</a>';
        }
    add_filter( 'new_user_approve_welcome_message', 'customize_welcome_message' );

    Can you see why this wouldn’t be working? Is it something about variable scope?

    Thanks a bunch.

    http://wordpress.org/extend/plugins/new-user-approve/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Josh Harrison

    @picklewagon

    Try the following code and you should be good to go:

    function customize_welcome_message( $welcome ) {
    	$welcome = 'This login is for students of Naada Yoga\'s Teacher Training program only. If you are looking to pay for or sign up for classes go <a href="http://clients.mindbodyonline.com/asp/ws.asp?studioid=6387">here.</a>';
    	return $welcome;
    }
    add_filter( 'new_user_approve_welcome_message', 'customize_welcome_message' );

    Thanks Picklewagon!
    I see I was missing the ‘return $welcome’ and perhaps also the HTML entities used in the link tag could have been causing problems too?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: New User Approve] Using Filters to Customize Messages’ is closed to new replies.