Skip to content

activitypub_pre_get_by_id

github-actions[bot] edited this page Mar 31, 2026 · 1 revision

Filter the actor before resolving by ID.

Allows third-party plugins to register custom virtual actors resolved by ID, mirroring the activitypub_pre_get_by_username filter for username lookups.

Auto-generated Example

/**
 * Filter the actor before resolving by ID.
 * 
 * Allows third-party plugins to register custom virtual actors
 * resolved by ID, mirroring the `activitypub_pre_get_by_username`
 * filter for username lookups.
 *
 * @param null $pre 
 * @param int  $user_id 
 * @return null The filtered value.
 */
function my_activitypub_pre_get_by_id_callback( null $pre, int $user_id ) {
    // Your code here.
    return $pre;
}
add_filter( 'activitypub_pre_get_by_id', 'my_activitypub_pre_get_by_id_callback', 10, 2 );

Parameters

  • null $pre The pre-existing value.
  • int $user_id The user ID.

Files

\apply_filters( 'activitypub_pre_get_by_id', null, $user_id )

← All Hooks

Users

Developers

Clone this wiki locally