2010-01-19 21:03:11 +01:00
|
|
|
<?php
|
2010-04-04 15:29:35 +02:00
|
|
|
/**
|
|
|
|
* Multisite themes administration panel.
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Multisite
|
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
|
|
|
|
2010-04-01 23:21:27 +02:00
|
|
|
require_once( './admin.php' );
|
2010-01-19 21:03:11 +01:00
|
|
|
|
2010-04-03 02:10:44 +02:00
|
|
|
if ( ! current_user_can( 'manage_network_themes' ) )
|
|
|
|
wp_die( __( 'You do not have permission to access this page.' ) );
|
|
|
|
|
2010-04-01 23:21:27 +02:00
|
|
|
$title = __( 'Network Themes' );
|
2010-01-19 21:03:11 +01:00
|
|
|
$parent_file = 'ms-admin.php';
|
2010-04-01 23:21:27 +02:00
|
|
|
require_once( './admin-header.php' );
|
2010-01-19 21:03:11 +01:00
|
|
|
|
2010-04-01 23:21:27 +02:00
|
|
|
if ( isset( $_GET['updated'] ) ) {
|
2010-01-19 21:03:11 +01:00
|
|
|
?>
|
2010-04-08 05:36:52 +02:00
|
|
|
<div id="message" class="updated"><p><?php _e( 'Site themes saved.' ) ?></p></div>
|
2010-01-19 21:03:11 +01:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
|
|
|
|
$themes = get_themes();
|
|
|
|
$allowed_themes = get_site_allowed_themes();
|
|
|
|
?>
|
|
|
|
<div class="wrap">
|
2010-05-03 20:16:22 +02:00
|
|
|
<form action="<?php echo esc_url( admin_url( 'ms-edit.php?action=updatethemes' ) ); ?>" method="post">
|
2010-01-20 23:35:21 +01:00
|
|
|
<?php screen_icon(); ?>
|
2010-04-01 23:21:27 +02:00
|
|
|
<h2><?php _e( 'Network Themes' ) ?></h2>
|
2010-05-04 01:25:14 +02:00
|
|
|
<p><?php _e( 'Themes must be enabled for your network before they will be available to individual sites.' ) ?></p>
|
|
|
|
<p class="submit">
|
|
|
|
<input type="submit" value="<?php _e( 'Apply Changes' ) ?>" /></p>
|
2010-01-19 21:03:11 +01:00
|
|
|
<table class="widefat">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2010-05-04 01:25:14 +02:00
|
|
|
<th style="width:15%;"><?php _e( 'Enable' ) ?></th>
|
2010-04-01 23:21:27 +02:00
|
|
|
<th style="width:25%;"><?php _e( 'Theme' ) ?></th>
|
|
|
|
<th style="width:10%;"><?php _e( 'Version' ) ?></th>
|
|
|
|
<th style="width:60%;"><?php _e( 'Description' ) ?></th>
|
2010-01-19 21:03:11 +01:00
|
|
|
</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-04-01 23:21:27 +02:00
|
|
|
$theme_key = esc_html( $theme['Stylesheet'] );
|
|
|
|
$class = ( 'alt' == $class ) ? '' : 'alt';
|
2010-01-19 21:03:11 +01:00
|
|
|
$class1 = $enabled = $disabled = '';
|
2010-04-01 23:21:27 +02:00
|
|
|
$enabled = $disabled = false;
|
2010-01-19 21:03:11 +01:00
|
|
|
|
2010-04-01 23:21:27 +02:00
|
|
|
if ( isset( $allowed_themes[$theme_key] ) == true ) {
|
|
|
|
$enabled = true;
|
2010-01-19 21:03:11 +01:00
|
|
|
$activated_themes_count++;
|
2010-04-01 23:21:27 +02:00
|
|
|
$class1 = 'active';
|
2010-01-19 21:03:11 +01:00
|
|
|
} else {
|
2010-04-01 23:21:27 +02:00
|
|
|
$disabled = true;
|
2010-01-19 21:03:11 +01:00
|
|
|
}
|
|
|
|
?>
|
2010-04-01 23:21:27 +02:00
|
|
|
<tr valign="top" class="<?php echo $class, $class1; ?>">
|
2010-05-04 01:25:14 +02:00
|
|
|
<td>
|
2010-04-01 23:21:27 +02:00
|
|
|
<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>
|
2010-01-22 23:28:48 +01:00
|
|
|
|
2010-04-01 23:21:27 +02:00
|
|
|
<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>
|
2010-01-19 21:03:11 +01:00
|
|
|
</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-05-04 01:25:14 +02:00
|
|
|
<input type="submit" value="<?php _e( 'Apply Changes' ) ?>" /></p>
|
2010-01-19 21:03:11 +01:00
|
|
|
</form>
|
2010-01-22 23:28:48 +01:00
|
|
|
|
2010-04-01 23:21:27 +02:00
|
|
|
<h3><?php _e( 'Total' )?></h3>
|
2010-01-19 21:03:11 +01:00
|
|
|
<p>
|
2010-04-01 23:21:27 +02:00
|
|
|
<?php printf( __( 'Themes Installed: %d' ), $total_theme_count); ?>
|
2010-01-19 21:03:11 +01:00
|
|
|
<br />
|
2010-05-04 01:25:14 +02:00
|
|
|
<?php printf( __( 'Themes Enabled: %d' ), $activated_themes_count); ?>
|
2010-01-19 21:03:11 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
2010-04-01 23:21:27 +02:00
|
|
|
<?php include( './admin-footer.php' ); ?>
|