WordPress.org

Make WordPress Core

Changeset 33010


Ignore:
Timestamp:
06/30/2015 10:30:19 PM (4 years ago)
Author:
ocean90
Message:

Plugins list table: Sort plugins by Name by default so translated plugin names get correctly sorted.

props swissspidy.
fixes #32735.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r32724 r33010  
    200200        $total_this_page = $totals[ $status ];
    201201
    202         if ( $orderby ) {
     202        if ( ! $orderby ) {
     203            $orderby = 'Name';
     204        } else {
    203205            $orderby = ucfirst( $orderby );
    204             $order = strtoupper( $order );
    205 
    206             uasort( $this->items, array( $this, '_order_callback' ) );
    207         }
     206        }
     207
     208        $order = strtoupper( $order );
     209
     210        uasort( $this->items, array( $this, '_order_callback' ) );
    208211
    209212        $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', $screen->id . '_per_page' ), 999 );
Note: See TracChangeset for help on using the changeset viewer.