返回介绍

wp_installing()

发布于 2017-09-11 12:15:40 字数 3735 浏览 1014 评论 0 收藏 0

wp_installing( bool $is_installing = null )

Check or set whether WordPress is in “installation” mode.


description

If the WP_INSTALLING constant is defined during the bootstrap, wp_installing() will default to true.


参数

$is_installing

(bool) (Optional) True to set WP into Installing mode, false to turn Installing mode off. Omit this parameter if you only want to fetch the current status.

Default value: null


返回值

(bool) True if WP is installing, otherwise false. When a $is_installing is passed, the function will report whether WP was in installing mode prior to the change to $is_installing.


源代码

File: wp-includes/load.php

function wp_installing( $is_installing = null ) {
	static $installing = null;

	// Support for the `WP_INSTALLING` constant, defined before WP is loaded.
	if ( is_null( $installing ) ) {
		$installing = defined( 'WP_INSTALLING' ) && WP_INSTALLING;
	}

	if ( ! is_null( $is_installing ) ) {
		$old_installing = $installing;
		$installing = $is_installing;
		return (bool) $old_installing;
	}

	return (bool) $installing;
}

更新日志

Versiondescription
4.4.0Introduced.

相关函数

Used By

  • wp-includes/ms-load.php: ms_load_current_site_and_network()
  • wp-admin/includes/translation-install.php: wp_get_available_translations()
  • wp-admin/includes/class-wp-automatic-updater.php: WP_Automatic_Updater::is_disabled()
  • wp-admin/includes/misc.php: update_home_siteurl()
  • wp-admin/includes/file.php: request_filesystem_credentials()
  • wp-includes/theme.php: validate_current_theme()
  • wp-includes/l10n.php: load_default_textdomain()
  • wp-includes/l10n.php: get_locale()
  • wp-includes/load.php: wp_maintenance()
  • wp-includes/load.php: wp_not_installed()
  • wp-includes/load.php: wp_get_active_and_valid_plugins()
  • wp-includes/functions.php: dead_db()
  • wp-includes/functions.php: is_blog_installed()
  • wp-includes/update.php: wp_schedule_update_checks()
  • wp-includes/update.php: wp_version_check()
  • wp-includes/update.php: wp_update_plugins()
  • wp-includes/update.php: wp_update_themes()
  • wp-includes/option.php: get_transient()
  • wp-includes/option.php: wp_load_alloptions()
  • wp-includes/option.php: wp_load_core_site_options()
  • wp-includes/option.php: update_option()
  • wp-includes/option.php: add_option()
  • wp-includes/option.php: delete_option()
  • wp-includes/option.php: get_option()
  • wp-includes/ms-functions.php: wp_schedule_update_network_counts()
  • wp-includes/ms-functions.php: wpmu_create_blog()
  • wp-includes/script-loader.php: wp_style_loader_src()
  • wp-includes/script-loader.php: wp_default_scripts()
  • Show 23 more used by Hide more used by

User Contributed Notes

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文