Skip to content

Commit 8cb244d

Browse files
committed
Fix auto check user sync and CSS issue.
1 parent fc999a9 commit 8cb244d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

assets/css/admin.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ table.mc-widefat, .mailchimp-sf-user-sync-page table.form-table {
4747
}
4848

4949
.mailchimp-sf-user-sync-page table.form-table {
50-
display: block;
50+
border-collapse: separate;
51+
border-spacing: 0px;
5152
}
5253

5354
.mailchimp-sf-user-sync-page table.form-table tr:first-child,

includes/admin/class-mailchimp-user-sync.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ public function get_user_sync_settings( $key = null ) {
204204
*/
205205
public function sanitize_user_sync_settings( $new_settings ) {
206206
$settings = $this->get_user_sync_settings();
207-
$settings['enable_user_sync'] = isset( $new_settings['enable_user_sync'] ) ? 1 : 0;
207+
$settings['enable_user_sync'] = ( isset( $new_settings['enable_user_sync'] ) && 1 === absint( $new_settings['enable_user_sync'] ) ) ? 1 : 0;
208208
$settings['user_roles'] = isset( $new_settings['user_roles'] ) ? array_map( 'sanitize_text_field', $new_settings['user_roles'] ) : array();
209-
$settings['existing_contacts_only'] = isset( $new_settings['existing_contacts_only'] ) ? 1 : 0;
209+
$settings['existing_contacts_only'] = ( isset( $new_settings['existing_contacts_only'] ) && 1 === absint( $new_settings['existing_contacts_only'] ) ) ? 1 : 0;
210210
$settings['subscriber_status'] = isset( $new_settings['subscriber_status'] ) ? sanitize_text_field( $new_settings['subscriber_status'] ) : 'pending';
211211

212212
return $settings;

0 commit comments

Comments
 (0)