I don’t think this is possible with an action hook. You can only Delete a theme from the admin panel after it has been deactivated. Even if an action hook existed for Deleting (not Deactivating) a theme, your theme functions.php would not be running when you are able to hit the Delete link.
Since this is a personal theme for your own use, you can just delete the options whenever you want from the “options” database table using phpMyAdmin or an Options Manager plugin.
An alternative would be to include some sort of Uninstall button on an options page for your theme that would remove the options from the database and deactivate the theme, perhaps either activating TwentyTwelve or letting the user choose which theme to activate after the uninstall is complete.
Related Posts:
- Remove action within a class in a parent theme from the child theme
- Delete database tables on theme uninstall?
- How to trigger function on theme delete?
- Redux callback action
- How to display message (with switch_theme hook) after deactivating My theme?
- What hook is the currently active theme’s functions.php file loaded on? [duplicate]
- Is it good practice moving the main stylesheets after the plugin styles?
- Fix warning: Missing argument
- Warning: call_user_func() expects parameter 1 to be a valid callback
- Are immediately-called actions not usable in themes?
- Where can I find the “add_action()” inside a theme?
- how to add version of style.css in wordpress
- What is the role and history of the $content_width global variable?
- How to set thumbnail image for a (child) theme
- Categorising themes by folders in backend
- Add a page outside of the current theme?
- How to create a live demo page for a theme? [closed]
- Is it possible to stop a theme activation when a certain plugin is not activated
- add image size still doesn’t work even after regenerating thumbnails
- Best location for theme translation files
- WordPress themes under GPL license
- How can I customize the search results in Bones theme?
- How to develop a theme while having another show up
- When does WordPress wrap inline scripts in CDATA?
- Switch to other theme at URL
- How to go about pre generating css file with variables from theme options
- How to load a different theme for categories?
- How can I create an “excerpt” with text that won’t be displayed in the post itself?
- Can I update themes without enabling maintenance mode?
- How to change sidebar per page?
- Add a series of checkboxes to theme options
- WordPress Theme Development Seemingly Awful Partitioning of Includes?
- Disable Theme API / Front end (for API only environment)
- Hide default “Recent Comments” Widget if there are no comments yet
- Showing post thumbnail (attachment) on the archive.php category listing
- Theme Check warning wrong direcory for theme
- Static page not working
- Add more widget areas to a theme
- Posts and Pages not showing on admin, but showing in theme
- Error defining a gutenberg block in a theme
- How can I add class to every quote element?
- Looking for a fully customisable WP responsive theme to develop a small scale fiverr type site for voice artists [closed]
- Page dissapears when i click save
- How to use command lines an activate theme in wp – cli also setup Vagrant/Sage Theme?
- Can’t resize logo in responsive theme?
- Is wordpress big enough for my project [closed]
- How to get theme screenshot
- Theme doesn’t support shortcodes
- i would like to have 3 default columns editable in guttenberg
- Define theme information other than through style.css
- Change avatar on themed profile page
- How to get menu location in wp_update_nav_menu hook
- Trying to uninstall a theme, but it’s hijacking my home page
- WordPress 5.1 upgrade has lost the parent theme JavaScript
- Is it possible to open a page with a different theme?
- How to add some php code in header.php using plugin
- WordPress Theme and Plugin Name extraction
- Create page options for theme?
- Homepage showing a simple listing of title, featured image, then posted on
- Where is the best place to catch useragent?
- Knowing blog name using blog id
- Alternative to Back End Dashboard?
- How can I change the prev / next buttons text to Dutch?
- Woocommerce single product image blurred and small. Actual image is big
- Adding a template in WPTouch
- one page wordpress theme
- Are the Theme frame works or Theme builders slow downs the performance? [closed]
- Make the “Add New Post” one column for all users
- What happened to my Inactive Widgets?
- WP Nanoplex 1.0.3 malfunction
- Cannot change WordPress site title on a staged site
- How to add image from theme files to media library after theme activation?
- remove_action from parent theme using child theme functions.php
- How to download my custom theme?
- Understanding the child / parent theme relationship
- i want remove class from post links
- share wrordpress data between two shared hosts using REST API
- Ensure Quality Transition to New WordPress Theme [closed]
- WordPress theme works on linux servers but white screen after move to Xampp
- Own WordPress theme with custom AFCs > Export all to theme format?
- Default and warning messages & no login
- WordPress theme is not displayed properly on other computers
- Customized wordpress theme locally put on someones WordPress account
- Uploaded WordPress theme not finding pages and css
- Updating theme resets theme options settings and widgets
- Mobile theme switching problems
- How to add different link on each Post [closed]
- EM in CSS different size on wordpress then elsewhere [closed]
- Add Media + Quick Edit buttons not working
- How to show tags in posts with a theme that does not do it
- Converting HTML5 to XHTML
- Best way to include pagination in a theme [closed]
- What happens to bespoke page template references on theme change?
- How to remove header “ish” label [closed]
- How to change the standard width of a page
- Is it possible to dynamically show different themes for different users? [duplicate]
- Why does WP theme not look like promoted? [closed]
- Remove image next to header image on WellExpo theme [closed]
- How do I get rid of the Mindblown and the book recommendations?
- Adding PHP code to single template in 2023 edition of WordPress theme