This folder contains community-contributed snippets that extend or customize the ActivityPub plugin. Each snippet is a small, self-contained WordPress plugin that hooks into the ActivityPub plugin to add or modify functionality.
Think of snippets as a testing ground, similar to WordPress' feature plugin concept. Experimental ideas are developed here, and mature, valuable ones may eventually be integrated into the main plugin.
| Snippet | Description |
|---|---|
| Bot Account | Marks ActivityPub profiles as bot/automated accounts, displaying a "BOT" badge in the Fediverse. |
| FediBlog Tag | Automatically adds the FediBlog tag to standard format blog posts. |
| Locale from Tags | Sets a post's ActivityPub language based on post tags matching language codes. |
| Blockless ActivityPub | Fediverse reactions without all that frontend-rendered but JavaScript-heavy blocks magic. |
| Use Jetpack's Site Accelerator CDN (Photon) for Remote Media | Rewrites ActivityPub remote media URLs through Jetpack's free image CDN instead of caching files locally. |
| ATproto DID for Bridgy Fed | Allows you to serve an ATproto DID from your blog's .well-known directory to allow Bridgy Fed to use your blog's hostname as its Bluesky handle. |
| Quotes as Comments | Displays ActivityPub quotes as regular comments instead of facepile reactions. |
| Auto-Approve Reactions | Automatically approves all incoming ActivityPub reactions (likes, reposts, and quotes) without manual moderation. |
| Inspect Internal Storage | Makes the plugin's internal Inbox, Outbox, and remote post (ap_post) storage visible in the WordPress admin for inspection and debugging. |
- Copy the snippet folder you want to use into your
wp-content/plugins/directory. - Activate the snippet plugin from the WordPress admin under Plugins.
- The snippet will require the ActivityPub plugin to be active.
Alternatively, you can copy the snippet's main PHP file directly into your wp-content/mu-plugins/ directory for automatic activation.
We welcome new snippets! To contribute:
- Create a new folder in
snippets/with a descriptive, kebab-case name (e.g.,my-snippet-name/). - Add a main PHP file with proper WordPress plugin headers, including
Requires Plugins: activitypub. - Use the
Activitypub\Snippetsnamespace to keep things consistent. - Add a
README.mdto your snippet folder explaining what it does, how it works, and any configuration options. - Update this file by adding your snippet to the "Available Snippets" table above.
- Submit a pull request following the Pull Request Guidelines.
Each snippet folder should contain at minimum:
snippets/
my-snippet/
my-snippet.php # Main plugin file with WordPress plugin headers
README.md # Documentation for the snippet
<?php
/**
* Plugin Name: My Snippet Name
* Plugin URI: https://github.com/Automattic/wordpress-activitypub
* Description: Brief description of what this snippet does.
* Version: 1.0.0
* Requires at least: 5.9
* Requires PHP: 7.4
* Author: Your Name
* Author URI: https://example.com/
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Requires Plugins: activitypub
*/
namespace Activitypub\Snippets;- Keep snippets small and focused on a single feature or behavior.
- Use WordPress coding standards (WPCS).
- Snippets must not break the core ActivityPub plugin when deactivated.
- Include inline documentation for hooks and filters.