[wp-hackers] Two new, long-overdue plugins to make your wordpress life a little easier... (Marcus Pope)

Eric Anderson wp-hackers at on-e.com
Sat Oct 29 00:35:51 UTC 2011


I can see both sides of this discussion - I personally favor relative 
URLs stored in the DB, but I recognize the fact that absolutes (with 
regard to newbies) are probably less hassle.

I suspect this is probably a 75/25 problem -- 75% of the people don't 
care or want it the way it is, and 25% want at least the option of 
relative URLs.

Seems like there's a pretty easy solution though:

- Absolute/relative URL option in the admin

- Absolute is default and recommended (so existing installs and plugins 
don't break)

- If you toggle the option, an internal function can add/remove the 
domain from the database (can't have mixed absolutel/relative URLs)

- Add an external filter when relative is enabled to add the 
domain for RSS/email feeds

This way, the default install remains exactly the same (i.e. no 
additional filters), and the relative URL option only has an additional 
filter on external exports, which seems to be acceptable.

Three simple pieces?  There might be other circumstances that need to be 
addressed but I'll leave that up to those smarter than I.



More information about the wp-hackers mailing list