[wp-hackers] absolute URLs in plug-ins and custom types

Mika A Epstein ipstenu at ipstenu.org
Fri Jul 6 12:35:08 UTC 2012


John's reason is exactly why I don't do it, too.

It's easier to search for 'one' thing, and the more specific that is (domain.com/foobar/ vs /foobar/) the easier your grep will be. Also you have to be careful with shortcodes, someone else could hijack it with a plugin. (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).

----
Mika A Epstein (aka Ipstenu)
http://ipstenu.org | http://halfelf.org

On 6 Jul 2012, at 3:46:38AM, John Blackbourn wrote:

> On 6 July 2012 09:23, Ryan McCue <lists at rotorised.com> wrote:
>> You know, I'm sure I've asked this before, but why doesn't WordPress just
>> insert URLs into posts as <a href="[home]/2012/01/01/abc/"> ?
>> 
>> This would save everyone a lot of pain, IMHO.
>> 
>> (I'm also willing to put my money where my mouth is and write a patch, but
>> I'm sure we've discussed this before, so I'll hold off.)
> 
> This isn't a bad approach and I've considered it myself, but it
> doesn't solve cases where one of your authors comes along and
> copy-pastes a page URL into the post content.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list