Skip to content

activitypub_user_can_activitypub

github-actions[bot] edited this page Aug 18, 2025 · 8 revisions

Allow plugins to enable/disable users for ActivityPub.

Auto-generated Example

/**
 * Allow plugins to enable/disable users for ActivityPub.
 *
 * @param Activitypub\boolean $enabled 
 * @param int                 $user_id 
 * @return Activitypub\boolean The filtered value.
 */
function my_activitypub_user_can_activitypub_callback( Activitypub\boolean $enabled, int $user_id ) {
    // Your code here.
    return $enabled;
}
add_filter( 'activitypub_user_can_activitypub', 'my_activitypub_user_can_activitypub_callback', 10, 2 );

Parameters

  • Activitypub\boolean $enabled True if the user is enabled, false otherwise.
  • int $user_id The user ID.

Files

apply_filters( 'activitypub_user_can_activitypub', $enabled, $user_id )

← All Hooks

Users

Developers

Clone this wiki locally