All of my theme’s custom options are preceeded with “mytheme_” + option.
For example, mytheme_color1, mytheme_color2, mytheme_body_font_color, etc…
I’d like to create a plugin that uninstalls all of the items in wp_options where the option is preceeded with “mytheme_”
If you have a reference or example, please share it. Thanks in advance 🙂
Not safe enough. Use set_theme_mod(), get_theme_mod() and remove_theme_mod() instead. You’ll find these and more related functions in
wp-includes/theme.php
.DELETE FROM $wpdb->options WHERE option_name LIKE 'mytheme%'