| 1 |
# Integrations |
| 2 |
|
| 3 |
This folder holds the plugin's **third-party compatibility layer** — small classes that make ActivityPub cooperate with other plugins and hosting features, without any of them having to know about each other. |
| 4 |
|
| 5 |
## How they load |
| 6 |
|
| 7 |
`load.php` runs on `plugins_loaded` (`plugin_init()`; BuddyPress hooks `bp_include` instead, because it loads later). For each integration it first checks that the companion plugin is present — a `defined()`, `class_exists()`, or `function_exists()` probe — and only then wires it up: |
| 8 |
|
| 9 |
```php |
| 10 |
if ( \defined( 'JETPACK__VERSION' ) ) { |
| 11 |
Jetpack::init(); |
| 12 |
} |
| 13 |
``` |
| 14 |
|
| 15 |
A few integrations are always initialized (`Nodeinfo`, `Webfinger`, `Surge`, `Litespeed_Cache`, `Stream`) because they either target an always-available surface or do their own detection inside `init()`. |
| 16 |
|
| 17 |
## Two patterns |
| 18 |
|
| 19 |
1. **`::init()` classes** (most of them). A static `init()` registers the WordPress hooks the integration needs. Files are named `class-{name}.php`, namespaced `Activitypub\Integration`. |
| 20 |
|
| 21 |
2. **Transformer swaps** (`Podlove Podcast Publisher`, `Seriously Simple Podcasting`). These hook the `activitypub_transformer` filter in `load.php` to return a subclass of `Activitypub\Transformer\Post` that overrides `get_attachment()`, so an episode federates with its audio enclosure and cover art. |
| 22 |
|
| 23 |
## The integrations |
| 24 |
|
| 25 |
### Federation standards |
| 26 |
|
| 27 |
| Integration | What it does | |
| 28 |
|---|---| |
| 29 |
| **WebFinger** | Adds ActivityPub actor links to the [](https://wordpress.org/plugins/webfinger/WebFinger](https://wordpress.org/plugins/webfinger/](https://wordpress.org/plugins/webfinger/) plugin's responses. | |
| 30 |
| **NodeInfo** | Advertises ActivityPub in the [](https://wordpress.org/plugins/nodeinfo/NodeInfo](https://wordpress.org/plugins/nodeinfo/](https://wordpress.org/plugins/nodeinfo/) / NodeInfo2 server metadata. | |
| 31 |
| **OpenGraph** | Coordinates Open Graph output with the [](https://wordpress.org/plugins/opengraph/OpenGraph](https://wordpress.org/plugins/opengraph/](https://wordpress.org/plugins/opengraph/) plugin so tags aren't duplicated. | |
| 32 |
|
| 33 |
### Fediverse & reader surfaces |
| 34 |
|
| 35 |
| Integration | What it does | |
| 36 |
|---|---| |
| 37 |
| **Jetpack** | Syncs ActivityPub options and follower/following meta to WordPress.com, adds a Reader link on the Following screen, enables the Following UI, and adapts the "share to reply" flow. | |
| 38 |
| **Enable Mastodon Apps** | Feeds ActivityPub account, follower, post, and notification data to [](https://wordpress.org/plugins/enable-mastodon-apps/Enable Mastodon Apps](https://wordpress.org/plugins/enable-mastodon-apps/](https://wordpress.org/plugins/enable-mastodon-apps/) so native Mastodon client apps work against the site. | |
| 39 |
| **BuddyPress** | Maps BuddyPress member profiles into ActivityPub actors and adapts the Followers/Following blocks. | |
| 40 |
|
| 41 |
### Content & publishing |
| 42 |
|
| 43 |
| Integration | What it does | |
| 44 |
|---|---| |
| 45 |
| **Classic Editor** | Provides attachment/media extraction and editor UI for sites without the block editor. | |
| 46 |
| **Podlove Podcast Publisher** | Federates Podlove episodes with their audio enclosure and cover art *(transformer)*. | |
| 47 |
| **Seriously Simple Podcasting** | Federates Seriously Simple Podcasting episodes with their audio enclosure *(transformer)*. | |
| 48 |
|
| 49 |
### Caching |
| 50 |
|
| 51 |
| Integration | What it does | |
| 52 |
|---|---| |
| 53 |
| **LiteSpeed Cache** | Keeps the html and ActivityPub (JSON) responses in separate cache buckets, with a Site Health check. | |
| 54 |
| **Surge** | Keeps the html and ActivityPub (JSON) responses in separate cache buckets, with a Site Health check. | |
| 55 |
|
| 56 |
### Internationalization |
| 57 |
|
| 58 |
| Integration | What it does | |
| 59 |
|---|---| |
| 60 |
| **WPML** | Supplies the correct per-object locale for federated content under WPML. | |
| 61 |
| **Multisite Language Switcher** | Keeps ActivityPub data consistent across MSLS post translations. | |
| 62 |
|
| 63 |
### Other |
| 64 |
|
| 65 |
| Integration | What it does | |
| 66 |
|---|---| |
| 67 |
| **Akismet** | Keeps Akismet's comment handling sensible for federated interactions (likes, reposts, replies). | |
| 68 |
| **Yoast SEO** | Adds a Site Health check for Yoast settings that can interfere with federation. | |
| 69 |
|
| 70 |
## Adding an integration |
| 71 |
|
| 72 |
1. Create `class-{name}.php` in this folder, namespaced `Activitypub\Integration`, with a static `init()` (or, for a content transformer, a `Post` subclass). |
| 73 |
2. In `load.php`, add a guarded call — detect the companion plugin with `defined()` / `class_exists()` / `function_exists()`, then `init()` it (or register the transformer via the `activitypub_transformer` filter). |
| 74 |
3. Add tests under `tests/phpunit/tests/integration/`. |
| 75 |
|