remove_theme_mods()
Remove theme modifications option for current theme.
Uses: delete_option()
Used By: remove_theme_mod()
1 time — 0.001967 sec (very slow) | 50000 times — 17.67 sec (slow)
No Hooks.
Return
null
. Nothing.
Usage
remove_theme_mods();
Changelog
Since 2.1.0 | Introduced. |
Code of remove_theme_mods() remove theme mods WP 5.9.3
function remove_theme_mods() { delete_option( 'theme_mods_' . get_option( 'stylesheet' ) ); // Old style. $theme_name = get_option( 'current_theme' ); if ( false === $theme_name ) { $theme_name = wp_get_theme()->get( 'Name' ); } delete_option( 'mods_' . $theme_name ); }