summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 86fb23ae9..6018eb549 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -5788,6 +5788,19 @@ function drupal_sort_weight($a, $b) {
}
/**
+ * Array sorting callback; sorts elements by 'title' key.
+ */
+function drupal_sort_title($a, $b) {
+ if (!isset($b['title'])) {
+ return -1;
+ }
+ if (!isset($a['title'])) {
+ return 1;
+ }
+ return strcasecmp($a['title'], $b['title']);
+}
+
+/**
* Check if the key is a property.
*/
function element_property($key) {