On this page
remove_theme_mods()
Removes theme modifications option for the active theme.
Source
File: wp-includes/theme.php. View all references
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 );
}
Related
Uses
| Uses | Description |
|---|---|
| delete_option() wp-includes/option.php | Removes option by name. Prevents removal of protected WordPress options. |
| WP_Theme::get() wp-includes/class-wp-theme.php | Gets a raw, unformatted theme header. |
| wp_get_theme() wp-includes/theme.php | Gets a WP_Theme object for a theme. |
| get_option() wp-includes/option.php | Retrieves an option value based on an option name. |
Used By
| Used By | Description |
|---|---|
| remove_theme_mod() wp-includes/theme.php | Removes theme modification name from active theme list. |
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/remove_theme_mods