remove_theme_mods() - WordPress 函数参考中文文档

返回介绍

remove_theme_mods()

发布于 2017-09-11 字数1216 浏览 916 评论 0

remove_theme_mods()

Remove theme modifications option for current 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 描述
2.1.0 Introduced.

相关函数

Uses

  • wp-includes/theme.php:
    wp_get_theme()
  • wp-includes/class-wp-theme.php:
    WP_Theme::get()
  • wp-includes/option.php:
    delete_option()
  • wp-includes/option.php:
    get_option()

Used By

  • wp-includes/theme.php:
    remove_theme_mod()

User Contributed Notes

上一篇:remove_theme_mod()

下一篇:remove_theme_support()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!