@pfefferle Are there any documentation on how WordPress plugins etc. could control how content is generated in context of ActivityPub compared the ordinary webpage?
For example https://wordpress.org/plugins/geolocation/ add "Posted from …" and maybe adds a map. This might not be that useful in the activtypub post, especially when the `location` json thing is added.
@aslakr when you use the template shortcodes, you can add an attribute to the content shortcode to disable filters. this way, content that was added by third party plugins through filters, will be ignored.
if plugins want to check if it is an ActivityPub request, they can use: `is_activitypub_request()`
Kommentarer
4 kommentarer til “Nyttårsaften på Røros”
@pfefferle Are there any documentation on how WordPress plugins etc. could control how content is generated in context of ActivityPub compared the ordinary webpage?
For example https://wordpress.org/plugins/geolocation/ add "Posted from …" and maybe adds a map. This might not be that useful in the activtypub post, especially when the `location` json thing is added.
@aslakr when you use the template shortcodes, you can add an attribute to the content shortcode to disable filters. this way, content that was added by third party plugins through filters, will be ignored.
if plugins want to check if it is an ActivityPub request, they can use: `is_activitypub_request()`
https://github.com/Automattic/wordpress-activitypub/blob/56f4ed497b3c68e5715046bbe0999db62f8c60c2/includes/functions.php#L336C10-L336C34
@pfefferle In short, `\Activitypub\is_activitypub_request()` can be used similar to `is_feed()` https://developer.wordpress.org/reference/functions/is_feed/ ?
Likerklikk