PluginProbe
Polylang / 2.8
Polylang v2.8
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | settings/table-settings.php +11 -0 2.72.8 View file →
@@ -1,5 +1,8 @@
1 1 <?php
2 +/**
3 + * @package Polylang
4 + */
2 5
3 6 if ( ! class_exists( 'WP_List_Table' ) ) {
4 7 require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; // since WP 3.1
5 8 }
@@ -164,8 +167,16 @@
164 167 * @param array $items
165 168 */
166 169 public function prepare_items( $items = array() ) {
167 170 $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns(), $this->get_primary_column_name() );
171 +
172 + // Sort rows, lowest priority on top.
173 + usort(
174 + $items,
175 + function( $a, $b ) {
176 + return $a->priority > $b->priority ? 1 : -1;
177 + }
178 + );
168 179 $this->items = $items;
169 180 }
170 181
171 182 /**