wp-speculative-loading
Installation
SKILL.md
WordPress Speculative Loading
WordPress emits a browser speculationrules script in the frontend footer. Core enables it by default only for logged-out requests with pretty permalinks, then applies safe defaults and exclusions. Plugins should usually exclude sensitive plugin URLs, not replace Core's entire rule set.
Configuration contract
wp_get_speculation_rules_configuration() returns:
nullwhen disabled; orarray( 'mode' => 'prefetch|prerender', 'eagerness' => 'conservative|moderate|eager' ).
Filter the policy only when the plugin truly owns the site-wide decision: