WPCF7_Turnstile::display
Displays the service configuration box.
Метод класса: WPCF7_Turnstile{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WPCF7_Turnstile = new WPCF7_Turnstile(); $WPCF7_Turnstile->display( $action );
- $action
- .
По умолчанию:''
Код WPCF7_Turnstile::display() WPCF7 Turnstile::display CF7 6.1.7
public function display( $action = '' ) {
$formatter = new WPCF7_HTMLFormatter( array(
'allowed_html' => array_merge( wpcf7_kses_allowed_html(), array(
'form' => array(
'action' => true,
'method' => true,
),
) ),
) );
$formatter->append_start_tag( 'p' );
$formatter->append_preformatted(
esc_html( __( 'Turnstile is Cloudflare’s smart CAPTCHA alternative, which confirms web visitors are real and blocks unwanted bots without slowing down web experiences for real users.', 'contact-form-7' ) )
);
$formatter->end_tag( 'p' );
$formatter->append_start_tag( 'p' );
$formatter->append_start_tag( 'strong' );
$formatter->append_preformatted(
wpcf7_link(
__( 'https://contactform7.com/turnstile-integration/', 'contact-form-7' ),
__( 'Cloudflare Turnstile integration', 'contact-form-7' )
)
);
$formatter->end_tag( 'p' );
if ( $this->is_active() ) {
$formatter->append_start_tag( 'p', array(
'class' => 'dashicons-before dashicons-yes',
) );
$formatter->append_preformatted(
esc_html( __( 'Turnstile is active on this site.', 'contact-form-7' ) )
);
$formatter->end_tag( 'p' );
}
if ( 'setup' === $action ) {
$formatter->call_user_func( function () {
$this->display_setup();
} );
} else {
$formatter->append_start_tag( 'p' );
$formatter->append_start_tag( 'a', array(
'href' => esc_url( $this->menu_page_url( 'action=setup' ) ),
'class' => 'button',
) );
$formatter->append_preformatted(
esc_html( __( 'Setup integration', 'contact-form-7' ) )
);
$formatter->end_tag( 'p' );
}
$formatter->print();
}