' );
if ( ! empty( $label ) ) {
$aria_label = $label;
} elseif ( empty( $label ) AND ! empty( $placeholder ) ) {
$aria_label = $placeholder;
} else {
$aria_label = $field_id;
}
$numbers = array( rand( 16, 30 ), rand( 1, 15 ) );
$sign = rand( 0, 1 );
$label .= ' ' . implode( $sign ? ' + ' : ' - ', $numbers );
$result_hash = md5( ( $numbers[0] + ( $sign ? 1 : - 1 ) * $numbers[1] ) . NONCE_SALT );
// Always required field
$classes .= ' required';
if ( ! empty( $label ) ) {
$label .= ' = ?';
}
$field_atts = 'type="text"';
if ( ! empty( $name ) ) {
$field_atts .= ' name="' . $name . '"';
} else {
$field_atts .= ' name="' . $field_id . '"';
}
$field_atts .= ' aria-label="' . strip_tags( $aria_label ) . '"';
$field_atts .= ' placeholder="' . esc_attr( $placeholder ) . '"';
$field_atts .= ' data-required="true" aria-required="true"';
if ( ! empty( $icon ) ) {
$classes .= ' with_icon';
}
?>