wpcf7_tag_generator_textarea()
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wpcf7_tag_generator_textarea( $contact_form, $options );
- $contact_form(обязательный)
- .
- $options(обязательный)
- .
Код wpcf7_tag_generator_textarea() wpcf7 tag generator textarea CF7 6.1.7
function wpcf7_tag_generator_textarea( $contact_form, $options ) {
$field_types = array(
'textarea' => array(
'display_name' => __( 'Text area', 'contact-form-7' ),
'heading' => __( 'Text area form-tag generator', 'contact-form-7' ),
'description' => __( 'Generates a form-tag for a <a href="https://contactform7.com/text-fields/">multi-line plain text input area</a>.', 'contact-form-7' ),
),
);
$tgg = new WPCF7_TagGeneratorGenerator( $options['content'] );
$formatter = new WPCF7_HTMLFormatter();
$formatter->append_start_tag( 'header', array(
'class' => 'description-box',
) );
$formatter->append_start_tag( 'h3' );
$formatter->append_preformatted(
esc_html( $field_types['textarea']['heading'] )
);
$formatter->end_tag( 'h3' );
$formatter->append_start_tag( 'p' );
$formatter->append_preformatted(
wp_kses_data( $field_types['textarea']['description'] )
);
$formatter->end_tag( 'header' );
$formatter->append_start_tag( 'div', array(
'class' => 'control-box',
) );
$formatter->call_user_func( static function () use ( $tgg, $field_types ) {
$tgg->print( 'field_type', array(
'with_required' => true,
'select_options' => array(
'textarea' => $field_types['textarea']['display_name'],
),
) );
$tgg->print( 'field_name' );
$tgg->print( 'class_attr' );
$tgg->print( 'min_max', array(
'title' => __( 'Length', 'contact-form-7' ),
'min_option' => 'minlength:',
'max_option' => 'maxlength:',
) );
$tgg->print( 'default_value', array(
'with_placeholder' => true,
'use_content' => true,
) );
} );
$formatter->end_tag( 'div' );
$formatter->append_start_tag( 'footer', array(
'class' => 'insert-box',
) );
$formatter->call_user_func( static function () use ( $tgg, $field_types ) {
$tgg->print( 'insert_box_content' );
$tgg->print( 'mail_tag_tip' );
} );
$formatter->print();
}