wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_speculation_rules_href_exclude_paths › WordPress过滤钩子

Since6.8.0
已弃用n/a
› apply_filters( 'wp_speculation_rules_href_exclude_paths', array()
参数: (2)
  • () href_exclude_paths Additional path patterns to disable speculative loading for.
    Required: Yes
  • () mode Mode used to apply speculative loading. Either 'prefetch' or 'prerender'.
    Required: Yes
定义在:
文档:

Filters the paths for which speculative loading should be disabled.

All paths should start in a forward slash, relative to the root document. The `*` can be used as a wildcard. If the WordPress site is in a subdirectory, the exclude paths will automatically be prefixed as necessary. Note that WordPress always excludes certain path patterns such as `/wp-login.php` and `/wp-admin/*`, and those cannot be modified using the filter.




源码

$href_exclude_paths = (array) apply_filters( 'wp_speculation_rules_href_exclude_paths', array(), $mode );