WPCF7_RECAPTCHA::display_setup() private CF7 1.0
{} Это метод класса: WPCF7_RECAPTCHA{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
// private - только в коде основоного (родительского) класса $result = $this->display_setup();
Код WPCF7_RECAPTCHA::display_setup() WPCF7 RECAPTCHA::display setup CF7 5.3.2
private function display_setup() {
$sitekey = $this->is_active() ? $this->get_sitekey() : '';
$secret = $this->is_active() ? $this->get_secret( $sitekey ) : '';
?>
<form method="post" action="<?php echo esc_url( $this->menu_page_url( 'action=setup' ) ); ?>">
<?php wp_nonce_field( 'wpcf7-recaptcha-setup' ); ?>
<table class="form-table">
<tbody>
<tr>
<th scope="row"><label for="sitekey"><?php echo esc_html( __( 'Site Key', 'contact-form-7' ) ); ?></label></th>
<td><?php
if ( $this->is_active() ) {
echo esc_html( $sitekey );
echo sprintf(
'<input type="hidden" value="%1$s" id="sitekey" name="sitekey" />',
esc_attr( $sitekey )
);
} else {
echo sprintf(
'<input type="text" aria-required="true" value="%1$s" id="sitekey" name="sitekey" class="regular-text code" />',
esc_attr( $sitekey )
);
}
?></td>
</tr>
<tr>
<th scope="row"><label for="secret"><?php echo esc_html( __( 'Secret Key', 'contact-form-7' ) ); ?></label></th>
<td><?php
if ( $this->is_active() ) {
echo esc_html( wpcf7_mask_password( $secret ) );
echo sprintf(
'<input type="hidden" value="%1$s" id="secret" name="secret" />',
esc_attr( $secret )
);
} else {
echo sprintf(
'<input type="text" aria-required="true" value="%1$s" id="secret" name="secret" class="regular-text code" />',
esc_attr( $secret )
);
}
?></td>
</tr>
</tbody>
</table>
<?php
if ( $this->is_active() ) {
if ( $this->get_global_sitekey() && $this->get_global_secret() ) {
// nothing
} else {
submit_button(
_x( 'Remove Keys', 'API keys', 'contact-form-7' ),
'small', 'reset'
);
}
} else {
submit_button( __( 'Save Changes', 'contact-form-7' ) );
}
?>
</form>
<?php
}