function _mostpopular_service_sort in Drupal Most Popular 7
Same name and namespace in other branches
- 6 classes/services.php \_mostpopular_service_sort()
A custom sort function for the most popular services, that orders them by weight.
1 string reference to '_mostpopular_service_sort'
- MostPopularService::fetchAvailable in classes/
services.php - Fetches all of the available services from the enabled modules that define them.
File
- classes/
services.php, line 284 - Defines a wrapper for the mostpopular_services table.
Code
function _mostpopular_service_sort($s1, $s2) {
$w1 = (int) $s1->weight;
$w2 = (int) $s2->weight;
return $w1 - $w2;
}