@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/portfolio/lh-page-links-to/>
  a sioc:Post ;
  dc:title "Hooks and filters" ;
  dcterms:identifier 148187 ;
  dc:modified "2026-09-22T16:45:14Z"^^xsd:dateTime ;
  dc:created "2026-09-22T16:45:14Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-page-links-to/hooks-and-filters/> ;
  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-page-links-to/">LH Page links to</a></li></ul>
<h2 class="wp-block-heading">Filters</h2>



<ul class="wp-block-list">
<li><code>lh_page_links_to_get_applicable_post_types</code>: array of post types the link panel, redirect and sitemap exclusions apply to. Default <code>array( 'post', 'page' )</code>.</li>
<li><code>lh_page_links_to_is_valid_link_url</code>: <code>( bool $valid, string $url )</code>. Whether a value counts as a valid link. The default accepts full http or https URLs with a host. It is used both when saving and when reading, so a stricter or looser rule applies to both.</li>
<li><code>lh_page_links_to_return_link_meta_key</code>: the post meta key the link is stored under. Default <code>_lh_page_links_to-link_url</code>. The block editor panel is given the filtered key.</li>
<li><code>lh_page_links_to_init_plugin</code>: return false to stop the plugin adding any of its hooks.</li>
</ul>



<h2 class="wp-block-heading">Actions</h2>



<ul class="wp-block-list">
<li><code>lh_page_links_to_redirect_url</code>: <code>( int $post_id, string $url )</code>. Fires just before a visitor is redirected, for example to log redirects.</li>
</ul>



<h2 class="wp-block-heading">Integrations</h2>



<ul class="wp-block-list">
<li><code>wp_sitemaps_posts_query_args</code>: posts with a valid link are left out of the core XML sitemap.</li>
<li><code>lh_html_sitemap_get_excluded_post_ids</code>: posts with a valid link are left out of the LH HTML Sitemap.</li>
</ul>



<h2 class="wp-block-heading">Data</h2>



<p class="wp-block-paragraph">The link is stored in a single post meta value, <code>_lh_page_links_to-link_url</code>, registered with <code>show_in_rest</code> so the block editor can read and write it. Only valid links are stored: an empty or invalid value deletes the meta instead. Editing it requires permission to edit that post. There are no custom tables, options or cron jobs.</p>



<h2 class="wp-block-heading">Public method</h2>



<p class="wp-block-paragraph"><code>LH_Page_links_to_plugin::get_link( $post )</code> takes a post or post ID and returns its link URL, or false if it has no valid link. Use it in a theme to link a post title straight to its destination.</p>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Page links to
Filters




lh_page_links_to_get_applicable_post_types: array of post types the link panel, redirect and sitemap exclusions apply to. Default array( 'post', 'page' ).
lh_page_links_to_is_valid_link_url: ( bool $valid, string $url ). Whether a value counts as a valid link. The default accepts full http or https URLs with a host. It is used both when saving and when reading, so a stricter or looser rule applies to both.
lh_page_links_to_return_link_meta_key: the post meta key the link is stored under. Default _lh_page_links_to-link_url. The block editor panel is given the filtered key.
lh_page_links_to_init_plugin: return false to stop the plugin adding any of its hooks.




Actions




lh_page_links_to_redirect_url: ( int $post_id, string $url ). Fires just before a visitor is redirected, for example to log redirects.




Integrations




wp_sitemaps_posts_query_args: posts with a valid link are left out of the core XML sitemap.
lh_html_sitemap_get_excluded_post_ids: posts with a valid link are left out of the LH HTML Sitemap.




Data



The link is stored in a single post meta value, _lh_page_links_to-link_url, registered with show_in_rest so the block editor can read and write it. Only valid links are stored: an empty or invalid value deletes the meta instead. Editing it requires permission to edit that post. There are no custom tables, options or cron jobs.



Public method



LH_Page_links_to_plugin::get_link( $post ) takes a post or post ID and returns its link URL, or false if it has no valid link. Use it in a theme to link a post title straight to its destination.
""" ;
  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> .
