aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggMetadata.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggMetadata.php')
-rw-r--r--engine/classes/ElggMetadata.php24
1 files changed, 22 insertions, 2 deletions
diff --git a/engine/classes/ElggMetadata.php b/engine/classes/ElggMetadata.php
index 9c13e936e..f85bac6ce 100644
--- a/engine/classes/ElggMetadata.php
+++ b/engine/classes/ElggMetadata.php
@@ -75,12 +75,32 @@ class ElggMetadata extends ElggExtender {
}
/**
- * Delete a given metadata.
+ * Delete the metadata
*
* @return bool
*/
function delete() {
- return delete_metadata($this->id);
+ return elgg_delete_metastring_based_object_by_id($this->id, 'metadata');
+ }
+
+ /**
+ * Disable the metadata
+ *
+ * @return bool
+ * @since 1.8
+ */
+ function disable() {
+ return elgg_set_metastring_based_object_enabled_by_id($this->id, 'no', 'metadata');
+ }
+
+ /**
+ * Disable the metadata
+ *
+ * @return bool
+ * @since 1.8
+ */
+ function enable() {
+ return elgg_set_metastring_based_object_enabled_by_id($this->id, 'yes', 'metadata');
}
/**