Fixes error where passing exclude_something to the get_metadata_as_html() function was inserting a div without closing it.

This commit is contained in:
mateuswetah 2020-06-09 17:56:49 -03:00
parent fdd93ec9c4
commit fc10df8ace
1 changed files with 3 additions and 3 deletions

View File

@ -622,9 +622,6 @@ class Item extends Entity {
$fto = $item_meta->get_metadatum()->get_metadata_type_object();
$before = str_replace('$type', $fto->get_slug(), $args['before']);
$return .= $before;
if ( $fto->get_core() ) {
if ( $args['exclude_core'] ) {
continue;
@ -635,6 +632,9 @@ class Item extends Entity {
}
}
$before = str_replace('$type', $fto->get_slug(), $args['before']);
$return .= $before;
if ($item_meta->has_value() || !$args['hide_empty']) {
$return .= $args['before_title'] . $item_meta->get_metadatum()->get_name() . $args['after_title'];
$return .= $args['before_value'] . $item_meta->get_value_as_html() . $args['after_value'];