描述:
批量删除主题自定义修改值
用法:
<?php remove_theme_mods() ?>
参数:
None.
源文件:
/**
* Remove theme modifications option for current theme.
*
* @since 2.1.0
*/
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 );
}
写一条评论