mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 20:53:39 +09:00
Bugfixes, Minor Update
This commit is contained in:
+36
-2
@@ -748,6 +748,8 @@ class UM_Fields {
|
||||
|
||||
}
|
||||
|
||||
if ( !isset( $array['visibility'] ) ) $array['visibility'] = 'all';
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
@@ -769,6 +771,8 @@ class UM_Fields {
|
||||
|
||||
if ( isset( $data['in_group'] ) && $data['in_group'] != '' && $rule != 'group' ) return;
|
||||
|
||||
if ( $visibility == 'view' ) return;
|
||||
|
||||
if ( !um_can_view_field( $data ) ) return;
|
||||
if ( !um_can_edit_field( $data ) ) return;
|
||||
|
||||
@@ -784,7 +788,7 @@ class UM_Fields {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Begin by field type */
|
||||
|
||||
switch( $type ) {
|
||||
@@ -1779,7 +1783,13 @@ class UM_Fields {
|
||||
|
||||
if ( isset( $data['in_group'] ) && $data['in_group'] != '' && $rule != 'group' ) return;
|
||||
|
||||
if ( ! $this->field_value( $key, $default, $data ) ) return;
|
||||
if ( $visibility == 'edit' ) return;
|
||||
|
||||
if ( in_array( $type, array('block','shortcode','spacing','divider','group') ) ) {
|
||||
|
||||
} else {
|
||||
if ( ! $this->field_value( $key, $default, $data ) ) return;
|
||||
}
|
||||
|
||||
if ( !um_can_view_field( $data ) ) return;
|
||||
|
||||
@@ -1802,6 +1812,30 @@ class UM_Fields {
|
||||
|
||||
break;
|
||||
|
||||
/* HTML */
|
||||
case 'block':
|
||||
$output .= '<div class="um-field ' . $classes . '">
|
||||
<div class="um-field-block">'.$content.'</div>
|
||||
</div>';
|
||||
break;
|
||||
|
||||
/* Shortcode */
|
||||
case 'shortcode':
|
||||
$output .= '<div class="um-field ' . $classes . '">
|
||||
<div class="um-field-shortcode">'.do_shortcode($content).'</div>
|
||||
</div>';
|
||||
break;
|
||||
|
||||
/* Gap/Space */
|
||||
case 'spacing':
|
||||
$output .= '<div class="um-field-spacing" style="height: '.$spacing.'"></div>';
|
||||
break;
|
||||
|
||||
/* A line divider */
|
||||
case 'divider':
|
||||
$output .= '<div class="um-field-divider" style="border-bottom: '.$borderwidth.'px '.$borderstyle.' '.$bordercolor.'"></div>';
|
||||
break;
|
||||
|
||||
/* Rating */
|
||||
case 'rating':
|
||||
|
||||
|
||||
Reference in New Issue
Block a user