rewrite_rules_array
apply_filters( ‘rewrite_rules_array’, string[] $this->rules )
过滤器::过滤生成的全部重写规则。
Filter Hook: Filters the full set of generated rewrite rules.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$this->rules | (string[]) | 重写规则的编译数组,由其regex模式键入。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
1.5.0 | wp-includes/class-wp-rewrite.php:1446 | 1 | 0 |
笔记(Notes)
下面是一个快速而肮脏的方法,您可以列出在站点上注册的所有重写规则:
rewrite_rules_array 为WP2原创文章,链接:https://www.wp2.cn/hook/rewrite_rules_array/