Cussedness
The natural cussedness of things in general.
-
Wordpress Dynamic Site URL Plugin
Behold! I just created my first Wordpress plugin: Dynamic Site URL.
Actually, strictly speaking, I didn’t write it, I just lifted it from this thread on wordpress.org and added one extra line to make it work on all parts of a Wordpress install. Hooray for this mysterious chap, who created the five lines of code that do the real work.
It’s useful if you want to run one blog under two domain names and have your links based on the currently active URL. Why would you want to do that? Well, let’s say I have a site at http://www.cussedness.com/, and I want to test a new feature. I don’t want my millions of visitors breaking things horribly if that new feature has some dreadful bug, so what I do is temporarily redirect everyone from http://www.cussedness.com/ to a holding page at http://hold.cussedness.com/, and sneak in round the back via the password protected http://test.cussedness.com/ to check that things are working okay. Without that plugin, Wordpress tries to redirect you to the default site address, but with that little plugin turned on you can check that everything is fine under the test domain. You can click all the links and monkey about with the admin sections and everything.
It probably only works on Wordpress 2.2, is pretty much untested, and is issued completely caveat downloader; if you trash your blog with my ripped-off code, that’s your problem, sorry.