函数原型
flush_rewrite_rules( bool $hard = true )
函数描述
Removes rewrite rules and then recreate rewrite rules.
是否弃用
未弃用
函数参数
-
$hard
bool
Optional - Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
Default:
true
函数返回值
无
函数位置
File: wp-includes/rewrite.php.
函数源码
function flush_rewrite_rules( $hard = true ) {
global $wp_rewrite;
if ( is_callable( array( $wp_rewrite, 'flush_rules' ) ) ) {
$wp_rewrite->flush_rules( $hard );
}
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |

