- 
                Notifications
    
You must be signed in to change notification settings  - Fork 83
 
activitypub_activity_object_array
        github-actions[bot] edited this page Oct 1, 2025 
        ·
        12 revisions
      
    Filter the array of the ActivityPub object.
/**
 * Filter the array of the ActivityPub object.
 *
 * @param array                      $array 
 * @param string                     $class 
 * @param string                     $id 
 * @param Activitypub\Generic_Object $object 
 * @return array The filtered array of the ActivityPub object.
 */
function my_activitypub_activity_object_array_callback( array $array, string $class, string $id, Activitypub\Generic_Object $object ) {
    // Your code here.
    return $array;
}
add_filter( 'activitypub_activity_object_array', 'my_activitypub_activity_object_array_callback', 10, 4 );- 
array$arrayThe array of the ActivityPub object. - 
string$classThe class of the ActivityPub object. - 
string$idThe ID of the ActivityPub object. - 
Activitypub\Generic_Object$objectThe ActivityPub object. 
array The filtered array of the ActivityPub object.
\apply_filters( 'activitypub_activity_object_array', $array, $class, $this->id, $this )Follow @[email protected] for updates and news.