themes admin pages UI cleanup, props PeteMall, see #13238

git-svn-id: http://svn.automattic.com/wordpress/trunk@14425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
wpmuguru 2010-05-03 23:25:14 +00:00
parent 5b6f2a3944
commit 2c727e9442
2 changed files with 11 additions and 9 deletions

View File

@ -29,11 +29,13 @@ $allowed_themes = get_site_allowed_themes();
<form action="<?php echo esc_url( admin_url( 'ms-edit.php?action=updatethemes' ) ); ?>" method="post"> <form action="<?php echo esc_url( admin_url( 'ms-edit.php?action=updatethemes' ) ); ?>" method="post">
<?php screen_icon(); ?> <?php screen_icon(); ?>
<h2><?php _e( 'Network Themes' ) ?></h2> <h2><?php _e( 'Network Themes' ) ?></h2>
<p><?php _e( 'Disable themes network-wide. You can enable themes on a site-by-site basis.' ) ?></p> <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>
<table class="widefat"> <table class="widefat">
<thead> <thead>
<tr> <tr>
<th style="width:15%;text-align:center;"><?php _e( 'Active' ) ?></th> <th style="width:15%;"><?php _e( 'Enable' ) ?></th>
<th style="width:25%;"><?php _e( 'Theme' ) ?></th> <th style="width:25%;"><?php _e( 'Theme' ) ?></th>
<th style="width:10%;"><?php _e( 'Version' ) ?></th> <th style="width:10%;"><?php _e( 'Version' ) ?></th>
<th style="width:60%;"><?php _e( 'Description' ) ?></th> <th style="width:60%;"><?php _e( 'Description' ) ?></th>
@ -59,7 +61,7 @@ $allowed_themes = get_site_allowed_themes();
} }
?> ?>
<tr valign="top" class="<?php echo $class, $class1; ?>"> <tr valign="top" class="<?php echo $class, $class1; ?>">
<td style="text-align:center;"> <td>
<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> <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>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
<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> <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>
@ -73,14 +75,14 @@ $allowed_themes = get_site_allowed_themes();
</table> </table>
<p class="submit"> <p class="submit">
<input type="submit" value="<?php _e( 'Update Themes' ) ?>" /></p> <input type="submit" value="<?php _e( 'Apply Changes' ) ?>" /></p>
</form> </form>
<h3><?php _e( 'Total' )?></h3> <h3><?php _e( 'Total' )?></h3>
<p> <p>
<?php printf( __( 'Themes Installed: %d' ), $total_theme_count); ?> <?php printf( __( 'Themes Installed: %d' ), $total_theme_count); ?>
<br /> <br />
<?php printf( __( 'Themes Activated: %d' ), $activated_themes_count); ?> <?php printf( __( 'Themes Enabled: %d' ), $activated_themes_count); ?>
</p> </p>
</div> </div>

View File

@ -34,7 +34,7 @@ $parent_file = 'themes.php';
$help = '<p>' . __('Themes give your WordPress style. Once a theme is installed, you may preview it, activate it or deactivate it here.') . '</p>'; $help = '<p>' . __('Themes give your WordPress style. Once a theme is installed, you may preview it, activate it or deactivate it here.') . '</p>';
if ( current_user_can('install_themes') ) { if ( current_user_can('install_themes') ) {
$help .= '<p>' . sprintf(__('You can find additional themes for your site by using the new <a href="%1$s">Theme Browser/Installer</a> functionality or by browsing the <a href="http://wordpress.org/extend/themes/">WordPress Theme Directory</a> directly and installing manually. To install a theme <em>manually</em>, <a href="%2$s">upload its ZIP archive with the new uploader</a> or copy its folder via FTP into your <code>wp-content/themes</code> directory.'), 'theme-install.php', 'theme-install.php?tab=upload' ) . '</p>'; $help .= '<p>' . sprintf(__('You can find additional themes for your site by using the new <a href="%1$s">Theme Browser/Installer</a> functionality or by browsing the <a href="http://wordpress.org/extend/themes/">WordPress Theme Directory</a> directly and installing manually. To install a theme <em>manually</em>, <a href="%2$s">upload its ZIP archive with the new uploader</a> or copy its folder via FTP into your <code>wp-content/themes</code> directory.'), 'theme-install.php', 'theme-install.php?tab=upload' ) . '</p>';
$help .= '<p>' . __('Once a theme is uploaded, you should see it on this page.') . '</p>' ; $help .= '<p>' . __('Once a theme is uploaded, you should see it on this screen.') . '</p>' ;
} }
add_contextual_help($current_screen, $help); add_contextual_help($current_screen, $help);
@ -44,7 +44,7 @@ wp_enqueue_script( 'theme-preview' );
require_once('./admin-header.php'); require_once('./admin-header.php');
if ( is_multisite() && current_user_can('edit_themes') ) { if ( is_multisite() && current_user_can('edit_themes') ) {
?><div id="message0" class="updated"><p><?php _e('Administrator: new themes must be activated in the <a href="ms-themes.php">Themes Admin</a> page before they appear here.'); ?></p></div><?php ?><div id="message0" class="updated"><p><?php printf( __('Administrator: new themes must be activated in the <a href="%s">Network Themes</a> screen before they appear here.'), admin_url( 'ms-themes.php') ); ?></p></div><?php
} }
?> ?>
@ -52,9 +52,9 @@ if ( is_multisite() && current_user_can('edit_themes') ) {
<div id="message1" class="updated"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div> <div id="message1" class="updated"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
<?php elseif ( isset($_GET['activated']) ) : <?php elseif ( isset($_GET['activated']) ) :
if ( isset($wp_registered_sidebars) && count( (array) $wp_registered_sidebars ) ) { ?> if ( isset($wp_registered_sidebars) && count( (array) $wp_registered_sidebars ) ) { ?>
<div id="message2" class="updated"><p><?php printf(__('New theme activated. This theme supports widgets, please visit the <a href="%s">widgets settings page</a> to configure them.'), admin_url('widgets.php') ); ?></p></div><?php <div id="message2" class="updated"><p><?php printf( __('New theme activated. This theme supports widgets, please visit the <a href="%s">widgets settings</a> screen to configure them.'), admin_url( 'widgets.php' ) ); ?></p></div><?php
} else { ?> } else { ?>
<div id="message2" class="updated"><p><?php printf(__('New theme activated. <a href="%s">Visit site</a>'), get_bloginfo('url') . '/'); ?></p></div><?php <div id="message2" class="updated"><p><?php printf( __('New theme activated. <a href="%s">Visit site</a>'), home_url( '/ ' ) ); ?></p></div><?php
} }
elseif ( isset($_GET['deleted']) ) : ?> elseif ( isset($_GET['deleted']) ) : ?>
<div id="message3" class="updated"><p><?php _e('Theme deleted.') ?></p></div> <div id="message3" class="updated"><p><?php _e('Theme deleted.') ?></p></div>