';
-
- if ( ! empty( $data['icon'] ) && isset( $this->field_icons ) && 'off' !== $this->field_icons && ( 'label' === $this->field_icons || true === $this->viewing ) ) {
- $output .= '
';
- }
-
if ( true === $this->viewing ) {
/**
* Filters Ultimate Member field label on the Profile form: View mode.
@@ -730,13 +723,26 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
$label = apply_filters( 'um_edit_label_all_fields', $label, $data );
}
+ $output = null;
+ $output .= '
';
+
+ if ( ! empty( $data['icon'] ) && isset( $this->field_icons ) && 'off' !== $this->field_icons && ( 'label' === $this->field_icons || true === $this->viewing ) ) {
+ $output .= '
';
+ }
+
$fields_without_metakey = UM()->builtin()->get_fields_without_metakey();
$for_attr = '';
if ( ! in_array( $data['type'], $fields_without_metakey, true ) ) {
$for_attr = ' for="' . esc_attr( $key . UM()->form()->form_suffix ) . '"';
}
- $output .= '
';
+ $output .= '
';
if ( ! empty( $data['help'] ) && false === $this->viewing && false === strpos( $key, 'confirm_user_pass' ) ) {
if ( ! UM()->mobile()->isMobile() ) {
diff --git a/includes/core/um-filters-fields.php b/includes/core/um-filters-fields.php
index 94423d43..0819aab3 100644
--- a/includes/core/um-filters-fields.php
+++ b/includes/core/um-filters-fields.php
@@ -3,24 +3,6 @@ if ( ! defined( 'ABSPATH' ) ) {
exit;
}
-/**
- * Field is required?
- *
- * @param $label
- * @param $data
- *
- * @return string
- */
-function um_edit_label_all_fields( $label, $data ) {
- $asterisk = UM()->options()->get( 'form_asterisk' );
- if ( $asterisk && ! empty( $data['required'] ) ) {
- $label .= '
*';
- }
-
- return $label;
-}
-add_filter( 'um_edit_label_all_fields', 'um_edit_label_all_fields', 10, 2 );
-
/**
* Outputs a oEmbed field
*