[wp-hackers] absolute URLs in plug-ins and custom types
Ryan McCue
lists at rotorised.com
Fri Jul 6 13:46:38 UTC 2012
Mika A Epstein wrote:
> John's reason is exactly why I don't do it, too.
What about filtering on post save to replace the URLs with the
shortcode? (Possibly using post_content_filtered)
> Also you have to be careful with shortcodes, someone else could hijack it with a plugin.
True, but that's no different to filtering the_content.
> (Also I have this niggling memory that a hardcoded URL is faster than a shortcode, which would make sense - caching would grab the full domain).
I can certainly see that, but I'd guess that's a micro-optimisation at
best. IIRC, the shortcode filter runs pretty much all the time anyway.
--
Ryan McCue
<http://ryanmccue.info/>
More information about the wp-hackers
mailing list