WebSub (FKA. PubSubHubbub) icon
Social Media

WebSub (FKA. PubSubHubbub) hooks reference

  • By joshfraz
  • v4.0.1
  • Updated

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.

functions.phpyour child theme
// 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

  • includes/class-subscriber.php line 152 · used in 2 places
    /**
     * Fires when a subscription request fails.
     */
    do_action( "websub_{$mode}_error", $topic_url, $subscription_id, $response );
  • includes/class-publisher.php line 55
    /**
     * 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' );
  • includes/class-publisher.php line 226
    /**
     * 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' );
  • includes/class-publisher.php line 174
    /**
     * 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' );
  • includes/class-publisher.php line 145
    /**
     * Fires after publishing an update to a hub.
     */
    do_action_deprecated( 'pubsubhubbub_publish_update_response', array( $response ), '4.0.0', 'websub_publish_update_response' );
  • includes/functions.php line 75
    /**
     * Filter whether to show WebSub discovery links.
     */
    apply_filters_deprecated( 'pubsubhubbub_show_discovery', array( $show_discovery ), '4.0.0', 'websub_show_discovery' );
  • includes/functions.php line 57
    /**
     * 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' );
  • includes/functions.php line 47
    /**
     * 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' );
  • includes/functions.php line 126
    /**
     * 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' );
  • includes/functions.php line 107
    /**
     * 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' );
  • includes/class-subscriber.php line 167
    /**
     * Fires when a subscription request succeeds.
     */
    do_action( "websub_{$mode}_success", $topic_url, $subscription_id, $response );
  • websub_denied

    action
    includes/rest/class-subscriber-controller.php line 142
    /**
     * Fires when a subscription is denied by the hub.
     */
    do_action( 'websub_denied', $subscription_id, $topic, $reason );
  • includes/class-subscriber.php line 125
    /**
     * Filter the requested lease duration.
     */
    apply_filters( 'websub_lease_seconds', $args['lease_seconds'], $subscription_id );
  • includes/class-subscriber.php line 105
    /**
     * Fires before sending a subscription request.
     */
    do_action( "websub_pre_{$mode}", $topic_url, $subscription_id, $hub_url );
  • includes/rest/class-subscriber-controller.php line 264
    /**
     * Fires when content is received from a hub.
     */
    do_action( 'websub_received', $subscription_id, $topic, $content, $content_type_value );
  • includes/rest/class-subscriber-controller.php line 241
    /**
     * Fires when signature verification fails.
     */
    do_action( 'websub_signature_invalid', $subscription_id, $topic, $signature );
  • includes/rest/class-subscriber-controller.php line 232
    /**
     * Fires when signature verification succeeds.
     */
    do_action( 'websub_signature_valid', $subscription_id, $topic );
  • includes/class-subscriber.php line 83
    /**
     * Filter subscription request arguments.
     */
    apply_filters( 'websub_subscribe_args', $args, $topic_url, $subscription_id );
  • includes/rest/class-subscriber-controller.php line 220
    /**
     * Filter to get the secret for a subscription.
     */
    apply_filters( 'websub_subscription_secret', '', $subscription_id );
  • includes/rest/class-subscriber-controller.php line 183
    /**
     * Fires when a subscription is verified.
     */
    do_action( 'websub_verified', $subscription_id, $topic, $lease_seconds, $mode );
  • includes/rest/class-subscriber-controller.php line 156
    /**
     * Filter whether to accept a subscription verification.
     */
    apply_filters( 'websub_verify_subscription', false, $subscription_id, $topic, $mode );
  • includes/class-publisher.php line 102 · used in 2 places
    apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . \get_bloginfo( 'url' ), $hub_url );
  • includes/deprecated.php line 122
    apply_filters( 'pshb_feed_urls', $feed_urls );
  • includes/class-publisher.php line 56
    apply_filters( 'websub_comment_feed_urls', $feed_urls, $comment_id );
  • includes/class-publisher.php line 227
    apply_filters( 'websub_feed_urls', $feed_urls, $post_id );
  • includes/class-publisher.php line 175
    apply_filters( 'websub_hub_urls', $hub_urls );
  • includes/class-publisher.php line 146
    do_action( 'websub_publish_update_response', $response );
  • includes/functions.php line 76
    apply_filters( 'websub_show_discovery', $show_discovery );
  • includes/functions.php line 58
    apply_filters( 'websub_show_discovery_for_comment_feed_types', $supported_comment_feed_types );
  • includes/functions.php line 48
    apply_filters( 'websub_show_discovery_for_feed_types', $supported_feed_types );
  • includes/functions.php line 127
    apply_filters( 'websub_supported_comment_feed_types', $feed_types );
  • includes/functions.php line 108
    apply_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: