WPCF7_Stripe::display_setup()privateCF7 1.0

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

Хуков нет.

Возвращает

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

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

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

Код WPCF7_Stripe::display_setup() CF7 5.9.3

<?php
private function display_setup() {
	$api_keys = $this->get_api_keys();

	if ( $api_keys ) {
		$publishable = $api_keys['publishable'];
		$secret = $api_keys['secret'];
	} else {
		$publishable = '';
		$secret = '';
	}

?>
<form method="post" action="<?php echo esc_url( $this->menu_page_url( 'action=setup' ) ); ?>">
<?php wp_nonce_field( 'wpcf7-stripe-setup' ); ?>
<table class="form-table">
<tbody>
<tr>
<th scope="row"><label for="publishable"><?php echo esc_html( __( 'Publishable Key', 'contact-form-7' ) ); ?></label></th>
<td><?php
	if ( $this->is_active() ) {
		echo esc_html( $publishable );
		echo sprintf(
			'<input type="hidden" value="%s" id="publishable" name="publishable" />',
			esc_attr( $publishable )
		);
	} else {
		echo sprintf(
			'<input type="text" aria-required="true" value="%s" id="publishable" name="publishable" class="regular-text code" />',
			esc_attr( $publishable )
		);
	}
?></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="%s" id="secret" name="secret" />',
			esc_attr( $secret )
		);
	} else {
		echo sprintf(
			'<input type="text" aria-required="true" value="%s" id="secret" name="secret" class="regular-text code" />',
			esc_attr( $secret )
		);
	}
?></td>
</tr>
</tbody>
</table>
<?php
	if ( $this->is_active() ) {
		submit_button(
			_x( 'Remove Keys', 'API keys', 'contact-form-7' ),
			'small', 'reset'
		);
	} else {
		submit_button( __( 'Save Changes', 'contact-form-7' ) );
	}
?>
</form>
<?php
}