got_url_rewrite()
Returns whether the server supports URL rewriting.
Detects Apache's mod_rewrite, IIS 7.0+ permalink support, and nginx.
Хуки из функции
Возвращает
bool. Whether the server supports URL rewriting.
Использование
got_url_rewrite();
Заметки
Global. true|false. $is_nginx |
Global. true|false. $is_caddy |
Список изменений
| С версии 3.7.0 | Введена. |
Код got_url_rewrite() got url rewrite WP 7.1.3
function got_url_rewrite() {
$got_url_rewrite = ( got_mod_rewrite() || $GLOBALS['is_nginx'] || $GLOBALS['is_caddy'] || iis7_supports_permalinks() );
/**
* Filters whether URL rewriting is available.
*
* @since 3.7.0
*
* @param bool $got_url_rewrite Whether URL rewriting is available.
*/
return apply_filters( 'got_url_rewrite', $got_url_rewrite );
}