Skip to content

Commit 416face

Browse files
committed
Remove existing login form.
1 parent c9cf283 commit 416face

File tree

3 files changed

+0
-35
lines changed

3 files changed

+0
-35
lines changed

css/admin.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,5 +265,4 @@ th.mailchimp-connect {
265265

266266
.mailchimp-sf-oauth-connect-wrapper {
267267
display: flex;
268-
text-align: right;
269268
}

mailchimp.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -241,24 +241,6 @@ function mailchimp_sf_add_pages() {
241241
function mailchimp_sf_request_handler() {
242242
if ( isset( $_POST['mcsf_action'] ) ) {
243243
switch ( $_POST['mcsf_action'] ) {
244-
case 'login':
245-
$key = isset( $_POST['mailchimp_sf_api_key'] ) ? trim( sanitize_text_field( wp_unslash( $_POST['mailchimp_sf_api_key'] ) ) ) : '';
246-
247-
try {
248-
$api = new MailChimp_API( $key );
249-
} catch ( Exception $e ) {
250-
$msg = '<strong class="error_msg">' . $e->getMessage() . '</strong>';
251-
mailchimp_sf_global_msg( $msg );
252-
break;
253-
}
254-
255-
$key = mailchimp_sf_verify_key( $api );
256-
if ( is_wp_error( $key ) ) {
257-
$msg = '<strong class="error_msg">' . $key->get_error_message() . '</strong>';
258-
mailchimp_sf_global_msg( $msg );
259-
}
260-
261-
break;
262244
case 'logout':
263245
// Check capability & Verify nonce
264246
if (

views/setup_page.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,6 @@
5757
);
5858
?>
5959
</p>
60-
<div class="mc-section"> <!-- TODO:remove this -->
61-
<table class="widefat mc-widefat mc-api">
62-
<form method="POST" action="">
63-
<tr valign="top">
64-
<th scope="row" class="mailchimp-connect"><?php esc_html_e( 'Connect to Mailchimp', 'mailchimp' ); ?></th>
65-
<td>
66-
<input type="hidden" name="mcsf_action" value="login"/>
67-
<input type="password" name="mailchimp_sf_api_key" placeholder="<?php esc_attr_e( 'API Key', 'mailchimp' ); ?>">
68-
</td>
69-
<td>
70-
<input class="button mc-submit" type="submit" value="<?php esc_attr_e( 'Connect', 'mailchimp' ); ?>">
71-
</td>
72-
</tr>
73-
</form>
74-
</table>
75-
</div>
7660
<div class="mc-section mailchimp-sf-oauth-section">
7761
<table class="widefat mc-widefat mc-api">
7862
<tr valign="top">

0 commit comments

Comments
 (0)