标签:rdf close sel index nbsp types sso web 相关
原文:https://codex.wordpress.org/Plugin_API/Filter_Reference/root_rewrite_rules
实例,
function my_htaccess_contents( $rules ) { var_dump($rules); exit(); return $rules . "# My little addition!\n"; } add_filter(‘root_rewrite_rules‘, ‘my_htaccess_contents‘);
查看URL地址:http://localhost/wordpress/wp-admin/options-permalink.php
array ‘feed/(feed|rdf|rss|rss2|atom)/?$‘ => string ‘index.php?&feed=$matches[1]‘ (length=27) ‘(feed|rdf|rss|rss2|atom)/?$‘ => string ‘index.php?&feed=$matches[1]‘ (length=27) ‘embed/?$‘ => string ‘index.php?&embed=true‘ (length=21) ‘page/?([0-9]{1,})/?$‘ => string ‘index.php?&paged=$matches[1]‘ (length=28)
This filter hook can be used to modify rewrite rules for your sites root.
这个过滤器钩子可以用来修改你的站点根目录的重写规则。
This hooks is located in the WP_Rewrite class in wp-includes/class-wp-rewrite.php
这个钩子位于 WP_Rewrite 类,文件是 wp-includes/class-wp-rewrite.php
Related(相关的)
标签:rdf close sel index nbsp types sso web 相关
原文地址:http://www.cnblogs.com/kais7mg/p/7761425.html