mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed placeholder used 'strip_tags()' for input select
This commit is contained in:
@@ -1512,6 +1512,29 @@ if ( ! class_exists( 'Fields' ) ) {
|
||||
if (isset( $data ) && is_array( $data )) {
|
||||
$data = $this->get_field( $key );
|
||||
if (is_array( $data )) {
|
||||
/**
|
||||
* @var string $in_row
|
||||
* @var boolean $in_sub_row
|
||||
* @var boolean $in_column
|
||||
* @var string $type
|
||||
* @var string $metakey
|
||||
* @var int $position
|
||||
* @var string $title
|
||||
* @var string $help
|
||||
* @var array $options
|
||||
* @var string $visibility
|
||||
* @var string $label
|
||||
* @var string $placeholder
|
||||
* @var boolean $public
|
||||
* @var boolean $editable
|
||||
* @var string $icon
|
||||
* @var boolean $in_group
|
||||
* @var string $classes
|
||||
* @var boolean $required
|
||||
* @var string $validate
|
||||
* @var string $default
|
||||
* @var string $conditional
|
||||
*/
|
||||
extract( $data );
|
||||
}
|
||||
}
|
||||
@@ -2377,6 +2400,10 @@ if ( ! class_exists( 'Fields' ) ) {
|
||||
|
||||
}
|
||||
|
||||
if( ! empty( $placeholder ) ) {
|
||||
$placeholder = strip_tags( $placeholder );
|
||||
}
|
||||
|
||||
$output .= '<select ' . $disabled . ' ' . $select_original_option_value . ' ' . $disabled_by_parent_option . ' name="' . $form_key . '" id="' . $form_key . '" data-validate="' . $validate . '" data-key="' . $key . '" class="' . $this->get_class( $key, $data, $class ) . '" style="width: 100%" data-placeholder="' . $placeholder . '" ' . $atts_ajax . '>';
|
||||
|
||||
/**
|
||||
|
||||
@@ -520,7 +520,7 @@ add_filter( 'um_profile_field_filter_hook__','um_profile_field_filter_xss_valida
|
||||
* @uses hook filters: um_edit_url_field_value
|
||||
*/
|
||||
function um_edit_url_field_value( $value, $key ) {
|
||||
$value = esc_attr($value);
|
||||
$value = esc_attr( $value );
|
||||
return $value;
|
||||
}
|
||||
add_filter( 'um_edit_url_field_value', 'um_edit_url_field_value', 10, 2 );
|
||||
@@ -439,6 +439,11 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
$atts['options'] = UM()->fields()->get_options_from_callback( $atts, $atts['type'] );
|
||||
}
|
||||
|
||||
if( isset( $atts['label'] ) ){
|
||||
$atts['label'] = strip_tags( $atts['label'] );
|
||||
}
|
||||
|
||||
|
||||
return $atts;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user