Title: My &#8220;Theme Switcher&#8221; Plugin Modification
Last modified: August 18, 2016

---

# My “Theme Switcher” Plugin Modification

 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/my-theme-switcher-plugin-modification/)
 * I made a small modification to the [Theme Switcher](http://dev.wp-plugins.org/wiki/ThemeSwitcher)
   plugin and I though I’d share.
 * It adds `<em> (Default)</em>` (`<em> (Default)</em>`) after the name of the default
   theme. I coulda modified it better by changing one or two of the if’s, but I 
   didn’t want to edit any code, I just wanted to do it via adding some code.
 * So anyway, here’s my simple code if anyone cares:
 * _Starting on line 140…_
 * ` if ((!empty($_COOKIE["wptheme" . COOKIEHASH]) && $_COOKIE["wptheme" . COOKIEHASH]
   == $theme_name)
    || (empty($_COOKIE["wptheme" . COOKIEHASH]) && ($theme_name 
   == $default_theme))) { $ts .= ' <li>'.$display.'</li>'."n";  } else { $ts .= '
   <li><a href="' .get_settings('home').'/'. 'index.php' .'?wptheme='.urlencode(
   $theme_name).'">' .$display.'</a></li>'."n";
 * _Change to…_
 * ` if ((!empty($_COOKIE["wptheme" . COOKIEHASH]) && $_COOKIE["wptheme" . COOKIEHASH]
   == $theme_name)
    || (empty($_COOKIE["wptheme" . COOKIEHASH]) && ($theme_name 
   == $default_theme))) {
 * ` // Begin Viper007Bond edit
    if ($theme_name == $default_theme) $ts .= ' <li
   >'.$display.' <em>(Default)</em></li>'."n"; else // End Viper007Bond edit
 * ` $ts .= ' <li>'.$display.'</li>'."n";
    } else {
 * ` // Begin Viper007Bond edit
    if ($theme_name == $default_theme) $ts .= ' <li
   ><a href="' .get_settings('home').'/'. 'index.php' .'?wptheme='.urlencode($theme_name).'"
   >' .$display.' <em>(Default)</em></a></li>'."n"; else // End Viper007Bond edit
 * ` $ts .= ' <li><a href="'
    .get_settings('home').'/'. 'index.php' .'?wptheme='.
   urlencode($theme_name).'">' .$display.'</a></li>'."n";
 * Sorry, but no preview of it yet as my new WP powered blog is still only on my
   computer, but I can verify that it works. 🙂

The topic ‘My “Theme Switcher” Plugin Modification’ is closed to new replies.

## Tags

 * [ThemeSwitcher](https://wordpress.org/support/topic-tag/themeswitcher/)

 * 0 replies
 * 1 participant
 * Last reply from: [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * Last activity: [20 years, 11 months ago](https://wordpress.org/support/topic/my-theme-switcher-plugin-modification/)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
