- 
                Notifications
    You must be signed in to change notification settings 
- Fork 84
activitypub_json_pre
        github-actions[bot] edited this page Oct 21, 2025 
        ·
        16 revisions
      
    Fires before an ActivityPub object is generated and sent to the client.
/**
 * Fires before an ActivityPub object is generated and sent to the client.
 *
 * @param Activitypub\Activitypub\Activity\Base_Object $object 
 * @return Activitypub\Activitypub\Activity\Base_Object The filtered value.
 */
function my_activitypub_json_pre_callback( Activitypub\Activitypub\Activity\Base_Object $object ) {
    // Your code here.
    return $object;
}
add_filter( 'activitypub_json_pre', 'my_activitypub_json_pre_callback' );- 
Activitypub\Activitypub\Activity\Base_Object$objectThe ActivityPub object.
\do_action( 'activitypub_json_pre', $object )\do_action( 'activitypub_json_pre', $object )Follow @[email protected] for updates and news.