Hydrogen SEO 0.0.31 has 30 actions and 96 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Hydrogen SEO fires an action
add_action( 'hydrogen_seo_metabox_post_data_saved', function( $post_id, $changed ) {
// Your code runs here.
}, 10, 2 );
// Change a value Hydrogen SEO is about to use
add_filter( 'hydrogen_seo_backend_url', function( $base ) {
// Change $base here.
return $base;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * This action is documented in inc/modules/metabox/api.php */ do_action( 'hydrogen_seo_metabox_post_data_saved', $post_id, $changed ); -
/** * Filters the Hydrogen SEO backend base URL. */ apply_filters( 'hydrogen_seo_backend_url', $base ); -
/** * This filter is documented in inc/modules/metabox/controller.php */ apply_filters( 'hydrogen_seo_metabox_post_types', $types ); -
/** * Filters whether a 404 is counted. */ apply_filters( 'hydrogen_seo_404_monitor_record', true, $url ); -
/** * Filters the advanced robots values for the current page. */ apply_filters( 'hydrogen_seo_advanced_robots', $resolved, $override ); -
/** * Filters the Hydrogen SEO agent service base URL. */ apply_filters( 'hydrogen_seo_agent_url', $default ); -
/** * Filters the Article subtype of a post's Article entity. */ apply_filters( 'hydrogen_seo_article_type', $type ?? 'Article', $post ); -
/** * Filters where an attachment page redirects to. Return an empty string to * keep the attachment page. */ apply_filters( 'hydrogen_seo_attachment_redirect_url', $target, $attachment ); -
/** * Filter the display arguments for one breadcrumbs render. */ apply_filters( 'hydrogen_seo_breadcrumbs_args', $resolved, $args ); -
/** * Filter the breadcrumbs HTML. */ apply_filters( 'hydrogen_seo_breadcrumbs_html', $html, $items, $resolved ); -
/** * Filter the breadcrumb trail. Applies everywhere the trail is used: rendered * HTML, integrations and the BreadcrumbList schema. */ apply_filters( 'hydrogen_seo_breadcrumbs_items', $this->crumbs, $context ); -
/** * Filter the term a post's breadcrumb trail goes through. */ apply_filters( 'hydrogen_seo_breadcrumbs_main_term', $main, $terms, $post ); -
/** * Filter the resolved breadcrumb settings. */ apply_filters( 'hydrogen_seo_breadcrumbs_settings', $settings ); -
/** * Filter the canonical URL before it is printed. */ apply_filters( 'hydrogen_seo_canonical_url', $url, $this->context, (int) $this->context_id ); -
/** * Filters whether a category keeps its base because its base-less path belongs * to something else. */ apply_filters( 'hydrogen_seo_category_base_path_taken', $taken, $path ); -
/** * Filters the crawl cleanup switches in effect for this request. */ apply_filters( 'hydrogen_seo_crawl_cleanup', $switches ); -
/** * Filters where a switched-off feed redirects to. Runs only for a feed whose * "turn off and redirect" switch is on. */ apply_filters( 'hydrogen_seo_crawl_cleanup_feed_redirect', $target, $type ); -
/** * Filters whether an image missing alt text gets one generated. */ apply_filters( 'hydrogen_seo_fill_missing_image_alt', true, $img_tag, $attachment_id ); -
/** * Filters whether the Googlebot-News noindex tag is printed. */ apply_filters( 'hydrogen_seo_googlebot_news_noindex', in_array( $post->post_type, $types, true ), $post ); -
/** * Filters the HTML sitemap markup. */ apply_filters( 'hydrogen_seo_html_sitemap_html', $html, $parsed ); -
/** * Filters the query arguments for one post type of the HTML sitemap. */ apply_filters( 'hydrogen_seo_html_sitemap_query_args', $args, $post_type, $limit ); -
/** * Filters whether IndexNow submissions are sent from this site. */ apply_filters( 'hydrogen_seo_indexnow_can_send', $can ); -
/** * Filters the post types whose links are counted. */ apply_filters( 'hydrogen_seo_link_counter_post_types', $types ); -
/** * Filter the migration batch size. */ apply_filters( 'hydrogen_seo_migration_batch_size', $default, $phase, $source ); -
/** * Fires after a migration completed and wrote data. */ do_action( 'hydrogen_seo_migration_completed', $source->slug(), $state->to_array() ); -
/** * Filter the post types a migration source processes. */ apply_filters( 'hydrogen_seo_migration_post_types', array_values( $types ), $this->slug() ); -
/** * Filter the migration sources. */ apply_filters( 'hydrogen_seo_migration_sources', self::builtin() ); -
/** * Filter the taxonomies a migration source processes. */ apply_filters( 'hydrogen_seo_migration_taxonomies', array_values( $taxonomies ), $this->slug() ); -
/** * Filters whether an article is left out of the news sitemap. */ apply_filters( 'hydrogen_seo_news_sitemap_exclude_post', $excluded, $post ); -
/** * Filters the Google News language code of an article. */ apply_filters( 'hydrogen_seo_news_sitemap_language', self::language_code( $locale ), $post ); -
/** * Filters the number of incoming internal links below which pillar content is * listed by the "Pillar content with fewer than N incoming links" filter of * the Posts screens. */ apply_filters( 'hydrogen_seo_pillar_min_incoming_links', self::DEFAULT_MIN_INCOMING_LINKS ); -
/** * Filters the post types whose list screens get the SEO column, the SEO filter * and the Quick Edit / Bulk Edit fields. */ apply_filters( 'hydrogen_seo_post_list_post_types', $types ); -
/** * Filters whether a post's primary term is used in its permalink * (`/%category%/` post permalinks and WooCommerce `/%product_cat%/` product * permalinks). */ apply_filters( 'hydrogen_seo_primary_term_in_permalinks', true, $post ); -
/** * Hook to allow printing meta tags. */ do_action( 'hydrogen_seo_print_meta' ); -
/** * Hook to allow printing schema markup. */ do_action( 'hydrogen_seo_print_schemas' ); -
/** * Filters the sitemap XSL stylesheet. */ apply_filters( 'hydrogen_seo_sitemap_stylesheet', $xsl ); -
/** * Filters whether the sitemap points browsers at the XSL stylesheet. */ apply_filters( 'hydrogen_seo_sitemap_stylesheet_enabled', true ); -
/** * Filter the headings a table of contents lists. */ apply_filters( 'hydrogen_seo_toc_headings', $entries, $atts, $post ); -
/** * Filter the HTML of a table of contents. */ apply_filters( 'hydrogen_seo_toc_html', $html, $entries, $atts ); -
/** * Filter the inline CSS printed with a table of contents. */ apply_filters( 'hydrogen_seo_toc_inline_css', Renderer::css() ); -
/** * Filter the most entries a table of contents lists. */ apply_filters( 'hydrogen_seo_toc_max_entries', self::MAX_ENTRIES ); -
/** * Filter the ids no heading is given, because the theme or WordPress uses them * elsewhere on the page. */ apply_filters( 'hydrogen_seo_toc_reserved_ids', self::RESERVED_IDS ); -
/** * Filters the page builder meta keys scanned for videos. */ apply_filters( 'hydrogen_seo_video_sitemap_builder_meta_keys', self::BUILDER_META_KEYS ); -
/** * Filters the videos detected in a post, before metadata lookups. */ apply_filters( 'hydrogen_seo_video_sitemap_detected_videos', $detected, $post ); -
/** * Filters whether a post is left out of the video sitemap. */ apply_filters( 'hydrogen_seo_video_sitemap_exclude_post', $excluded, $post ); -
/** * Filters the videos listed for one post in the video sitemap. */ apply_filters( 'hydrogen_seo_video_sitemap_post_videos', $videos, $post ); -
do_action( 'hydrogen_seo_metabox_term_data_saved', $id, $payload ); -
apply_filters( 'hydrogen_seo_robots_directives', $directives ); -
apply_filters( 'hydrogen_seo_robots_txt', $custom_content, $output, $public ); -
apply_filters( 'hydrogen_seo_sitemap_exclude_item', $excluded, $object_id, $type ); -
apply_filters( 'hydrogen_seo_sitemap_post_images', $images, $post_id ); -
apply_filters( 'hydrogen_seo_variable_replacements', $replacements, $post, $term ); -
apply_filters( 'document_title_separator', '-' ); -
apply_filters( 'hydrogen_seo_404_monitor_max_rows', self::MAX_ROWS ); -
do_action( 'hydrogen_seo_activated' ); -
apply_filters( 'hydrogen_seo_admin_localize_data', $data ); -
do_action( 'hydrogen_seo_after_daily_tasks' ); -
do_action( 'hydrogen_seo_after_load_components' ); -
do_action( 'hydrogen_seo_before_daily_tasks' ); -
do_action( 'hydrogen_seo_before_init' ); -
do_action( 'hydrogen_seo_before_load_components' ); -
apply_filters( 'hydrogen_seo_breadcrumbs_css', Renderer::css() ); -
apply_filters( 'hydrogen_seo_breadcrumbs_enabled', $enabled ); -
apply_filters( 'hydrogen_seo_breadcrumbs_settings_defaults', $defaults ); -
do_action( 'hydrogen_seo_cleanup_old_data' ); -
do_action( 'hydrogen_seo_deactivated' ); -
apply_filters( 'hydrogen_seo_default_llms_txt_content', $content ); -
apply_filters( 'hydrogen_seo_default_post_meta', [ 'rank_score' => 0, 'last_analyzed' => '', 'optimization_suggestions' => [], ] ); -
apply_filters( 'hydrogen_seo_default_robots_txt', $default, $public ); -
apply_filters( 'hydrogen_seo_default_settings', array_merge( [ 'general' => [ 'setup_completed' => false, 'site_type' => 'blog', 'primary_focus' => 'seo', 'enable_tracking' => false, 'api_key' => '', 'api_endpoint' => HYDROGEN_SEO_API_ENDPOINT, 'cache_expiration' => HYDROGEN_SEO_CACHE_EXPIRATION, 'permalinks' => [ 'strip_category_base' => false, 'redirect_attachments' => false, ], 'links' => [ 'nofollow_external' => false, 'external_new_tab'... ); -
apply_filters( 'hydrogen_seo_description', $description ); -
apply_filters( 'hydrogen_seo_description_length', $this->description_length ); -
apply_filters( 'hydrogen_seo_enable_frontend', true ); -
apply_filters( 'hydrogen_seo_enabled_post_types', [ 'post', 'page' ] ); -
apply_filters( 'hydrogen_seo_filter_changed_fields', $changed_fields, $meta_data, $context, $id ); -
apply_filters( 'hydrogen_seo_global_seo_defaults', [ 'separator' => '-', 'page_title' => '%title% %separator% %site_name%', 'auto_generate_description' => true, 'page_description' => '%excerpt%', 'canonical_url' => '', 'focus_keyword' => '', 'facebook_title' => '%title% %separator% %site_name%', 'facebook_description' => '%excerpt%', 'facebook_image_url' => '', 'facebook_image_id' => 0, 'facebook_image_width' => 0, 'facebook_image_height' => 0,... ); -
apply_filters( 'hydrogen_seo_homepage_settings_defaults', $defaults ); -
do_action( 'hydrogen_seo_init' ); -
apply_filters( 'hydrogen_seo_llms_txt_content', $content ); -
do_action( 'hydrogen_seo_llms_txt_reset' ); -
do_action( 'hydrogen_seo_llms_txt_updated', $content ); -
do_action( 'hydrogen_seo_metabox_init' ); -
apply_filters( 'hydrogen_seo_metabox_localize_data', $base_data ); -
do_action( 'hydrogen_seo_metabox_save_post', $post_id, $post ); -
do_action( 'hydrogen_seo_metabox_save_term', $term_id, $taxonomy ); -
apply_filters( 'hydrogen_seo_metabox_taxonomies', $taxonomies ); -
apply_filters( 'hydrogen_seo_module_defaults', self::module_defaults_registry() ); -
do_action( "hydrogen_seo_module_loaded_{$module_id}", $this->modules[ $module_id ] ); -
apply_filters( 'hydrogen_seo_modules', [ 'dashboard' => [ 'class' => 'HydrogenSEO\Inc\Modules\Dashboard\Init', 'enabled' => true, 'priority' => 1, ], 'metabox' => [ 'class' => 'HydrogenSEO\Inc\Modules\Metabox\Init', 'enabled' => true, 'priority' => 3, ], 'titles-meta' => [ 'class' => 'HydrogenSEO\Inc\Modules\Titles_Meta\Init', 'enabled' => true, 'priority' => 5, ], 'robots-settings' => [ 'class' => 'HydrogenSEO\Inc\Modules\Robots_Se... ); -
do_action( 'hydrogen_seo_modules_loaded', $this->modules ); -
apply_filters( 'hydrogen_seo_news_sitemap_publication_name', $name ); -
apply_filters( 'hydrogen_seo_news_sitemap_xml', self::render( $items ) ); -
apply_filters( 'hydrogen_seo_post_seo_defaults', [ 'page_title' => '', 'page_description' => '', 'canonical_url' => '', 'focus_keyword' => '', 'robots' => [], 'facebook_title' => '', 'facebook_description' => '', 'facebook_image_url' => '', 'facebook_image_id' => 0, 'facebook_image_width' => 0, 'facebook_image_height' => 0, 'twitter_title' => '', 'twitter_description' => '', 'twitter_image_url' => '', 'twitter_image_id' => 0, 'twitter_card_ty... ); -
apply_filters( 'hydrogen_seo_prepared_post_meta', $meta, $post_id ); -
apply_filters( 'hydrogen_seo_prepared_term_meta', $meta, $term_id ); -
do_action( 'hydrogen_seo_rank_analysis_init' ); -
do_action( 'hydrogen_seo_register_rest_routes', self::API_NAMESPACE ); -
apply_filters( 'hydrogen_seo_robots_data', $data ); -
do_action( 'hydrogen_seo_robots_editor_reset' ); -
do_action( 'hydrogen_seo_robots_editor_updated', $content ); -
do_action( 'hydrogen_seo_robots_editor_validation_warning', 'missing_user_agent' ); -
apply_filters( 'hydrogen_seo_robots_settings_defaults', $defaults ); -
apply_filters( 'hydrogen_seo_robots_sitemap_url', Sitemap_Utils::get_sitemap_url() ); -
apply_filters( 'hydrogen_seo_sanitize_settings', $clean, $settings ); -
do_action( 'hydrogen_seo_schema_error', $schema_type, $message, $context ); -
apply_filters( 'hydrogen_seo_schema_location_options', $options ); -
do_action( 'hydrogen_seo_schema_markup_init' ); -
apply_filters( 'hydrogen_seo_schema_types', [ 'Article' => __( 'Article', 'hydrogen-seo' ), 'BlogPosting' => __( 'Blog Posting', 'hydrogen-seo' ), 'NewsArticle' => __( 'News Article', 'hydrogen-seo' ), 'WebPage' => __( 'Web Page', 'hydrogen-seo' ), 'Product' => __( 'Product', 'hydrogen-seo' ), 'Recipe' => __( 'Recipe', 'hydrogen-seo' ), 'Event' => __( 'Event', 'hydrogen-seo' ), 'FAQPage' => __( 'FAQ Page', 'hydrogen-seo' ), 'HowTo' => __... ); -
apply_filters( 'hydrogen_seo_schemas', $this->schemas ); -
do_action( 'hydrogen_seo_seo_analysis_init' ); -
apply_filters( 'hydrogen_seo_seo_analysis_post_types', $types ); -
apply_filters( 'hydrogen_seo_seo_analysis_results', $analysis, $content, $focus_keyword ); -
apply_filters( 'hydrogen_seo_seo_meta_defaults', [ 'homepage' => self::seo_meta_bundle( '%site_name% %separator% %tagline%', '%tagline%' ), 'post' => $standard_bundle, 'page' => $standard_bundle, 'archive' => $term_archive_bundle, 'category' => $term_archive_bundle, 'tag' => $term_archive_bundle, 'author' => self::seo_meta_bundle( '%author_name% %separator% %site_name%', 'Articles by %author_name%', '%author_name%' ), 'search' => self::seo_me... ); -
do_action( 'hydrogen_seo_sitemap_cache_cleared' ); -
apply_filters( 'hydrogen_seo_sitemap_index_xml', $xml ); -
apply_filters( 'hydrogen_seo_sitemap_post_priority', $priority, $post_id ); -
apply_filters( 'hydrogen_seo_sitemap_post_type_xml', $xml, $post_type, $page ); -
apply_filters( 'hydrogen_seo_sitemap_taxonomy_xml', $xml, $taxonomy ); -
apply_filters( 'hydrogen_seo_sitemap_url', Sitemap_Utils::get_sitemap_url() ); -
apply_filters( 'hydrogen_seo_term_seo_defaults', $post_defaults ); -
apply_filters( 'hydrogen_seo_title', $title ); -
apply_filters( 'hydrogen_seo_title_separator', ' ' . Titles_Controller::get_instance()->get_general()['separator'] . ' ' ); -
apply_filters( 'hydrogen_seo_titles_meta_default_settings', $defaults ); -
apply_filters( 'hydrogen_seo_video_sitemap_xml', self::render( $urls ), $page ); -
apply_filters( 'plugin_locale', get_user_locale(), 'hydrogen-seo' ); -
apply_filters( 'wpml_post_language_details', null, $post->ID );
Generated from Hydrogen SEO's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: