- 
                Notifications
    
You must be signed in to change notification settings  - Fork 83
 
activitypub_add_user_block
        github-actions[bot] edited this page Oct 1, 2025 
        ·
        12 revisions
      
    Fired when a domain or keyword is blocked.
/**
 * Fired when a domain or keyword is blocked.
 *
 * @param string $value 
 * @param string $type 
 * @param int    $user_id 
 * @return string The filtered value.
 */
function my_activitypub_add_user_block_callback( string $value, string $type, int $user_id ) {
    // Your code here.
    return $value;
}
add_filter( 'activitypub_add_user_block', 'my_activitypub_add_user_block_callback', 10, 3 );- 
string$valueThe blocked domain or keyword. - 
string$typeThe block type (actor, domain, keyword). - 
int$user_idThe user ID. 
\do_action( 'activitypub_add_user_block', $value, Moderation::TYPE_ACTOR, $user_id )\do_action( 'activitypub_add_user_block', $value, $type, $user_id )Follow @[email protected] for updates and news.