Title: Multisite Support
Last modified: August 20, 2016

---

# Multisite Support

 *  [orangebubble](https://wordpress.org/support/users/orangebubble/)
 * (@orangebubble)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/multisite-support-4/)
 * To only display network enabled themes i have done the following:
 * Replace line 306’s code:
    `$avaliable_themes = get_themes();`
 * With the following 2 lines
 *     ```
       $defaults = array('allowed' => true);
       $avaliable_themes  = wp_get_themes($defaults);
       ```
   
 * This will replace the get_themes which is now deprecated.
 * This is in action on [http://www.myinstantsite.co.uk](http://www.myinstantsite.co.uk)
   where we allow users to sign up for a site and select a theme using this awesome
   plugin!
 * Enjoy!
 * [http://wordpress.org/extend/plugins/theme-selector/](http://wordpress.org/extend/plugins/theme-selector/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [orangebubble](https://wordpress.org/support/users/orangebubble/)
 * (@orangebubble)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/multisite-support-4/#post-3136957)
 * I found an issue with multisites – user could edit other sites themes from the
   admin bar theme menu even if they didnt have the access to the other multisite
   sites!!
 * Add the following code above line 19 which states
    `$wp_admin_bar->add_menu( 
   array(`
 * Add this code:
 *     ```
       $admin_access = apply_filters( 'et_showcontrol_panel', current_user_can('switch_themes') );
       	if ( !$admin_access ) return;
       ```
   
 * The code should now look like this:
 *     ```
       function add_theme_selector( $wp_admin_bar ) {
   
       	if (is_user_logged_in() && (!isset($_REQUEST['template']) || $_REQUEST['template']=='')) 
   
       	$admin_access = apply_filters( 'et_showcontrol_panel', current_user_can('switch_themes') );
       	if ( !$admin_access ) return;
       		$wp_admin_bar->add_menu( array(
       		'title' => __( 'Change Theme', 'direitoamoradia' ) ,
       		'id' => 'change_theme',
       		'href' => get_bloginfo('url').'/?customize=true' )
       	);	
   
       }
       add_action( 'admin_bar_menu', 'add_theme_selector' );
       ```
   
 *  [Peidong Hu](https://wordpress.org/support/users/zhouyibhic/)
 * (@zhouyibhic)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multisite-support-4/#post-3137012)
 * I am using the wordpress 3.3, the wp_get_themes() is not supported by this version,
   I replaced the line
    $avaliable_themes = get_themes(); with $wp_list_table = 
   _get_list_table(‘WP_Themes_List_Table’); $wp_list_table->prepare_items(); $avaliable_themes
   = $wp_list_table->items;
 * to display network enabled themes

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Multisite Support’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/theme-selector.svg)
 * [theme-selector](https://wordpress.org/plugins/theme-selector/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/theme-selector/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/theme-selector/)
 * [Active Topics](https://wordpress.org/support/plugin/theme-selector/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/theme-selector/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/theme-selector/reviews/)

## Tags

 * [multisite](https://wordpress.org/support/topic-tag/multisite/)

 * 2 replies
 * 2 participants
 * Last reply from: [Peidong Hu](https://wordpress.org/support/users/zhouyibhic/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/multisite-support-4/#post-3137012)
 * Status: not resolved