The snippet below shows how to hook into the threewp_broadcast_get_user_writable_blogs action / filter to add access to a blog for a specific user.
/**
@brief Add access to a one or more blogs.
@since 2018-12-13 14:18:17
**/
function my_threewp_broadcast_get_user_writable_blogs( $action )
{
// We want to modify access only for a specific user.
if ( $action->user_id != 1 )
return;
// And we want to add access to these blogs.
$blog_ids = [ 51, 197 ];
foreach( $blog_ids as $blog_id )
$action->add_access( $blog_id );
}
// Broadcast fills the blog list at prio 100, so use a higher number.
add_action( 'threewp_broadcast_get_user_writable_blogs', 'my_threewp_broadcast_get_user_writable_blogs', 200 );