05 Nov 2008

Uninstall Option for WordPress theme

Useful uninstall option “snippet” for your WordPress theme admin option. Basically, this reverts WordPress to the default theme and removes all theme settings from the database. Change option your_theme with your own:

global $wpdb;

delete_option('your_theme');
switch_theme('default', 'default');
wp_cache_flush();

wp_redirect('themes.php?activated=true');
exit();

One Comment

  1. Thanks for the auspicious writeup. It in truth used to be a entertainment account it. Look complicated to more brought agreeable from you! However, how could we keep in touch?

    Reply

Leave a Reply