| 1 |
<?php |
| 2 |
namespace Activitypub\Integration; |
| 3 |
|
| 4 |
class Jetpack { |
| 5 |
|
| 6 |
public static function init() { |
| 7 |
\add_filter( 'jetpack_sync_post_meta_whitelist', array( self::class, 'add_sync_meta' ) ); |
| 8 |
} |
| 9 |
|
| 10 |
public static function add_sync_meta( $whitelist ) { |
| 11 |
if ( ! is_array( $whitelist ) ) { |
| 12 |
return $whitelist; |
| 13 |
} |
| 14 |
$activitypub_meta_keys = [ |
| 15 |
'activitypub_user_id', |
| 16 |
'activitypub_inbox', |
| 17 |
'activitypub_actor_json', |
| 18 |
]; |
| 19 |
return \array_merge( $whitelist, $activitypub_meta_keys ); |
| 20 |
} |
| 21 |
} |
| 22 |
|