function announcements_feed_sort_featured
Sort the elements of announcements_feed by values in comparison function.
1 string reference to 'announcements_feed_sort_featured'
- announcements_feed_fetch in modules/
announcements_feed/ announcements_feed.inc - Fetches the feed either from a local cache or fresh remotely.
File
-
modules/
announcements_feed/ announcements_feed.inc, line 137
Code
function announcements_feed_sort_featured($a, $b) {
$a_value = (int) $a['_drupalorg']['featured'];
$b_value = (int) $b['_drupalorg']['featured'];
if ($a_value == $b_value) {
return 0;
}
return $a_value < $b_value ? -1 : 1;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.