Merge pull request #757 from patrickgarman/master

Adding woocommerce_wp_hidden_input()
This commit is contained in:
Mike Jolley 2012-03-04 17:07:15 -08:00
commit 2b72cd12d5
2 changed files with 339 additions and 1 deletions

View File

@ -159,6 +159,13 @@ function woocommerce_wp_text_input( $field ) {
echo '</p>'; echo '</p>';
} }
function woocommerce_wp_hidden_input( $field ) {
global $thepostid, $post;
if (!$thepostid) $thepostid = $post->ID;
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'] ).'" /> ';
}
function woocommerce_wp_textarea_input( $field ) { function woocommerce_wp_textarea_input( $field ) {
global $thepostid, $post; global $thepostid, $post;

File diff suppressed because one or more lines are too long