Automattic / Automattic/wordpress-activitypub

Feature Request: Introduce flexible ap_post extensions using capabilities

Open
#3,466 5 comments 0 reactions 0 assignees View on GitHub
Enhancement
Dominant language
PHP
Stars
579
Forks
92
Avg merge
13h 5m
Merged PRs (30d)
85

Description

### What

Use a capability based system aka, register all necessary stuff which is regitered for the ap_post post-type for others.

e.g.

```php
if ( \post_type_supports( 'activitypub-remote-post' ) {
...
}
```

### Why

Remote objects that are cached might be more nuanced that a `Note`. E.g. a Event or a Poll might want to use a dedicated post type.

The [Polls For ActivityPub plugin](https://codeberg.org/linos/wordpress-polls-for-activitypub) for example could register a dedicated post-type for remote polls, and use many of the existing features of the local poll post type but not all of them.

Also it could make this available to the reader and allow voting on incomming polls.

### How

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing where the ap_post post type is registered and where its existing features are applied. Compare that flow with WordPress capability checks such as post_type_supports(), then define the registration and inheritance behavior needed for dedicated remote post types such as polls or events. Done means remote post types can opt into the appropriate existing features without assuming every remote object is a Note.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.