Merge pull request #3840 from pelmered/master

Allows to pass in cols and rows as custom attributes for textareas in woocommerce_form_field()
This commit is contained in:
Mike Jolley 2013-09-26 02:32:34 -07:00
commit 5da34d5a92
1 changed files with 1 additions and 1 deletions

View File

@ -1712,7 +1712,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;