/** * Enables metadata based on $options. * * @warning Unlike elgg_get_metadata() this will not accept an empty options array! * * @warning This returns null on no ops. * * @param array $options An options array. {@See elgg_get_metadata()} * @return mixed * @since 1.8.0 */ function elgg_enable_metadata(array $options) { if (!$options || !is_array($options)) { return false; } $options['metastring_type'] = 'metadata'; return elgg_batch_metastring_based_objects($options, 'elgg_batch_enable_callback'); }
/** * Enables metadata based on $options. * * @warning Unlike elgg_get_metadata() this will not accept an empty options array! * * @warning This returns null on no ops. * * @param array $options An options array. {@See elgg_get_metadata()} * @return mixed * @since 1.8.0 */ function elgg_enable_metadata(array $options) { if (!$options || !is_array($options)) { return false; } elgg_get_metadata_cache()->invalidateByOptions('enable', $options); $options['metastring_type'] = 'metadata'; return elgg_batch_metastring_based_objects($options, 'elgg_batch_enable_callback'); }