[wp-hackers] absolute URLs in plug-ins and custom types
Mika A Epstein
ipstenu at ipstenu.org
Fri Jul 6 13:51:20 UTC 2012
Ryan - All that felt like just an epic ton of work to solve something that I didn't feel was a problem ;)
I don't like reinventing the wheel, or complicating my code to make something 'simpler' for a user who has to remember to do [home]\whatever\url - Telling them 'Put the whole URL in, http://domain.com/foobar for example' is easier, it's consistent, and it always works on any site they ever go to. Less to untrain the novice (dad) later.
The only person a shortcode or filter might help is the dev, and the dev already knows what to search/replace on anyway.
Mika A Epstein (aka Ipstenu)
http://ipstenu.org | http://halfelf.org
On 6 Jul 2012, at 8:46:38AM, Ryan McCue wrote:
> 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
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers