public static function sort_terms( $terms, $orderby = 'term_id', $order = 'ASC' ) {

		if ( function_exists( 'wp_list_sort' ) ) {
			$terms = wp_list_sort( $terms, 'term_id', 'ASC' );
		} else {

			if ( 'name' === $orderby ) {
				usort( $terms, '_usort_terms_by_name' );
			} else {
				usort( $terms, '_usort_terms_by_ID' );
			}

			if ( 'DESC' === $order ) {
				$terms = array_reverse( $terms );
			}
		}

		return $terms;
	}