integrations

ActivityPub Integrations

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "integrations" with this command: npx skills add automattic/wordpress-activitypub/automattic-wordpress-activitypub-integrations

ActivityPub Integrations

This skill provides guidance on integrating the ActivityPub plugin with other WordPress plugins.

Quick Reference

Integration Location

All integrations live in the integration/ directory.

File naming: class-{plugin-name}.php (following PHP conventions in AGENTS.md)

Available Integrations

  • BuddyPress

  • bbPress

  • WooCommerce

  • Jetpack

  • The Events Calendar

  • WP User Avatars

  • And 13+ more

For complete directory structure and naming conventions, see docs/php-class-structure.md .

Creating New Integration

Basic Integration Class

<?php namespace Activitypub\Integration;

class Plugin_Name { public static function init() { \add_filter( 'activitypub_transformer', array( self::class, 'custom_transformer' ), 10, 2 ); \add_filter( 'activitypub_post_types', array( self::class, 'add_post_types' ) ); }

public static function custom_transformer( $transformer, $object ) {
    // Return custom transformer if needed.
    return $transformer;
}

public static function add_post_types( $post_types ) {
    // Add plugin's post types.
    $post_types[] = 'plugin_post_type';
    return $post_types;
}

}

Integration Patterns

Adding Post Type Support

public static function add_post_types( $post_types ) { $post_types[] = 'event'; $post_types[] = 'product'; return $post_types; }

Custom Transformers

public static function transformer( $transformer, $object ) { if ( 'custom_type' === get_post_type( $object ) ) { require_once DIR . '/transformer/class-custom.php'; return new Transformer\Custom( $object ); } return $transformer; }

Modifying Activities

\add_filter( 'activitypub_activity_object', function( $object, $post ) { if ( 'product' === get_post_type( $post ) ) { $object['type'] = 'Product'; $object['price'] = get_post_meta( $post->ID, 'price', true ); } return $object; }, 10, 2 );

Testing Integrations

Verify Integration Loading

// Check if integration is active. if ( class_exists( '\Activitypub\Integration\Plugin_Name' ) ) { // Integration loaded. }

Test Compatibility

  • Install target plugin

  • Activate ActivityPub

  • Check for conflicts

  • Verify custom post types work

  • Test federation of plugin content

Common Integration Issues

Plugin Detection

// Multiple detection methods. if ( defined( 'PLUGIN_VERSION' ) ) { } if ( function_exists( 'plugin_function' ) ) { } if ( class_exists( 'Plugin_Class' ) ) { }

Hook Priority

// Use appropriate priority. add_filter( 'hook', 'callback', 20 ); // After plugin's filter.

Namespace Conflicts

// Use fully qualified names. $object = new \Plugin\Namespace\Class();

Existing Integrations

BuddyPress

  • Adds BuddyPress activity support

  • Custom member transformers

  • Group activity federation

WooCommerce

  • Product post type support

  • Order activity notifications

  • Customer review federation

bbPress

  • Forum topic federation

  • Reply activities

  • User forum profiles

Best Practices

  • Always check if plugin is active before adding hooks

  • Use late priority for filters to override plugin defaults

  • Test with multiple plugin versions

  • Document compatibility requirements

  • Handle plugin deactivation gracefully

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

federation

No summary provided by upstream source.

Repository SourceNeeds Review
General

test

No summary provided by upstream source.

Repository SourceNeeds Review
General

pr

No summary provided by upstream source.

Repository SourceNeeds Review