- fixed displaying by the hook issues with fields without metakeys;

This commit is contained in:
nikitasinelnikov
2020-12-14 14:39:47 +02:00
parent 0ee8878f90
commit 1adc51aa02
2 changed files with 38 additions and 8 deletions
+4 -1
View File
@@ -385,6 +385,8 @@ if ( ! class_exists( 'um\core\Profile' ) ) {
function show_meta( $array ) {
$output = '';
$fields_without_metakey = UM()->builtin()->get_fields_without_metakey();
if ( ! empty( $array ) ) {
foreach ( $array as $key ) {
if ( $key ) {
@@ -396,8 +398,9 @@ if ( ! class_exists( 'um\core\Profile' ) ) {
$data['in_profile_meta'] = true;
$value = um_filtered_value( $key, $data );
if ( ! $value )
if ( ! $value && ! in_array( $data['type'], $fields_without_metakey ) ) {
continue;
}
if ( ! UM()->options()->get( 'profile_show_metaicon' ) ) {
$icon = '';