函数原型
remove_theme_mods()
函数描述
Removes theme modifications option for the active theme.
是否弃用
未弃用
函数参数
无
函数返回值
无
函数位置
File: wp-includes/theme.php.
函数源码
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 );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |

