| 1 |
<?php |
| 2 |
$class = 'wp-block-getwid-field-textarea'; |
| 3 |
$block_name = $class; |
| 4 |
if ( isset( $attributes[ 'className' ] ) ) { |
| 5 |
$class .= ' ' . $attributes[ 'className' ]; |
| 6 |
} |
| 7 |
$uid = isset( $attributes[ 'id' ] ) ? $attributes[ 'id' ] : 'message-' . uniqid(); |
| 8 |
$label = isset( $attributes[ 'label' ] ) ? $attributes[ 'label' ] : __( 'Message', 'getwid' ); |
| 9 |
?> |
| 10 |
<p class='<?php echo esc_attr( $class );?>'> |
| 11 |
<?php if ( !empty($label) ) : ?> |
| 12 |
<label |
| 13 |
for='<?php echo esc_attr( $uid ); ?>' |
| 14 |
class='<?php echo esc_attr( $block_name . '__label' );?>' |
| 15 |
><?php |
| 16 |
echo wp_kses_post( $label ); |
| 17 |
?></label> |
| 18 |
<?php endif; ?> |
| 19 |
<textarea |
| 20 |
id='<?php echo esc_attr( $uid ); ?>' rows='<?php echo esc_attr( apply_filters('getwid/blocks/contact_form/textarea_rows', 5) ); ?>' name='message'<?php |
| 21 |
if ( isset( $attributes[ 'placeholder' ] ) ) { ?> |
| 22 |
placeholder='<?php echo esc_attr( $attributes[ 'placeholder' ] ); ?>'<?php |
| 23 |
} |
| 24 |
|
| 25 |
if ( isset( $attributes[ 'required' ] ) ) { ?> |
| 26 |
required='' |
| 27 |
<?php } ?> |
| 28 |
></textarea> |
| 29 |
</p> |
| 30 |
|