WordPress at Your Fingertips
function is not described

WP_Plugins_List_Table::_order_callback() public WP 1.0

{} It's a method of the class: WP_Plugins_List_Table{}

No Hooks.

Return

Int.

Usage

$WP_Plugins_List_Table = new WP_Plugins_List_Table();
$WP_Plugins_List_Table->_order_callback( $plugin_a, $plugin_b );
$plugin_a(array) (required)
-
$plugin_b(array) (required)
-

Notes

  • Global. String. $orderby
  • Global. String. $order

Code of WP_Plugins_List_Table::_order_callback() WP 5.8.2

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 );
	}
}