aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/metadata.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/metadata.php')
-rw-r--r--engine/lib/metadata.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 8a62929d5..c3aebb111 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -281,13 +281,15 @@ function elgg_get_metadata(array $options = array()) {
* Deletes metadata based on $options.
*
* @warning Unlike elgg_get_metadata() this will not accept an empty options array!
+ * This requires some constraints: metadata_owner_guid(s),
+ * metadata_name(s), metadata_value(s), or limit must be set.
*
* @param array $options An options array. {@See elgg_get_metadata()}
* @return mixed
* @since 1.8
*/
function elgg_delete_metadata(array $options) {
- if (!$options || !is_array($options)) {
+ if (!elgg_is_valid_options_for_batch_operation($options, 'metadata')) {
return false;
}
@@ -305,7 +307,7 @@ function elgg_delete_metadata(array $options) {
* @since 1.8
*/
function elgg_disable_metadata(array $options) {
- if (!$options || !is_array($options)) {
+ if (!elgg_is_valid_options_for_batch_operation($options, 'metadata')) {
return false;
}