Parameters
$theme_a
arrayrequired$theme_b
arrayrequired
Source
public function _order_callback( $theme_a, $theme_b ) {
global $orderby, $order;
$a = $theme_a[ $orderby ];
$b = $theme_b[ $orderby ];
if ( $a === $b ) {
return 0;
}
if ( 'DESC' === $order ) {
return ( $a < $b ) ? 1 : -1;
} else {
return ( $a < $b ) ? -1 : 1;
}
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.