diff --git src/wp-admin/includes/class-wp-links-list-table.php src/wp-admin/includes/class-wp-links-list-table.php
index 222d6df..c8a2795 100644
|
|
class WP_Links_List_Table extends WP_List_Table { |
143 | 143 | 'name' => 'name', |
144 | 144 | 'url' => 'url', |
145 | 145 | 'visible' => 'visible', |
146 | | 'rating' => 'rating' |
| 146 | 'rating' => array( |
| 147 | 'query_var' => 'rating', |
| 148 | 'order' => 'DESC', |
| 149 | ), |
147 | 150 | ); |
148 | 151 | } |
149 | 152 | |
diff --git src/wp-admin/includes/class-wp-list-table.php src/wp-admin/includes/class-wp-list-table.php
index bf642ac..fe3acc4 100644
|
|
class WP_List_Table { |
1010 | 1010 | continue; |
1011 | 1011 | |
1012 | 1012 | $data = (array) $data; |
| 1013 | |
| 1014 | if ( isset( $data['query_var'] ) ) { |
| 1015 | if ( !isset( $data['order'] ) ) |
| 1016 | $data['order'] = 'ASC'; |
| 1017 | |
| 1018 | $data = array( $data['query_var'], ( $data['order'] == 'DESC' ) ); |
| 1019 | } |
| 1020 | |
1013 | 1021 | if ( !isset( $data[1] ) ) |
1014 | 1022 | $data[1] = false; |
1015 | 1023 | |
diff --git src/wp-admin/includes/class-wp-media-list-table.php src/wp-admin/includes/class-wp-media-list-table.php
index 233ca6e..e2ed2bb 100644
|
|
class WP_Media_List_Table extends WP_List_Table { |
329 | 329 | */ |
330 | 330 | protected function get_sortable_columns() { |
331 | 331 | return array( |
332 | | 'title' => 'title', |
333 | | 'author' => 'author', |
334 | | 'parent' => 'parent', |
335 | | 'comments' => 'comment_count', |
336 | | 'date' => array( 'date', true ), |
| 332 | 'title' => 'title', |
| 333 | 'author' => 'author', |
| 334 | 'parent' => 'parent', |
| 335 | 'comments' => array( |
| 336 | 'query_var' => 'comment_count', |
| 337 | 'order' => 'DESC', |
| 338 | ), |
| 339 | 'date' => array( |
| 340 | 'query_var' => 'date', |
| 341 | 'order' => 'DESC', |
| 342 | ), |
337 | 343 | ); |
338 | 344 | } |
339 | 345 | |
diff --git src/wp-admin/includes/class-wp-ms-users-list-table.php src/wp-admin/includes/class-wp-ms-users-list-table.php
index da00131..2db651b 100644
|
|
class WP_MS_Users_List_Table extends WP_List_Table { |
188 | 188 | */ |
189 | 189 | protected function get_sortable_columns() { |
190 | 190 | return array( |
191 | | 'username' => 'login', |
192 | | 'name' => 'name', |
193 | | 'email' => 'email', |
194 | | 'registered' => 'id', |
| 191 | 'username' => 'login', |
| 192 | 'name' => 'name', |
| 193 | 'email' => 'email', |
| 194 | 'registered' => array( |
| 195 | 'query_var' => 'registered', |
| 196 | 'order' => 'DESC', |
| 197 | ), |
195 | 198 | ); |
196 | 199 | } |
197 | 200 | |
diff --git src/wp-admin/includes/class-wp-posts-list-table.php src/wp-admin/includes/class-wp-posts-list-table.php
index 506dded..7388491 100644
|
|
class WP_Posts_List_Table extends WP_List_Table { |
611 | 611 | */ |
612 | 612 | protected function get_sortable_columns() { |
613 | 613 | return array( |
614 | | 'title' => 'title', |
615 | | 'parent' => 'parent', |
616 | | 'comments' => 'comment_count', |
617 | | 'date' => array( 'date', true ) |
| 614 | 'title' => 'title', |
| 615 | 'parent' => 'parent', |
| 616 | 'comments' => array( |
| 617 | 'query_var' => 'comment_count', |
| 618 | 'order' => 'DESC', |
| 619 | ), |
| 620 | 'date' => array( |
| 621 | 'query_var' => 'date', |
| 622 | 'order' => 'DESC', |
| 623 | ), |
618 | 624 | ); |
619 | 625 | } |
620 | 626 | |
diff --git src/wp-admin/includes/class-wp-terms-list-table.php src/wp-admin/includes/class-wp-terms-list-table.php
index 7d59624..2410dcc 100644
|
|
class WP_Terms_List_Table extends WP_List_Table { |
197 | 197 | */ |
198 | 198 | protected function get_sortable_columns() { |
199 | 199 | return array( |
200 | | 'name' => 'name', |
201 | | 'description' => 'description', |
202 | | 'slug' => 'slug', |
203 | | 'posts' => 'count', |
204 | | 'links' => 'count' |
| 200 | 'name' => 'name', |
| 201 | 'description' => 'description', |
| 202 | 'slug' => 'slug', |
| 203 | 'posts' => array( |
| 204 | 'query_var' => 'count', |
| 205 | 'order' => 'DESC', |
| 206 | ), |
| 207 | 'links' => array( |
| 208 | 'query_var' => 'count', |
| 209 | 'order' => 'DESC', |
| 210 | ), |
205 | 211 | ); |
206 | 212 | } |
207 | 213 | |