WebSub (FKA. PubSubHubbub) 4.0.1 has 10 actions and 23 filters, read directly from its source code on Nov 17, 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 WebSub (FKA. PubSubHubbub) fires an action
add_action( 'pubsubhubbub_publish_update_response', function( $response ) {
// Your code runs here.
}, 10, 1 );
// Change a value WebSub (FKA. PubSubHubbub) is about to use
add_filter( 'pubsubhubbub_comment_feed_urls', function( $feed_urls, $comment_id ) {
// Change $feed_urls here.
return $feed_urls;
}, 10, 2 );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
-
websub_{$mode}_error
action/** * Fires when a subscription request fails. */ do_action( "websub_{$mode}_error", $topic_url, $subscription_id, $response ); -
/** * Filter the list of comment feed URLs to publish to the hub. */ apply_filters_deprecated( 'pubsubhubbub_comment_feed_urls', array( $feed_urls, $comment_id ), '4.0.0', 'websub_comment_feed_urls' ); -
pubsubhubbub_feed_urls
filter/** * Filter the list of feed URLs to publish to the hub for a post. */ apply_filters_deprecated( 'pubsubhubbub_feed_urls', array( $feed_urls, $post_id ), '4.0.0', 'websub_feed_urls' ); -
pubsubhubbub_hub_urls
filter/** * Filter the list of hub URLs to publish updates to. */ apply_filters_deprecated( 'pubsubhubbub_hub_urls', array( $hub_urls ), '4.0.0', 'websub_hub_urls' ); -
/** * Fires after publishing an update to a hub. */ do_action_deprecated( 'pubsubhubbub_publish_update_response', array( $response ), '4.0.0', 'websub_publish_update_response' ); -
pubsubhubbub_show_discovery
filter/** * Filter whether to show WebSub discovery links. */ apply_filters_deprecated( 'pubsubhubbub_show_discovery', array( $show_discovery ), '4.0.0', 'websub_show_discovery' ); -
/** * Filter the list of comment feed types that show WebSub discovery. */ apply_filters_deprecated( 'pubsubhubbub_show_discovery_for_comment_feed_types', array( get_supported_comment_feed_types() ), '4.0.0', 'websub_show_discovery_for_comment_feed_types' ); -
/** * Filter the list of feed types that show WebSub discovery. */ apply_filters_deprecated( 'pubsubhubbub_show_discovery_for_feed_types', array( get_supported_feed_types() ), '4.0.0', 'websub_show_discovery_for_feed_types' ); -
/** * Filter the list of supported comment feed types for WebSub. */ apply_filters_deprecated( 'pubsubhubbub_supported_comment_feed_types', array( array( 'atom', 'rss2' ) ), '4.0.0', 'websub_supported_comment_feed_types' ); -
/** * Filter the list of supported feed types for WebSub. */ apply_filters_deprecated( 'pubsubhubbub_supported_feed_types', array( array( 'atom', 'rss2' ) ), '4.0.0', 'websub_supported_feed_types' ); -
websub_{$mode}_success
action/** * Fires when a subscription request succeeds. */ do_action( "websub_{$mode}_success", $topic_url, $subscription_id, $response ); -
websub_denied
action/** * Fires when a subscription is denied by the hub. */ do_action( 'websub_denied', $subscription_id, $topic, $reason ); -
websub_lease_seconds
filter/** * Filter the requested lease duration. */ apply_filters( 'websub_lease_seconds', $args['lease_seconds'], $subscription_id ); -
websub_pre_{$mode}
action/** * Fires before sending a subscription request. */ do_action( "websub_pre_{$mode}", $topic_url, $subscription_id, $hub_url ); -
websub_received
action/** * Fires when content is received from a hub. */ do_action( 'websub_received', $subscription_id, $topic, $content, $content_type_value ); -
websub_signature_invalid
action/** * Fires when signature verification fails. */ do_action( 'websub_signature_invalid', $subscription_id, $topic, $signature ); -
websub_signature_valid
action/** * Fires when signature verification succeeds. */ do_action( 'websub_signature_valid', $subscription_id, $topic ); -
websub_subscribe_args
filter/** * Filter subscription request arguments. */ apply_filters( 'websub_subscribe_args', $args, $topic_url, $subscription_id ); -
websub_subscription_secret
filter/** * Filter to get the secret for a subscription. */ apply_filters( 'websub_subscription_secret', '', $subscription_id ); -
websub_verified
action/** * Fires when a subscription is verified. */ do_action( 'websub_verified', $subscription_id, $topic, $lease_seconds, $mode ); -
websub_verify_subscription
filter/** * Filter whether to accept a subscription verification. */ apply_filters( 'websub_verify_subscription', false, $subscription_id, $topic, $mode ); -
http_headers_useragent
filterapply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . \get_bloginfo( 'url' ), $hub_url ); -
pshb_feed_urls
filterapply_filters( 'pshb_feed_urls', $feed_urls ); -
self_link
filterapply_filters( 'self_link', \set_url_scheme( 'http://' . $host['host'] . $request_uri ) ); -
websub_comment_feed_urls
filterapply_filters( 'websub_comment_feed_urls', $feed_urls, $comment_id ); -
websub_feed_urls
filterapply_filters( 'websub_feed_urls', $feed_urls, $post_id ); -
websub_hub_urls
filterapply_filters( 'websub_hub_urls', $hub_urls ); -
do_action( 'websub_publish_update_response', $response ); -
websub_show_discovery
filterapply_filters( 'websub_show_discovery', $show_discovery ); -
apply_filters( 'websub_show_discovery_for_comment_feed_types', $supported_comment_feed_types ); -
apply_filters( 'websub_show_discovery_for_feed_types', $supported_feed_types ); -
apply_filters( 'websub_supported_comment_feed_types', $feed_types ); -
websub_supported_feed_types
filterapply_filters( 'websub_supported_feed_types', $feed_types );
Generated from WebSub (FKA. PubSubHubbub)'s GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: