summaryrefslogtreecommitdiffstats
path: root/wp-admin/themes.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-04 16:44:15 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-04 16:44:15 +0000
commit7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc (patch)
treec6fd23b598f3994eddb18cb1c0f2e8d95ff054fa /wp-admin/themes.php
parentf650f48c048bfbbb2ae702b6425d87e39358d748 (diff)
downloadwordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.gz
wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.xz
wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.zip
Merged with WordPress 2.5, unstable, only for testing
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1218 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/themes.php')
-rw-r--r--wp-admin/themes.php32
1 files changed, 10 insertions, 22 deletions
diff --git a/wp-admin/themes.php b/wp-admin/themes.php
index 37f4dd9..3b4103b 100644
--- a/wp-admin/themes.php
+++ b/wp-admin/themes.php
@@ -28,26 +28,8 @@ if ( isset($_GET['action']) ) {
check_admin_referer('switch-theme_' . $_GET['template']);
if ('activate' == $_GET['action']) {
- $found = false;
- while( list( $key, $details ) = each( $themes ) ) {
- if( $details[ 'Template' ] == $_GET['template'] && $details[ 'Stylesheet' ] == $_GET['stylesheet'] ) {
- $found = true;
- break;
- }
- }
- if( $found == true ) {
- if ( isset($_GET['template']) )
- update_option('template', $_GET['template']);
-
- if ( isset($_GET['stylesheet']) )
- update_option('stylesheet', $_GET['stylesheet']);
-
- do_action('switch_theme', get_current_theme());
-
- wp_redirect('themes.php?activated=true');
- } else {
- wp_redirect('themes.php');
- }
+ switch_theme($_GET['template'], $_GET['stylesheet']);
+ wp_redirect('themes.php?activated=true');
exit;
}
}
@@ -63,7 +45,7 @@ if( is_site_admin() ) {
<?php if ( ! validate_current_theme() ) : ?>
<div id="message1" class="updated fade"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
<?php elseif ( isset($_GET['activated']) ) : ?>
-<div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">View site &raquo;</a>'), get_bloginfo('url') . '/'); ?></p></div>
+<div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">Visit site</a>'), get_bloginfo('url') . '/'); ?></p></div>
<?php endif; ?>
@@ -75,9 +57,11 @@ if( is_site_admin() ) {
<?php endif; ?>
<h3><?php printf(_c('%1$s %2$s by %3$s|1: theme title, 2: theme version, 3: theme author'), $ct->title, $ct->version, $ct->author) ; ?></h3>
<p><?php echo $ct->description; ?></p>
+<?php if ( $ct->tags ) : ?>
+<p><?php _e('Tags:'); ?> <?php echo join(', ', $ct->tags); ?></p>
+<?php endif; ?>
</div>
-<br style="clear: both" />
<h2><?php _e('Available Themes'); ?></h2>
<?php if ( 1 < count($themes) ) { ?>
@@ -98,6 +82,7 @@ foreach ($theme_names as $theme_name) {
$author = $themes[$theme_name]['Author'];
$screenshot = $themes[$theme_name]['Screenshot'];
$stylesheet_dir = $themes[$theme_name]['Stylesheet Dir'];
+ $tags = $themes[$theme_name]['Tags'];
$activate_link = wp_nonce_url("themes.php?action=activate&amp;template=".urlencode($template)."&amp;stylesheet=".urlencode($stylesheet), 'switch-theme_' . $template);
?>
<div class="available-theme">
@@ -110,6 +95,9 @@ foreach ($theme_names as $theme_name) {
</a>
<p><?php echo $description; ?></p>
+<?php if ( $tags ) : ?>
+<p><?php _e('Tags:'); ?> <?php echo join(', ', $tags); ?></p>
+<?php endif; ?>
</div>
<?php } // end foreach theme_names ?>