admin_data->general_setting->default_value ) ? $this->admin_data->general_setting->default_value : ''; $placeholder = UR()->plugin_url() . '/assets/images/UR-placeholder.png'; $image_class = ''; if ( isset( $this->admin_data->general_setting->image_choice ) && ur_string_to_bool( $this->admin_data->general_setting->image_choice ) ) { $image_class = 'user-registration-image-options'; $default_options = isset( $this->field_defaults['default_image_options'] ) ? $this->field_defaults['default_image_options'] : array(); $options = isset( $this->admin_data->general_setting->image_options ) ? $this->admin_data->general_setting->image_options : $default_options; $options = array_map( function ( $option ) { if ( is_array( $option ) ) { $option['label'] = trim( $option['label'] ); } elseif ( is_object( $option ) ) { $option->label = isset( $option->label ) ? trim( $option->label ) : $option->label; } return $option; }, $options ); } else { $default_options = isset( $this->field_defaults['default_options'] ) ? $this->field_defaults['default_options'] : array(); $options = isset( $this->admin_data->general_setting->options ) ? $this->admin_data->general_setting->options : $default_options; $options = array_map( 'trim', $options ); } ?>
"; } if ( isset( $this->admin_data->general_setting->image_choice ) && ur_string_to_bool( $this->admin_data->general_setting->image_choice ) ) { foreach ( $options as $option ) { $checked = ''; $checked_class = ''; $label = is_array( $option ) ? $option['label'] : $option->label; $image = is_array( $option ) ? $option['image'] : $option->image; if ( ! empty( $option ) ) { $checked = checked( $label, $default_value, false ); $checked_class = ( $label === $default_value ) ? 'ur-image-choice-checked' : ''; } echo "'; } } else { foreach ( $options as $option ) { $checked = ''; if ( ! empty( $option ) ) { $checked = checked( $option, $default_value, false ); } echo "'; } } ?>