wpcf7_hidden_form_tag_handler()CF7 1.0

Хуков нет.

Возвращает

null. Ничего (null).

Использование

wpcf7_hidden_form_tag_handler( $tag );
$tag (обязательный)
-

Код wpcf7_hidden_form_tag_handler() CF7 5.9.3

function wpcf7_hidden_form_tag_handler( $tag ) {
	if ( empty( $tag->name ) ) {
		return '';
	}

	$atts = array();

	$class = wpcf7_form_controls_class( $tag->type );
	$atts['class'] = $tag->get_class_option( $class );
	$atts['id'] = $tag->get_id_option();

	$value = (string) reset( $tag->values );
	$value = $tag->get_default_option( $value );
	$atts['value'] = $value;

	$atts['type'] = 'hidden';
	$atts['name'] = $tag->name;
	$atts = wpcf7_format_atts( $atts );

	$html = sprintf( '<input %s />', $atts );
	return $html;
}