Callback to sort plugins by a given column.
Parameters
- mixed> $plugin_b Second plugin data array to compare.
Source
public function _order_callback( $plugin_a, $plugin_b ) {
global $orderby, $order;
$a = $plugin_a[ $orderby ];
$b = $plugin_b[ $orderby ];
if ( $a === $b ) {
return 0;
}
if ( 'DESC' === $order ) {
return strcasecmp( $b, $a );
} else {
return strcasecmp( $a, $b );
}
}
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.