[wp-hackers] Why always absolute paths?

Piyush Mishra admin at oxymaniac.com
Thu Apr 22 15:47:21 UTC 2010


I guess having all links made by a function is a good idea as one can
control broken links very well that way...

Having a "shortcode" will really help. I referred to this as the [wpurl]
replace
I have submitted a little something related to this in my proposal for
GSOC2010 on WPmove
http://piyushmishra.com/blog/ideas/wpmove.html

The basic idea is this:-
In future versions of WP, we can have [wpurl] as a shortcode or core tag
which is loaded from the db and contains the fullpath to the blog URL. This
will ease out the need for search and replace of urls in database in the
event of change of domains or directory of the blog etc.
In case where the user himself feeds in a full path, a prompt may come up
for him to choose whether he wants the URL to stay or get replaced by the
[wpurl] tag

but this will add an overhead of making the search [wpurl] and replacing it
for every internal link URL that gets rendered.


in the prev conversation Otto had proposed a change in maybe_unserialize()
function which made the count of the characters in an element of the array
useless.. in simpler language, the error in unserializing a serialized array
if the number of characters in the domain changes has a work around and we
can go on with the present way of having full domain names and changing the
func to unserialize it.
http://piyushmishra.com/blog/ideas/backup-of-db.html

this will also add to the overhead but in this case the overhead will not be
everywhere the url is used but only in cases where the URL is serialized...

Which one is the better way to go?


-- 
Regards
Piyush Mishra


More information about the wp-hackers mailing list