WordPress.org

Making WordPress.org

Changeset 6005


Ignore:
Timestamp:
10/07/2017 11:07:55 AM (4 years ago)
Author:
ocean90
Message:

Translate: Use the special sort filter only for logged in users and the waiting/directory projects.

Also sort projects on the WordPress project in reverse chronological order.

Fixes #3020.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php

    r5865 r6005  
    737737        switch ( $filter_name ) {
    738738            default:
     739                if ( ! is_user_logged_in() || ! in_array( $project->slug, array( 'waiting', 'wp-themes', 'wp-plugins' ) ) ) {
     740                    if ( 'wp' === $project->slug ) {
     741                        $filter_order_by = 'stats.untranslated > 0 DESC, stats.untranslated DESC, tp.name DESC';
     742                    } else {
     743                        $filter_order_by = 'stats.untranslated > 0 DESC, stats.untranslated DESC, tp.name ASC';
     744                    }
     745                    break;
     746                }
    739747            case 'special':
    740748                // Float favorites to the start, but only if they have untranslated strings
Note: See TracChangeset for help on using the changeset viewer.