woocommerce_form_field hook. Closes #633.
This commit is contained in:
parent
162722ba84
commit
1454a7a989
|
@ -102,6 +102,7 @@ Yes you can! Join in on our GitHub repository :) https://github.com/woothemes/wo
|
|||
* Fixed category widget hierarchy
|
||||
* Password error on checkout
|
||||
* Improved install process
|
||||
* Hookable woocommerce_form_field
|
||||
|
||||
= 1.4.2 - 09/02/2012 =
|
||||
* Uninstall fix
|
||||
|
|
|
@ -730,7 +730,7 @@ if (!function_exists('woocommerce_form_field')) {
|
|||
</p>'.$after;
|
||||
|
||||
break;
|
||||
default :
|
||||
case "text" :
|
||||
|
||||
$field = '<p class="form-row '.implode(' ', $args['class']).'" id="'.$key.'_field">
|
||||
<label for="'.$key.'" class="'.implode(' ', $args['label_class']).'">'.$args['label'].'</label>
|
||||
|
@ -738,8 +738,13 @@ if (!function_exists('woocommerce_form_field')) {
|
|||
</p>'.$after;
|
||||
|
||||
break;
|
||||
default :
|
||||
|
||||
$field = apply_filters( 'woocommerce_form_field_' . $args['type'], '', $key, $args, $value );
|
||||
|
||||
break;
|
||||
endswitch;
|
||||
|
||||
|
||||
if ($args['return']) return $field; else echo $field;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue