This is a very simple function to convert a user-supplied URL to just the domain name.
There are three options (that I know of) for automatically enabling a plugin in new sites.
When you create a new WordPress Multisite blog from the admin area, you have to enter three things: Site address (subdomain or folder name), Site title and Admin email…
I used this code snippet as part of a WordPress Multisite plugin, to allow me to quickly set some options for all blogs in the network.
This code was used to generate a menu showing all blogs on a WordPress Multisite installation.
The WordPress function the_category() doesnt work particularly well when you have hierarchical categories.
I used this code to automatically set the default post title, category and tags for a new WordPress post based on which link was clicked.
On one WordPress blog I have categories for “Starred” and “Archived”, in addition to the real categories. I hacked this together to make sure the posts would still go into Uncategorised as well.
This is a follow-up to Toggle “Starred” Category in WordPress – making it more generic and usable for multiple categories.
Even if you disable all but one theme, WordPress seems to default to TwentyTen when creating a new Multisite blog. The fix is simple though – add this to wp-config.php.
I did this simple hack on a private WordPress Multisite blog, to stop it sending me emails every time I created a new blog. It’s definitely overkill to stop all emails, but unfortunately I couldn’t find any hooks that let…