---
title: ActivityPub Outbox and Webmentions
date: 2026-12-02T09:35:39+00:00
modified: 2026-12-02T09:42:54+00:00
image:: https://kaspars.net/wp-content/uploads/2026/12/reply-daymark-webmention-activitypub.png
permalink: https://kaspars.net/blog/activitypub-and-webmentions
post_type: post
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
post_tag:
  - Plugin
  - Snippet
category:
  - WordPress
---

# ActivityPub Outbox and Webmentions

When you have both [ActivityPub](https://wordpress.org/plugins/activitypub/) and [Webmentions](https://wordpress.org/plugins/webmention/) plugins installed, every post or reply you create in WordPress is sent as both an ActivityPub activity and a Webmention ping, which happened to [my reply to this blog post](https://jeffpaul.com/2026/11/daymark-is-my-social-app-for-wordpress/#comment-4972) about his awesome [Daymark plugin](https://wordpress.org/plugins/daymark/):

![Reply to an ActivityPub post as a comment on a WordPress site](https://kaspars.net/wp-content/uploads/2026/12/reply-daymark-webmention-activitypub.png?strip=all&quality=90&resize=1456,746)

I posted the reply using my [FediTap web app](https://kasparsd.github.io/fedi-tap/) that posts via the [new ActivityPub API in the ActivityPub plugin](https://activitypub.blog/2026/06/12/9-0-0-growing-up/), which means that:

1. ActivityPub received my reply from FediTap over REST API.
2. ActivityPub turned the `object.inReplyTo` into a `activitypub/reply` block and placed it at the top of the post content.
3. ActivityPub sent the reply to Jeff’s ActivityPub inbox which published it as a comment on the post.
4. Webmentions plugin scheduled a one-time cron job to send a webmention ping as well.

When Jeff’s site received the messages:

1. ActivityPub processed the incoming `Create` activity as a comment on that `object.inReplyTo` post, stored the reply object ID in `source_id` and the public URL of it in `source_url` comment meta.
2. Webmention processed the incoming HTTP payload, matched `source_url` with webmention’s `source` and **replaced the comment body** with it’s own version that includes the URL from the `activitypub/reply` block at the top.

I’m not sure if this is the desired behavior and there is [an open issue](https://github.com/pfefferle/wordpress-webmention/issues/543) about this.

You can use the following snippet to disable the Webmention pings for posts that are also replies to ActivityPub objects:

```
add_action( 'activitypub_outbox_created_post', function ( $post_id, $activity ) {
    if ( ! empty( $activity['object']['inReplyTo'] ) ) {
        update_post_meta( $post_id, 'webmentions_disabled_pings', true );
    }
}, 10, 2 );
```

We must set the post meta because the webmention processing happen asynchronously on cron so it has to be persisted.