WP_MS_Themes_List_Table::_order_callback( array $theme_a, array $theme_b )


Parameters Parameters

$theme_a

(array) (Required)

$theme_b

(array) (Required)


Top ↑

Return Return

(int)


Top ↑

Source Source

File: wp-admin/includes/class-wp-ms-themes-list-table.php

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

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.