• Resolved blaksheep

    (@blaksheep)


    We were using this action to change the registration link:

    function tml_action_url( $url, $action, $instance ) {
    if ( ‘register’ == $action )
    $url = ( ‘https://salesreps.microgendx.com/new-rep-registration/’ );
    return $url;
    }
    add_filter( ‘tml_action_url’, ‘tml_action_url’, 10, 3 );

    However, it seems after updating to TML 7, this function is no longer working for some reason. Any ideas?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    Try this instead:

    
    function custom_tml_action_url( $url, $action, $scheme, network ) {
        if ( ‘register’ == $action ) {
            $url = 'https://salesreps.microgendx.com/new-rep-registration/';
        }
        return $url;
    }
    add_filter( ‘tml_get_action_url’, ‘custom_tml_action_url’, 10, 4 );
    
    Thread Starter blaksheep

    (@blaksheep)

    It’s still defaulting to https://salesreps.microgendx.com/register

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Looks like you are right. We will need to refactor when/how that link is filtered. Meanwhile, you should be able to receive the same result by simply changing the slug in TML settings to the slug of the page you want to use.

    Thread Starter blaksheep

    (@blaksheep)

    I would, but since updating I don’t have a TML Settings menu item in my WP admin menu anymore…

    Plugin Author Jeff Farthing

    (@jfarthing84)

    It would actually be labeled “Theme My Login” now…

    Thread Starter blaksheep

    (@blaksheep)

    Well, either way, neither one is listed in the main menu or under Tools or Settings. There is also no link to settings on the plugin page.

    Thread Starter blaksheep

    (@blaksheep)

    It’s not lost on me how quickly you are replying by the way. I greatly appreciate that ??

    Plugin Author Jeff Farthing

    (@jfarthing84)

    You don’t see this?

    Screen Shot 2018 07 10 at 3 51 43 PM

    Thread Starter blaksheep

    (@blaksheep)

    Nope. Here is what I have: https://snag.gy/G1BK7e.jpg

    Thread Starter blaksheep

    (@blaksheep)

    It’s a multisite if that makes a difference.

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Actually, it does. You’ll now find TML settings in your network administration.

    Thread Starter blaksheep

    (@blaksheep)

    Ah, that’s the problem. I see it in network settings now. However, I don’t really need to change those pages network wide. Is one of your extensions available able to handle that?

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Unfortunately, no. TML is now a network-wide plugin, as it always should have been, considering that user registration is global in multisite.

    Thread Starter blaksheep

    (@blaksheep)

    I suppose that’s true. Just depends on your use I suppose. We collect different information for each different site. So there are different registration forms for each site. Hence the need for a different registration link on the login form and a different password reset link as well. It would also help with continuity if for instance someone was registering for one site, but was redirected to another that was branded a bit differently, it would be a bit confusing for the user.

    I guess I can just hide the registration link for now until the action is updated. Thanks again for the quick response.

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Here’s another approach:

    
    function modify_tml_form_links( $links, $form ) {
        if ( isset( $links['register'] ) ) {
            $links['register']['url'] = 'YOUR NEW URL';
        }
        return $links;
    }
    add_filter( 'tml_get_form_links', 'modify_tml_form_links', 10, 2 );
    
Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Changing registration link’ is closed to new replies.