WPCF7_RECAPTCHA::display_setup()privateCF7 1.0

Метод класса: WPCF7_RECAPTCHA{}

Хуков нет.

Возвращает

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

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

// private - только в коде основоного (родительского) класса
$result = $this->display_setup();

Код WPCF7_RECAPTCHA::display_setup() CF7 5.9.3

<?php
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, 4, 4 ) );
		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() and $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
}