clear_annotations function fails
|Reported by:||kevinjardine||Owned by:|
clear_annotations is failing to actually delete all annotations when you do not specify a name.
This is because of the line:
$name = get_metastring_id($name);
which maps even empty strings to a metadata id, assuming that there is an empty string in the metastrings table, which is usually the case.
The result is that the function attempts to delete annotations which have no name, instead of deleting all annotations as intended.