Little bit of cleanup...
This commit is contained in:
parent
a5c58d5162
commit
f9b8e08eef
|
@ -161,12 +161,8 @@ function woocommerce_wp_text_input( $field ) {
|
|||
|
||||
function woocommerce_wp_hidden_input( $field ) {
|
||||
global $thepostid, $post;
|
||||
|
||||
if (!$thepostid) $thepostid = $post->ID;
|
||||
if (!isset($field['placeholder'])) $field['placeholder'] = '';
|
||||
if (!isset($field['class'])) $field['class'] = 'short';
|
||||
if (!isset($field['value'])) $field['value'] = get_post_meta($thepostid, $field['id'], true);
|
||||
|
||||
echo '<input type="hidden" class="'.$field['class'].'" name="'.$field['id'].'" id="'.$field['id'].'" value="'.esc_attr( $field['value'] ).'" /> ';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue