WordPress.org

Support

Support » Plugins and Hacks » [Resolved] ? init or template_redirect' action?

[Resolved] ? init or template_redirect' action?

  • Hi There, just installed pretty link lite to try it on for size, wow if this works how absolutely perfect for what I need!!! Thank you for showing up in my life today 🙂

    I am just getting things set up, groups, links, tracking etc. & am wondering if you could help me better understand the differences in using either of those two hooks site is using a pretty complex theme (http://breathepossibility.com) “Black Label” & I just want to be sure I’m not going to break anything LOL ~ so where you say the description “Defaults to use WordPress’ ‘init’ action. Init works more reliably for many users but the better option for performance and compatibility is to use the ‘template_redirect’ action.” I am always drawn of course to “better options” 🙂 but if possible would like to know the “why” of it (was that way as a child too drove my parents nuts) LOL

    Thank you for your kind reply 🙂
    Linda Lou

    http://wordpress.org/extend/plugins/pretty-link/

Viewing 1 replies (of 1 total)
  • Plugin Author Blair Williams

    @supercleanse

    If you have a doubt you should just use init … if you use template_redirect then WordPress has the opportunity to resolve urls before pretty link can redirect. We’ve found that sometimes — even if there’s no actual slug for something in the URL that WordPress will actually guess a post or page that the link should go to and redirect before Pretty Link can even run. So, the option for using ‘template_redirect’ is mainly for advanced users who need it hooked there for a specific purpose.

    Hope that helps,

    Blair

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] ? init or template_redirect' action?’ is closed to new replies.