Landing page shuffles all people who have taken the pledge and uploaded a picture.
This commit is contained in:
@@ -11,11 +11,11 @@ if (isset($options['candidates-files'])) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$candidate_data = parse_pledge_data(explode(" ", $candidates_files));
|
||||
$candidate_data = parse_pledge_data(explode(" ", $candidates_files), null);
|
||||
|
||||
/* Select people who have taken the pledge */
|
||||
/* Select people who have taken the pledge (and have an image) */
|
||||
$pledgeCandidates = array_filter($candidate_data, function ($candidate) {
|
||||
return $candidate['Pledge'] === 'y';
|
||||
return $candidate['Pledge'] === 'y' && $candidate['Picture'] !== "";
|
||||
});
|
||||
|
||||
/* Select 9 random candidates */
|
||||
|
||||
Reference in New Issue
Block a user