I am developing a plugin for an MU site. The MU site has about a few hundred blogs, but there are three types of blogs and they are named as:
blogname/sportstype1 blogname/sportstype2 blogname/sportstype3 blogname/celebritytype1 blogname/celebritytype2 etc.
I need to make two functions, one for type1, and the other function for the rest (type2/3). I have a function I made, wanted to ask is this the right/best way to do this:
$whatistype = <?php get_bloginfo('site_url'); ?>
$type = <?php substr( $whatistype, -4);
<?php if ( $type == "type1 )
{ include 'type1list.php';
/* Or code */
}
else
{ include 'typelistother.php
/* Or code */
}
?>
Also, I would want this to run only when a blog is created. I will check under the hood at Cets Default plugin, but would it be best to make this a plugin and activate sitewide or make into an MU-plugin? How would I go about making a plugin for the mu-folder (can't find much documentation on it).