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

  1. Daedalon
    Posted 3 years ago #


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


    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.


  2. Jeff Farthing
    Plugin Author

    Posted 3 years ago #

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

  3. somebodyElse
    Posted 3 years ago #

    Where in the world do you put the tml_action_url filter?

  4. bobibrown0
    Posted 3 years 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
    Plugin Author

    Posted 3 years ago #

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

  6. bobibrown0
    Posted 3 years 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
    Plugin Author

    Posted 3 years ago #

    That function simply changes the output of the profile link.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Theme My Login
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.