Allows to pass in cols and rows as custom attributes for textareas in woocommerce_form_field()

This commit is contained in:
Peter Elmered 2013-09-25 22:45:45 +02:00
parent 4947af4ca0
commit c676c15990
1 changed files with 1 additions and 1 deletions

View File

@ -1695,7 +1695,7 @@ if ( ! function_exists( 'woocommerce_form_field' ) ) {
if ( $args['label'] )
$field .= '<label for="' . esc_attr( $key ) . '" class="' . implode( ' ', $args['label_class'] ) .'">' . $args['label']. $required . '</label>';
$field .= '<textarea name="' . esc_attr( $key ) . '" class="input-text" id="' . esc_attr( $key ) . '" placeholder="' . $args['placeholder'] . '" cols="5" rows="2" ' . implode( ' ', $custom_attributes ) . '>'. esc_textarea( $value ) .'</textarea>
$field .= '<textarea name="' . esc_attr( $key ) . '" class="input-text" id="' . esc_attr( $key ) . '" placeholder="' . $args['placeholder'] . '"' . ( empty( $args['custom_attributes']['rows'] ) ? ' rows="2"' : '' ) . ( empty( $args['custom_attributes']['cols'] ) ? ' cols="5"' : '' ) . implode( ' ', $custom_attributes ) . '>'. esc_textarea( $value ) .'</textarea>
</p>' . $after;
break;