WordPress.org

Ready to get started?Download WordPress

Forums

Theme My Login
[resolved] Update in the documentation of Changing Action Links (7 posts)

  1. Daedalon
    Member
    Posted 1 year ago #

    http://www.jfarthing.com/development/theme-my-login/changing-action-links/

    The example needs a ; in the end of the following line in order not to break the site immediately upon activation:

    $url = 'YOUR REGISTRATION URL HERE'

    For a second improvement, the documentation could change that this only changes where the action links point to, and that to have there be a proper page where the new link points to something else needs to be done, and a link to that documentation (which I'm trying to find :)).

    For a third improvement, I'd make the example use curly braces "{}" with the if. The WordPress coding standards don't insist on this, but many others do due to the amount of time wasted on hunting bugs that were caused by editing code that didn't originally contain these. Even experts fall for that sometimes, and the people using copy-paste solutions from the documentation are mainly not experts, so two curly braces in a copy-paste can save a lot of headache around the world.

    http://wordpress.org/extend/plugins/theme-my-login/

  2. Jeff Farthing
    Member
    Plugin Author

    Posted 1 year ago #

    I've added the missing semi-colon. Thanks for pointing that out.

  3. somebodyElse
    Member
    Posted 1 year ago #

    Where in the world do you put the tml_action_url filter?

  4. bobibrown0
    Member
    Posted 1 year ago #

    I'd like to know this too, where do you add the tml_action_url filter ?
    I put it in the function.php of my theme, but not working.

  5. Jeff Farthing
    Member
    Plugin Author

    Posted 1 year ago #

    There's no reason it shouldn't work in your theme's functions.php file.

  6. bobibrown0
    Member
    Posted 1 year ago #

    okay, for example I don't want the user to be able to see the wordpress dashboard.

    So I tried:

    function tml_action_url( $url, $action, $instance ) {
    	if ( 'profile' == $action )
    		$url = 'http://mywebsite.com/customdashboard/';
    	return $url;
    }
    add_filter( 'tml_action_url', 'tml_action_url', 10, 3 );

    And yes I added this to the very bottom of my function.php file. I guess I did a mistake then?

  7. Jeff Farthing
    Member
    Plugin Author

    Posted 1 year ago #

    That function simply changes the output of the profile link.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.