WordPress.org

Ideas

Amendment to 'wp-includes\user.php'

  1. Ryan Ball
    Member

    12345

    I would love to see the following code added into wp-includes\user.php, at line 446, which would allow the array returned from get_users() to be randomly ordered. This would bring it, almost, inline with get_posts() and get_pages().

    } elseif ( 'rand' == $qv['orderby'] ) {
    $orderby = 'RAND()';

    I've lost track of the number of times (usually within widgets) that clients have requested this functionality.

    Posted: 2 years ago #
  2. Ipstenu (Mika Epstein)
    Administrator

    There are plugins that can do this.

    http://wordpress.org/extend/plugins/author-avatars/

    Posted: 2 years ago #
  3. Ryan Ball
    Member

    12345

    Yes and I've written custom functions to achieve the same thing.

    http://www.cornflowerdesign.co.uk/563/selecting-randon-users/

    But, for the sake of two additional lines, you could achieve it without the need to install a third-party plugin.

    The ability order by "rand" should, ideally, be part of the core.

    Posted: 2 years ago #
  4. Mark / t31os
    Moderator

    12345

    Reasonable request, not a huge priority *must have* idea, but definitely a valid one worth consideration.

    Posted: 2 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    3 Votes
  • Status

    This idea is under consideration