$friends_ids = UM()->Activity_API()->api()->friends_ids(); $friends_admin = array_merge($friends_ids, $admin_ids); if ( $friends_ids ) { $args['meta_query'][] = array( 'key' => '_user_id', 'value' => $friends_admin, 'compare' => 'IN' ); }