2010-01-19 21:03:11 +01:00
|
|
|
<?php
|
|
|
|
require_once('admin.php');
|
|
|
|
|
2010-03-19 23:09:34 +01:00
|
|
|
$title = __('Network Themes');
|
2010-01-19 21:03:11 +01:00
|
|
|
$parent_file = 'ms-admin.php';
|
|
|
|
require_once('admin-header.php');
|
|
|
|
|
2010-02-22 19:41:38 +01:00
|
|
|
if ( ! current_user_can( 'manage_network_themes' ) )
|
2010-01-19 21:03:11 +01:00
|
|
|
wp_die( __('You do not have permission to access this page.') );
|
|
|
|
|
2010-01-22 23:28:48 +01:00
|
|
|
if ( isset($_GET['updated']) ) {
|
2010-01-19 21:03:11 +01:00
|
|
|
?>
|
|
|
|
<div id="message" class="updated fade"><p><?php _e('Site themes saved.') ?></p></div>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
|
|
|
|
$themes = get_themes();
|
|
|
|
$allowed_themes = get_site_allowed_themes();
|
|
|
|
?>
|
|
|
|
<div class="wrap">
|
|
|
|
<form action='ms-edit.php?action=updatethemes' method='post'>
|
2010-01-20 23:35:21 +01:00
|
|
|
<?php screen_icon(); ?>
|
2010-03-19 23:09:34 +01:00
|
|
|
<h2><?php _e('Network Themes') ?></h2>
|
|
|
|
<p><?php _e('Disable themes network-wide. You can enable themes on a site by site basis.') ?></p>
|
2010-01-19 21:03:11 +01:00
|
|
|
<table class="widefat">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th style="width:15%;text-align:center;"><?php _e('Active') ?></th>
|
|
|
|
<th style="width:25%;"><?php _e('Theme') ?></th>
|
|
|
|
<th style="width:10%;"><?php _e('Version') ?></th>
|
|
|
|
<th style="width:60%;"><?php _e('Description') ?></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="plugins">
|
|
|
|
<?php
|
|
|
|
$total_theme_count = $activated_themes_count = 0;
|
2010-01-22 23:28:48 +01:00
|
|
|
$class = '';
|
|
|
|
foreach ( (array) $themes as $key => $theme ) {
|
2010-01-19 21:03:11 +01:00
|
|
|
$total_theme_count++;
|
2010-02-13 11:35:10 +01:00
|
|
|
$theme_key = esc_html($theme['Stylesheet']);
|
2010-01-19 21:03:11 +01:00
|
|
|
$class = ('alt' == $class) ? '' : 'alt';
|
|
|
|
$class1 = $enabled = $disabled = '';
|
|
|
|
|
2010-01-22 23:28:48 +01:00
|
|
|
if ( isset( $allowed_themes[ $theme_key ] ) == true ) {
|
2010-01-19 21:03:11 +01:00
|
|
|
$enabled = 'checked="checked" ';
|
|
|
|
$activated_themes_count++;
|
|
|
|
$class1 = ' active';
|
|
|
|
} else {
|
|
|
|
$disabled = 'checked="checked" ';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<tr valign="top" class="<?php echo $class.$class1; ?>">
|
|
|
|
<td style="text-align:center;">
|
|
|
|
<label><input name="theme[<?php echo $theme_key ?>]" type="radio" id="enabled_<?php echo $theme_key ?>" value="enabled" <?php echo $enabled ?> /> <?php _e('Yes') ?></label>
|
2010-01-22 23:28:48 +01:00
|
|
|
|
2010-01-19 21:03:11 +01:00
|
|
|
<label><input name="theme[<?php echo $theme_key ?>]" type="radio" id="disabled_<?php echo $theme_key ?>" value="disabled" <?php echo $disabled ?> /> <?php _e('No') ?></label>
|
|
|
|
</td>
|
2010-01-22 23:28:48 +01:00
|
|
|
<th scope="row" style="text-align:left;"><?php echo $key ?></th>
|
2010-01-19 21:03:11 +01:00
|
|
|
<td><?php echo $theme['Version'] ?></td>
|
|
|
|
<td><?php echo $theme['Description'] ?></td>
|
2010-01-22 23:28:48 +01:00
|
|
|
</tr>
|
2010-01-19 21:03:11 +01:00
|
|
|
<?php } ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<p class="submit">
|
2010-01-22 23:30:52 +01:00
|
|
|
<input type='submit' value='<?php _e('Update Themes') ?>' /></p>
|
2010-01-19 21:03:11 +01:00
|
|
|
</form>
|
2010-01-22 23:28:48 +01:00
|
|
|
|
2010-01-19 21:03:11 +01:00
|
|
|
<h3><?php _e('Total')?></h3>
|
|
|
|
<p>
|
|
|
|
<?php printf(__('Themes Installed: %d'), $total_theme_count); ?>
|
|
|
|
<br />
|
|
|
|
<?php printf(__('Themes Activated: %d'), $activated_themes_count); ?>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php include('admin-footer.php'); ?>
|