Webmention 5.11.0 has 19 actions and 38 filters, read directly from its source code on Nov 18, 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 Webmention fires an action
add_action( 'edit_webmention', function( $commentdata, $commentdata2 ) {
// Your code runs here.
}, 10, 2 );
// Change a value Webmention is about to use
add_filter( 'webmention_success_message', function( $html__ ) {
// Change $html__ here.
return $html__;
}, 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
-
/** * Filters the message that is returned when a Webmention was received * successfully. */ apply_filters( 'webmention_success_message', esc_html__( 'Thank you! Your Webmention has been received.', 'webmention' ) ); -
/** * Fires after a webmention is updated in the database. */ do_action( 'edit_webmention', $commentdata['comment_ID'], $commentdata ); -
/** * Filters the list of allowed comment types for retrieving avatars. */ apply_filters( 'get_avatar_comment_types', array( 'comment' ) ); -
/** * Filters the arguments for registering a comment type. */ apply_filters( 'register_webmention_comment_type_args', $args, $this->name ); -
/** * Fires after a Webmention comment type is registered. */ do_action( 'registered_webmention_comment_type', $comment_type, $comment_type_object ); -
/** * Fires on a successful creation of a sideloaded avatar in the store */ do_action( 'sideload_webmention_avatar', $comment, $avatar_url ); -
/** * Filter Comment Data for Webmentions. */ apply_filters( 'webmention_comment_data', $commentdata ); -
/** * Filter the template used to render the Webmention form. */ apply_filters( 'webmention_comment_form', WEBMENTION_PLUGIN_DIR . 'templates/comment-form.php' ); -
/** * Hook to add custom content after the Webmention form added to the comment * form. */ do_action( 'webmention_comment_form_template_after' ); -
/** * Hook to add custom content before the Webmention form added to the comment * form. */ do_action( 'webmention_comment_form_template_before' ); -
/** * Filters the returned comment type string. */ apply_filters( 'webmention_comment_string', $name, $type ); -
/** * Fires if Error is Returned from Filter. */ do_action( 'webmention_data_error', $commentdata ); -
/** * Filter the mapping of HTTP status codes to Webmention error codes. */ apply_filters( 'webmention_http_error_codes', array( 404 => 'resource_not_found', 410 => 'resource_deleted', 451 => 'resource_removed', ) ); -
/** * Fires when the system has to be migrated. */ do_action( 'webmention_migrate', $version_from_db, WEBMENTION_VERSION ); -
/** * Fires when a webmention is created. */ do_action( 'webmention_post', $commentdata['comment_ID'], $commentdata ); -
/** * Allow plugins to disable block editor support, thus disabling blocks * registered by the Webmentions plugin. */ apply_filters( 'webmention_site_supports_blocks', $return ); -
/** * Fires if the received webmention is not a response but just an update * notification. */ do_action( 'webmention_target_updated_notification', $commentdata ); -
/** * Fires if an Unregistered Comment Type is About to Be Added */ do_action( 'webmention_unknown_type', $commentdata ); -
/** * Filters the message that is returned when a Webmention already exists and * was updated. */ apply_filters( 'webmention_update_message', esc_html__( 'You already sent a Webmention for this target. The existing Webmention has been updated.', 'webmention' ) ); -
/** * Filter whether the Webmention form block is added through Block Hooks. */ apply_filters( 'webmention_use_block_hooks', $use_block_hooks ); -
/** * Filters whether the current post is open for webmentions. */ apply_filters( 'webmentions_open', $open, $post_id ); -
apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) ); -
apply_filters( 'webmention_post_id', $id, $url ); -
apply_filters( 'webmention_form_submit_text', __( 'Send Webmention', 'webmention' ) ); -
do_action( 'before' ); -
do_action( 'send_webmention', $source, $target ); -
apply_filters( 'separate_webmentions_from_comments', get_option( 'webmention_separate_comment', 1 ) ); -
do_action( 'webmention_after_reaction_list' ); -
apply_filters( 'webmention_avatar_directory', $upload_dir, $url ); -
do_action( 'webmention_before_reaction_list' ); -
apply_filters( 'webmention_cite', '<small> @ <cite><a href="%1$s">%2$s</a></cite></small>' ); -
do_action( 'webmention_comment_metadata', $comment ); -
apply_filters( 'webmention_comment_template', WEBMENTION_PLUGIN_DIR . 'templates/comment.php' ); -
apply_filters( 'webmention_comment_type', WEBMENTION_COMMENT_TYPE ); -
apply_filters( "webmention_comment_type_{$attr}", $return, $type ); -
apply_filters( 'webmention_endpoint', get_rest_url( null, '/webmention/1.0/endpoint' ) ); -
apply_filters( 'webmention_endpoint_form', WEBMENTION_PLUGIN_DIR . 'templates/endpoint-form.php' ); -
do_action( 'webmention_endpoint_form_after_input_fields' ); -
do_action( 'webmention_endpoint_form_before_form' ); -
do_action( 'webmention_endpoint_form_before_input_fields' ); -
apply_filters( 'webmention_form_text', $text, $post_id ); -
apply_filters( 'webmention_handler_jsonld_set_properties', array(), $this ); -
apply_filters( 'webmention_handler_meta_set_properties', array(), $this ); -
apply_filters( 'webmention_handler_mf2_set_properties', array(), $this ); -
apply_filters( 'webmention_item_commentdata_array', $comment, $this ); -
apply_filters( 'webmention_links', $urls, $post_id ); -
apply_filters( 'webmention_mf2_class_mapper', $class_mapper ); -
apply_filters( 'webmention_mf2_rel_mapper', $rel_mapper ); -
do_action( 'webmention_post_send', $response, $source, $target, $post_id ); -
apply_filters( 'webmention_process_type', WEBMENTION_PROCESS_TYPE ); -
apply_filters( 'webmention_reaction_overlay', true ); -
apply_filters( 'webmention_refresh', $commentdata, $comment->comment_ID ); -
apply_filters( 'webmention_request_get_args', $args ); -
apply_filters( 'webmention_schedule_message', esc_html__( 'Webmention is scheduled', 'webmention' ) ); -
apply_filters( 'webmention_send_vars', $body, $post_id ); -
apply_filters( 'webmention_server_url', $webmention_server_url, $target ); -
apply_filters( 'webmention_supported_delete_codes', array( 'resource_not_found', 'resource_deleted', 'resource_removed', ) );
Generated from Webmention'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: