Filters each multiple meta element

This commit is contained in:
Rodrigo Guimarães 2020-12-30 18:20:33 -03:00
parent 74d86f8e8b
commit 3a3fa8b11f
1 changed files with 5 additions and 1 deletions

View File

@ -382,7 +382,11 @@ class REST_Item_Metadata_Controller extends REST_Controller {
}
if (is_array($filtered_value)) {
// process each element
$filtered_arr = array_map(function($v) {
return $this->filter_value($v);
}, $filtered_value);
$filtered_value = $filtered_arr;
} else {
$filtered_value = $this->filter_value($filtered_value);
}