wpcf7_tag_generator_date()CF7 1.0

Хуков нет.

Возвращает

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

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

wpcf7_tag_generator_date( $contact_form, $options );
$contact_form (обязательный)
-
$options (обязательный)
-

Код wpcf7_tag_generator_date() CF7 6.0.6

<?php
function wpcf7_tag_generator_date( $contact_form, $options ) {
	$field_types = array(
		'date' => array(
			'display_name' => __( 'Date field', 'contact-form-7' ),
			'heading' => __( 'Date field form-tag generator', 'contact-form-7' ),
			'description' => __( 'Generates a form-tag for a <a href="https://contactform7.com/date-field/">date input field</a>.', 'contact-form-7' ),
		),
	);

	$tgg = new WPCF7_TagGeneratorGenerator( $options['content'] );

?>
<header class="description-box">
	<h3><?php
		echo esc_html( $field_types['date']['heading'] );
	?></h3>

	<p><?php
		$description = wp_kses(
			$field_types['date']['description'],
			array(
				'a' => array( 'href' => true ),
				'strong' => array(),
			),
			array( 'http', 'https' )
		);

		echo $description;
	?></p>
</header>

<div class="control-box">
	<?php
		$tgg->print( 'field_type', array(
			'with_required' => true,
			'select_options' => array(
				'date' => $field_types['date']['display_name'],
			),
		) );

		$tgg->print( 'field_name' );

		$tgg->print( 'class_attr' );

		$tgg->print( 'min_max', array(
			'type' => 'date',
			'title' => __( 'Range', 'contact-form-7' ),
			'min_option' => 'min:',
			'max_option' => 'max:',
		) );

		$tgg->print( 'default_value', array(
			'type' => 'date',
			'with_placeholder' => false,
		) );
	?>
</div>

<footer class="insert-box">
	<?php
		$tgg->print( 'insert_box_content' );

		$tgg->print( 'mail_tag_tip' );
	?>
</footer>
<?php
}