Remove default post types on all sites except primary blog. WPMU

I don’t use Multisite much, but I believe something like this might work:

If I’m not mistaken, global $blog_id; lets you access the various “Blogs” ids. Then, the “Main Blog” should have an ID of 1.

So, removing the post type menus from all blogs that DO NOT have the id of 1 would go something like this:

<?php 

function remove_menus() {    

    global $blog_id, $menu;

    if( $blog_id != '1' ) {

        $restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Comments'), __('Plugins'));

        end ($menu);    

        while (prev($menu)){
    $value = explode(' ',$menu[key($menu)][0]);
    if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
    }

    }
} 
?>

add_action('admin_menu', 'remove_menus');

This is where I got the Remove Menus function:

http://www.wprecipes.com/how-to-remove-menus-in-wordpress-dashboard

Note: This hasn’t been tested. Just a theory. . .I don’t use multisite often and don’t have one set up to try this on at the moment.

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş