@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/?post_type=lh-portfolio-doc&#038;p=150177>
  a sioc:Post ;
  dc:title "Hooks" ;
  dcterms:identifier 150177 ;
  dc:modified "2026-10-13T17:16:26Z"^^xsd:dateTime ;
  dc:created "2026-10-13T17:02:53Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-jumpstart/hooks/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded """<ul class="lh_portfolio-meta"><li><strong>Part of:</strong> <a href="https://lhero.org/portfolio/lh-jumpstart/">LH Jumpstart</a></li></ul>
<h2 class="wp-block-heading">Filters</h2>



<ul class="wp-block-list">
<li><code>lh_jumpstart_return_ignore_exact_urls</code> (array of full URLs, default empty): URLs never prefetched or prerendered.</li>



<li><code>lh_jumpstart_return_ignore_prefix_urls</code> (array of full URL prefixes): any URL starting with one of these is skipped. Defaults to <code>admin_url()</code> and, for a logged-in member when BuddyPress is active, their own profile URL (<code>bp_loggedin_user_url()</code>, or <code>bp_loggedin_user_domain()</code> before BuddyPress 12).</li>



<li><code>lh_jumpstart_return_logged_in_configuration</code> (array with <code>mode</code> and <code>eagerness</code>, default <code>prefetch</code> and <code>moderate</code>): the speculation rules configuration used for logged-in users. Return <code>null</code> to leave speculative loading off for them, as core does.</li>
</ul>



<p class="wp-block-paragraph">Both URL lists apply to the native rules and the fallback script. For the native rules, each URL on this site is converted to a path relative to home (URL Pattern special characters escaped) and passed to core; URLs on other hosts are dropped.</p>



<h2 class="wp-block-heading">Core hooks used</h2>



<ul class="wp-block-list">
<li><code>wp_speculation_rules_configuration</code> (WordPress 6.8+): for logged-out visitors sets <code>mode</code> to <code>prerender</code> and <code>eagerness</code> to <code>eager</code>. Core passes <code>null</code> for logged-in users; with pretty permalinks the plugin replaces it with the logged-in configuration above. Without pretty permalinks <code>null</code> is left alone and the fallback script takes over. Core keeps only <code>mode</code> and <code>eagerness</code> from this filter, so exclusions cannot be set here.</li>



<li><code>wp_speculation_rules_href_exclude_paths</code>: adds the converted ignore paths (prefix entries with a trailing <code>*</code>) and <code>/*nonce*</code>. These are added to core&#8217;s own fixed exclusions, which already cover <code>/wp-*.php</code>, <code>/wp-admin/*</code>, the content directories, and, with pretty permalinks, every URL with a query string (and so every <code>_wpnonce</code> link).</li>



<li><code>wp_enqueue_scripts</code>: enqueues <code>assets/scripts/lh-jumpstart.js</code> (deferred, id <code>lh_jumpstart-script</code>, with the URL lists as <code>data-ignore_exact</code> and <code>data-ignore_prefix</code> attributes) on front-end requests only, not in admin, AJAX, JSON, XML-RPC, cron or robots.txt requests.</li>
</ul>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Jumpstart
Filters




lh_jumpstart_return_ignore_exact_urls (array of full URLs, default empty): URLs never prefetched or prerendered.



lh_jumpstart_return_ignore_prefix_urls (array of full URL prefixes): any URL starting with one of these is skipped. Defaults to admin_url() and, for a logged-in member when BuddyPress is active, their own profile URL (bp_loggedin_user_url(), or bp_loggedin_user_domain() before BuddyPress 12).



lh_jumpstart_return_logged_in_configuration (array with mode and eagerness, default prefetch and moderate): the speculation rules configuration used for logged-in users. Return null to leave speculative loading off for them, as core does.




Both URL lists apply to the native rules and the fallback script. For the native rules, each URL on this site is converted to a path relative to home (URL Pattern special characters escaped) and passed to core; URLs on other hosts are dropped.



Core hooks used




wp_speculation_rules_configuration (WordPress 6.8+): for logged-out visitors sets mode to prerender and eagerness to eager. Core passes null for logged-in users; with pretty permalinks the plugin replaces it with the logged-in configuration above. Without pretty permalinks null is left alone and the fallback script takes over. Core keeps only mode and eagerness from this filter, so exclusions cannot be set here.



wp_speculation_rules_href_exclude_paths: adds the converted ignore paths (prefix entries with a trailing *) and /*nonce*. These are added to core&#8217;s own fixed exclusions, which already cover /wp-*.php, /wp-admin/*, the content directories, and, with pretty permalinks, every URL with a query string (and so every _wpnonce link).



wp_enqueue_scripts: enqueues assets/scripts/lh-jumpstart.js (deferred, id lh_jumpstart-script, with the URL lists as data-ignore_exact and data-ignore_prefix attributes) on front-end requests only, not in admin, AJAX, JSON, XML-RPC, cron or robots.txt requests.

""" ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
