Compares the order of two themes by a specific field.
Parameters
Source
public function _order_callback( $theme_a, $theme_b ) {
global $orderby, $order;
$a = $theme_a[ $orderby ];
$b = $theme_b[ $orderby ];
return 'DESC' === $order ?
$b <=> $a :
$a <=> $b;
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.