woocommerce_wp_hidden_input( array $field )

Output a hidden input box.


Description Description


Parameters Parameters

$field

(Required)


Top ↑

Source Source

File: includes/admin/wc-meta-box-functions.php

function woocommerce_wp_hidden_input( $field ) {
	global $thepostid, $post;

	$thepostid      = empty( $thepostid ) ? $post->ID : $thepostid;
	$field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );
	$field['class'] = isset( $field['class'] ) ? $field['class'] : '';

	echo '<input type="hidden" class="' . esc_attr( $field['class'] ) . '" name="' . esc_attr( $field['id'] ) . '" id="' . esc_attr( $field['id'] ) . '" value="' . esc_attr( $field['value'] ) . '" /> ';
}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.