wpcf7_output_form_tag_handler()
The form-tag handler for the output type.
Хуков нет.
Возвращает
null
. Ничего.
Использование
wpcf7_output_form_tag_handler( $tag );
- $tag (обязательный)
- -
Код wpcf7_output_form_tag_handler() wpcf7 output form tag handler CF7 5.7.5.1
function wpcf7_output_form_tag_handler( $tag ) { if ( empty( $tag->name ) ) { return ''; } $value = (string) reset( $tag->values ); if ( ! wpcf7_get_validation_error( $tag->name ) ) { $hangover = array_filter( (array) wpcf7_get_hangover( $tag->name ) ); if ( $hangover ) { $value = (string) reset( $hangover ); } } $html = sprintf( '<output %1$s>%2$s</output>', wpcf7_format_atts( array( 'data-reflection-of' => $tag->name, 'data-default' => $value, 'name' => $tag->name, 'class' => $tag->get_class_option( wpcf7_form_controls_class( $tag->type ) ), 'id' => $tag->get_id_option(), ) ), esc_html( $value ) ); return $html; }