Replace 'Already registered?' with 'Already a member?' in eo_login_form

WordPress Event Management, Calendars & Registration Forums General Question Replace 'Already registered?' with 'Already a member?' in eo_login_form

This topic contains 2 replies, has 2 voices, and was last updated by  Jon Packman 10 years, 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8735

    Is there a way to replace ‘Already registered?’ with ‘Already a member?’ in the eo_login_form? I see it comes from the eventorganiser_pro_login_form_top function (below) but can’t work out how to change it. Thanks.

    
    function eventorganiser_pro_login_form_top( $top ) {
        remove_filter( current_filter(), __FUNCTION__ );
        return __( 'Already registered?', 'eventorganiserp' ).'</br>'.'<input type="hidden" name="eo_username_or_email" value="1">'.$top;
    }
    
    Jon Packman
    #8744

    Hi Jon,

    It’s not an easy thing to do – and is perhaps something that should change to make it easier. But here’s one way of doing it: remove the filter and add your own which does exactly the same thing but with a different message:

    add_filter( 'login_form_top', 'jon_login_form_top', 5 );
    function jon_login_form_top( $top ){
        if( remove_filter( 'login_form_top', 'eventorganiser_pro_login_form_top' ) ){
            $top = 'Already a member?' . '</br>'. '<input type="hidden" name="eo_username_or_email" value="1">' . $top;
        }
        return $top;
    }
    Stephen Harris
    #8837

    Thanks Stephen, that works.

    Jon Packman
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.