Title: Programatically activate / deactivate different options for certain blogs
Last modified: August 20, 2016

---

# Programatically activate / deactivate different options for certain blogs

 *  [jasiekjp](https://wordpress.org/support/users/jasiekjp/)
 * (@jasiekjp)
 * [14 years ago](https://wordpress.org/support/topic/programatically-activate-deactivate-different-options-for-certain-blogs/)
 * hi there
 * i am trying to alter the default WPMU registration process to match my requirements,
   and so far i managed to get the user registration / blog creation working. what
   i am now trying to do, is to write a set of simple functions to manage those 
   sub-sites options programatically.
 * i need to enable / disable certain themes for certain users. so i want to create
   a function that could look something like this:
 *     ```
       function enable_themes_for_user($theme_names = array(), $user_id){
       }
       ```
   
 * and then call it like this:
 * `enable_themes_for_user(array('twentyten', 'twentyeleven'), 123);`
 * or the other way around – i could just disable certain themes for a specific 
   user, ie. `disable_themes_for_user(array('twentyten', 'premium_theme'), 123);`
 * in addition to this, i also want to restrict users from accessing some items 
   in their dashboard. i am looking for ways to disable _Post_s, _Links_, _Comments_,
   _Widgets_, _Users_, entire _Tools _menu and everything in the _Settings _menu
   except for the _General settings_ page.
 * **i want to be able to do this for specific users based on my liking**, so, lets
   say Peter and John have a blog on my WPMU install and i want Peter to be able
   to have access to the _Posts _menu but i dont want John to be able to create 
   any posts at all. now, i know that i can do this just by removing those items
   from the dashboard menu based on the logged in user ID, but i was wondering if
   there is any more efficient / secure way of doing this?
 * ideally i would like to have a function that goes something like this:
 * `disable_for_client_sites($allowed_menu_items = array(), $user_id)`
 * and i would call it like that:
 * `disable_for_client_sites(array('settings', 'posts', 'tools', 'widgets'), 123);`
 * can you make any suggestions on whats the best way to achieve this?
 * any help will be GREATLY appreciated.

Viewing 1 replies (of 1 total)

 *  Thread Starter [jasiekjp](https://wordpress.org/support/users/jasiekjp/)
 * (@jasiekjp)
 * [14 years ago](https://wordpress.org/support/topic/programatically-activate-deactivate-different-options-for-certain-blogs/#post-2805109)
 * i forgot to mention that i want to activate / deactivate plugins for users in
   the same manner.

Viewing 1 replies (of 1 total)

The topic ‘Programatically activate / deactivate different options for certain blogs’
is closed to new replies.

## Tags

 * [different](https://wordpress.org/support/topic-tag/different/)
 * [multisite](https://wordpress.org/support/topic-tag/multisite/)
 * [restrictions](https://wordpress.org/support/topic-tag/restrictions/)
 * [rights](https://wordpress.org/support/topic-tag/rights/)
 * [set](https://wordpress.org/support/topic-tag/set/)
 * [Themes](https://wordpress.org/support/topic-tag/themes/)
 * [user](https://wordpress.org/support/topic-tag/user/)
 * [wpmu](https://wordpress.org/support/topic-tag/wpmu/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 1 reply
 * 1 participant
 * Last reply from: [jasiekjp](https://wordpress.org/support/users/jasiekjp/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/programatically-activate-deactivate-different-options-for-certain-blogs/#post-2805109)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
