} else {
$entity_guid = (int)$entity_guid;
}
-
+
$entity_type = sanitise_string($entity_type);
-
+
if ($entity_subtype) {
if (!$entity_subtype = get_subtype_id($entity_type, $entity_subtype)) {
// requesting a non-existing subtype: return false
return FALSE;
}
}
-
+
if ($name) {
$name = get_metastring_id($name);
$options = array_merge($defaults, $options);
+ $singulars = array('annotation_name', 'annotation_value', 'annotation_name_value_pair', 'annotation_owner_guid');
+ $options = elgg_normalise_plural_options_array($options, $singulars);
+
if (!$options = elgg_entities_get_metastrings_options('annotation', $options)) {
return FALSE;
}
$entity_type = sanitise_string($entity_type);
$timeupper = (int)$timeupper;
$timelower = (int)$timelower;
-
+
if ($entity_subtype) {
if (!$entity_subtype = get_subtype_id($entity_type, $entity_subtype)) {
// requesting a non-existing subtype: return false
return FALSE;
}
}
-
+
if ($name != '' AND !$name = get_metastring_id($name)) {
return 0;
}
$sum = sanitise_string($sum);
$entity_type = sanitise_string($entity_type);
-
+
if ($entity_subtype) {
if (!$entity_subtype = get_subtype_id($entity_type, $entity_subtype)) {
// requesting a non-existing subtype: return false
return FALSE;
}
}
-
+
$name = get_metastring_id($name);
$limit = (int) $limit;
$offset = (int) $offset;
$options = array_merge($defaults, $options);
+ $singulars = array('metadata_name', 'metadata_value', 'metadata_name_value_pair', 'metadata_owner_guid');
+ $options = elgg_normalise_plural_options_array($options, $singulars);
+
if (!$options = elgg_entities_get_metastrings_options('metadata', $options)) {
return FALSE;
}