updated plugin ActivityPub version 5.8.0

This commit is contained in:
2025-04-29 21:19:06 +00:00
committed by Gitium
parent 19dfd317cc
commit fdfbf76539
166 changed files with 14119 additions and 7163 deletions

View File

@ -7,6 +7,8 @@
namespace Activitypub\Integration;
use Activitypub\Comment;
/**
* Jetpack integration class.
*/
@ -17,6 +19,8 @@ class Jetpack {
*/
public static function init() {
\add_filter( 'jetpack_sync_post_meta_whitelist', array( self::class, 'add_sync_meta' ) );
\add_filter( 'jetpack_json_api_comment_types', array( self::class, 'add_comment_types' ) );
\add_filter( 'jetpack_api_include_comment_types_count', array( self::class, 'add_comment_types' ) );
}
/**
@ -31,10 +35,20 @@ class Jetpack {
return $allow_list;
}
$activitypub_meta_keys = array(
'activitypub_user_id',
'activitypub_inbox',
'activitypub_actor_json',
'_activitypub_user_id',
'_activitypub_inbox',
'_activitypub_actor_json',
);
return \array_merge( $allow_list, $activitypub_meta_keys );
}
/**
* Add custom comment types to the list of comment types.
*
* @param array $comment_types Default comment types.
* @return array
*/
public static function add_comment_types( $comment_types ) {
return array_unique( \array_merge( $comment_types, Comment::get_comment_type_slugs() ) );
}
}