[gnome-web-www] fog: Randomize order of hackers up for adoption



commit 4d55af83e4e79c44dc20d0e841a5e122797684a3
Author: Alexandre Franke <alexandre franke gmail com>
Date:   Thu Jan 4 08:19:03 2018 +0100

    fog: Randomize order of hackers up for adoption
    
    Alphabetical order meant that the same person was always first and
    selected by default, which means they get picked every time the donor
    doesn’t bother changing

 theme/page-friends.php |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/theme/page-friends.php b/theme/page-friends.php
index fa5aa67..e0fd91d 100644
--- a/theme/page-friends.php
+++ b/theme/page-friends.php
@@ -80,8 +80,9 @@
                             <div class="control-group">
                                 <?php
                                     $original_query = clone $wp_query;
-                                    // Show 8 hackers in alphabetical order
-                                    query_posts(array('post_type' => 'hackers', 'posts_per_page' => 8, 
'orderby'=> 'title', 'order' => 'ASC'));
+                                    // Show 8 hackers in random order
+                                    // (to avoid the same one being default every time and have a more fair 
distribution)
+                                    query_posts(array('post_type' => 'hackers', 'posts_per_page' => 8, 
'orderby'=> 'rand', 'order' => 'ASC'));
                                     // Set variables for the checked attribute. Add it only on the first 
radio button.
                                     $checked_attr = 'checked="checked"';
                                     $is_checked = true;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]