3 * Multisite themes administration panel.
6 * @subpackage Multisite
10 require_once( './admin.php' );
12 if ( ! current_user_can( 'manage_network_themes' ) )
13 wp_die( __( 'You do not have permission to access this page.' ) );
15 $title = __( 'Network Themes' );
16 $parent_file = 'ms-admin.php';
18 add_contextual_help($current_screen,
19 '<p>' . __('This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.') . '</p>' .
20 '<p>' . __('If the network admin disables a theme that is in use, it can still remain selected on that site. If another theme is chosen, the disabled theme will not appear in the site’s Appearance > Themes screen.') . '</p>' .
21 '<p>' . __('Themes can be enabled on a site by site basis by the network admin on the Edit Site screen you go to via the Edit action link on the Sites screen.') . '</p>' .
22 '<p><strong>' . __('For more information:') . '</strong></p>' .
23 '<p>' . __('<a href="http://codex.wordpress.org/Super_Admin_Themes_SubPanel" target="_blank">Documentation on Network Themes</a>') . '</p>' .
24 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
27 require_once( './admin-header.php' );
29 if ( isset( $_GET['updated'] ) ) {
31 <div id="message" class="updated"><p><?php _e( 'Site themes saved.' ) ?></p></div>
35 $themes = get_themes();
36 $allowed_themes = get_site_allowed_themes();
39 <form action="<?php echo esc_url( admin_url( 'ms-edit.php?action=updatethemes' ) ); ?>" method="post">
40 <?php screen_icon(); ?>
41 <h2><?php _e( 'Network Themes' ) ?></h2>
42 <p><?php _e( 'Themes must be enabled for your network before they will be available to individual sites.' ) ?></p>
44 <input type="submit" value="<?php _e( 'Apply Changes' ) ?>" /></p>
45 <table class="widefat">
48 <th style="width:15%;"><?php _e( 'Enable' ) ?></th>
49 <th style="width:25%;"><?php _e( 'Theme' ) ?></th>
50 <th style="width:10%;"><?php _e( 'Version' ) ?></th>
51 <th style="width:60%;"><?php _e( 'Description' ) ?></th>
56 $total_theme_count = $activated_themes_count = 0;
58 foreach ( (array) $themes as $key => $theme ) {
60 $theme_key = esc_html( $theme['Stylesheet'] );
61 $class = ( 'alt' == $class ) ? '' : 'alt';
62 $class1 = $enabled = $disabled = '';
63 $enabled = $disabled = false;
65 if ( isset( $allowed_themes[$theme_key] ) == true ) {
67 $activated_themes_count++;
73 <tr valign="top" class="<?php echo $class . ' ' . $class1; ?>">
75 <label><input name="theme[<?php echo $theme_key ?>]" type="radio" id="enabled_<?php echo $theme_key ?>" value="enabled" <?php checked( $enabled ) ?> /> <?php _e( 'Yes' ) ?></label>
77 <label><input name="theme[<?php echo $theme_key ?>]" type="radio" id="disabled_<?php echo $theme_key ?>" value="disabled" <?php checked( $disabled ) ?> /> <?php _e( 'No' ) ?></label>
79 <th scope="row" style="text-align:left;"><?php echo $key ?></th>
80 <td><?php echo $theme['Version'] ?></td>
81 <td><?php echo $theme['Description'] ?></td>
88 <input type="submit" value="<?php _e( 'Apply Changes' ) ?>" /></p>
91 <h3><?php _e( 'Total' )?></h3>
93 <?php printf( __( 'Themes Installed: %d' ), $total_theme_count); ?>
95 <?php printf( __( 'Themes Enabled: %d' ), $activated_themes_count); ?>
99 <?php include( './admin-footer.php' ); ?>