WC_REST_Terms_Controller::compare_terms( stdClass $left, stdClass $right )

Comparison function for sorting terms by a column.


Description Description

Uses $this->sort_column to determine field to sort by.


Parameters Parameters

$left

(Required) Term object.

$right

(Required) Term object.


Top ↑

Return Return

(int) <0 if left is higher "priority" than right, 0 if equal, >0 if right is higher "priority" than left.


Top ↑

Source Source

File: includes/rest-api/Controllers/Version3/class-wc-rest-terms-controller.php


			

Top ↑

User Contributed Notes User Contributed Notes

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