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

返回介绍

got_mod_rewrite()

发布于 2017-09-11 字数1616 浏览 867 评论 0

got_mod_rewrite()

Returns whether the server is running Apache with the mod_rewrite module loaded.


描述


返回值

(bool)


源代码

File: wp-admin/includes/misc.php

function got_mod_rewrite() {
	$got_rewrite = apache_mod_loaded('mod_rewrite', true);

	/**
	 * Filters whether Apache and mod_rewrite are present.
	 *
	 * This filter was previously used to force URL rewriting for other servers,
	 * like nginx. Use the {@see 'got_url_rewrite'} filter in got_url_rewrite() instead.
	 *
	 * @since 2.5.0
	 *
	 * @see got_url_rewrite()
	 *
	 * @param bool $got_rewrite Whether Apache and mod_rewrite are present.
	 */
	return apply_filters( 'got_rewrite', $got_rewrite );
}

更新日志

Version 描述
2.0.0 Introduced.

相关函数

Uses

  • wp-admin/includes/misc.php:
    got_rewrite
  • wp-includes/functions.php:
    apache_mod_loaded()
  • wp-includes/plugin.php:
    apply_filters()

Used By

  • wp-admin/includes/network.php:
    network_step1()
  • wp-admin/includes/misc.php:
    save_mod_rewrite_rules()
  • wp-admin/includes/misc.php:
    got_url_rewrite()

User Contributed Notes

上一篇:global_terms_enabled()

下一篇:got_url_rewrite()

发布评论

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

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