Completed
Push — staging ( 57798f...9e32c1 )
by Evan
20:30
created
admin/partials/welcome-page/welcome-sections/getting-started-section.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@  discard block
 block discarded – undo
1
-<?php if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) == 'invalid_api_key' ) { ?>
1
+<?php if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) { ?>
2 2
 	<div class="about-description">
3
-		<?php printf( __( "Before you can create any opt-in forms, you'll first need to enter your MailChimp API key into the <a href='%s' title='Yikes Easy MailChimp Settings'>settings page</a>" , 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=general-settings' ) ) ); ?>
3
+		<?php printf( __( "Before you can create any opt-in forms, you'll first need to enter your MailChimp API key into the <a href='%s' title='Yikes Easy MailChimp Settings'>settings page</a>", 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=general-settings' ) ) ); ?>
4 4
 	</div>
5 5
 <?php } ?>
6 6
 
7 7
 <div class="changelog">
8 8
 		
9
-	<h3><?php _e( 'Creating Your First Opt-In Form' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
9
+	<h3><?php _e( 'Creating Your First Opt-In Form', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
10 10
 	
11 11
 	<div class="feature-section">
12 12
 		
13 13
 		<img src="<?php echo YIKES_MC_URL . 'includes/images/Welcome_Page/create-first-optin-form.jpg'; ?>" alt="<?php _e( 'Create first optin form screenshot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-easy-mc-feature-image">
14 14
 					
15
-		<h4><a href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ); ?>" title="<?php _e( 'Manage Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?>">Easy MailChimp → <?php _e( 'Forms', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h4>
16
-		<p><?php _e( "Before you can start collecting users email addresses and building your mailing list, you'll need to create your first form. You can create as many forms as you'd like and assign each form to the same or different mailing lists.",  'yikes-inc-easy-mailchimp-extender' ); ?></p>
15
+		<h4><a href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ); ?>" title="<?php _e( 'Manage Forms', 'yikes-inc-easy-mailchimp-extender' ); ?>">Easy MailChimp → <?php _e( 'Forms', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h4>
16
+		<p><?php _e( "Before you can start collecting users email addresses and building your mailing list, you'll need to create your first form. You can create as many forms as you'd like and assign each form to the same or different mailing lists.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
17 17
 	
18 18
 		<p>&nbsp;</p>
19 19
 		
20
-		<h4><?php _e( 'Additional Options' , 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
21
-		<p><?php _e( "Once you create a form, you can choose which fields you want to add to it and customize the success and error messages returned by MailChimp.",  'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
+		<h4><?php _e( 'Additional Options', 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
21
+		<p><?php _e( "Once you create a form, you can choose which fields you want to add to it and customize the success and error messages returned by MailChimp.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
22 22
 		
23 23
 	</div>
24 24
 	
@@ -26,41 +26,41 @@  discard block
 block discarded – undo
26 26
 		
27 27
 		<img src="<?php echo YIKES_MC_URL . 'includes/images/Welcome_Page/optin-settings.png'; ?>" alt="<?php _e( 'Optin settings screenshot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-easy-mc-feature-image yikes-easy-mc-feature-image-left">
28 28
 					
29
-		<h4><?php _e( 'Customize the Form' , 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
30
-		<p><?php _e( "Once created, you can customize the form. This includes editing the success and error messages displayed to the user, choosing which fields or interest groups are displayed, adding CSS classes to fields, assigning default values amp; placeholders and tons more!",  'yikes-inc-easy-mailchimp-extender' ); ?></p>
29
+		<h4><?php _e( 'Customize the Form', 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
30
+		<p><?php _e( "Once created, you can customize the form. This includes editing the success and error messages displayed to the user, choosing which fields or interest groups are displayed, adding CSS classes to fields, assigning default values amp; placeholders and tons more!", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
31 31
 		
32 32
 		<p>&nbsp;</p>
33 33
 		
34
-		<p><?php _e( "Quickly and easily switch which list the form is associated with, toggle single or double optin, whether the welcome email should be sent, toggle AJAX form submissions and more. Get customizing!",  'yikes-inc-easy-mailchimp-extender' ); ?></p>
34
+		<p><?php _e( "Quickly and easily switch which list the form is associated with, toggle single or double optin, whether the welcome email should be sent, toggle AJAX form submissions and more. Get customizing!", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
35 35
 	</div>
36 36
 	<div class="feature-section">
37 37
 		
38 38
 		<img src="<?php echo YIKES_MC_URL . 'includes/images/Welcome_Page/add-field-to-page.png'; ?>" alt="<?php _e( 'Add field to form screenshot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-easy-mc-feature-image">
39 39
 					
40
-		<h4><?php _e( 'Add Form to Page/Post' , 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
41
-		<p><?php _e( "When you're ready to add your MailChimp opt-in form to a page or post, you can click on the small MailChimp button in the content editor toolbar.",  'yikes-inc-easy-mailchimp-extender' ); ?></p>
40
+		<h4><?php _e( 'Add Form to Page/Post', 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
41
+		<p><?php _e( "When you're ready to add your MailChimp opt-in form to a page or post, you can click on the small MailChimp button in the content editor toolbar.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
42 42
 		
43 43
 		<p>&nbsp;</p>
44 44
 		
45
-		<h4><?php _e( 'Add Form to Widget' , 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
46
-		<p><?php _e( "We've created a MailChimp widget to easily add forms to any sidebar or widgetized area on your site. The widget allows you to select from any created forms.",  'yikes-inc-easy-mailchimp-extender' ); ?></p>
45
+		<h4><?php _e( 'Add Form to Widget', 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
46
+		<p><?php _e( "We've created a MailChimp widget to easily add forms to any sidebar or widgetized area on your site. The widget allows you to select from any created forms.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
47 47
 	</div>
48 48
 	
49 49
 	<div class="feature-section">
50
-		<h3><span class="dashicons dashicons-format-status need-support-icon"></span> <?php _e( "Need Support?" , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>		
50
+		<h3><span class="dashicons dashicons-format-status need-support-icon"></span> <?php _e( "Need Support?", 'yikes-inc-easy-mailchimp-extender' ); ?></h3>		
51 51
 		
52
-		<h4><?php _e( 'Free Support' , 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
53
-		<p><?php _e( "If you need help using the free version of the plugin, you can post support inquiries to one of two locations.",  'yikes-inc-easy-mailchimp-extender' ); ?></p>
52
+		<h4><?php _e( 'Free Support', 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
53
+		<p><?php _e( "If you need help using the free version of the plugin, you can post support inquiries to one of two locations.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
54 54
 		<ul class="support-option-list">
55
-			<li class="support-option support-option-first"><a href="https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/" title="<?php esc_attr_e( 'WordPress Plugin Directory' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'WordPress Plugin Directory' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
56
-			<li class="support-option support-option-second"><a href="https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/issues" target="_blank" title="<?php esc_attr_e( 'GitHub Issue Tracker' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'GitHub Issue Tracker' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
55
+			<li class="support-option support-option-first"><a href="https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/" title="<?php esc_attr_e( 'WordPress Plugin Directory', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'WordPress Plugin Directory', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
56
+			<li class="support-option support-option-second"><a href="https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/issues" target="_blank" title="<?php esc_attr_e( 'GitHub Issue Tracker', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'GitHub Issue Tracker', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
57 57
 		</ul>
58 58
 		
59
-		<h4><?php _e( 'Priority Support' , 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
60
-		<p><?php _e( "If you want immediate support, please consider purchasing an add-on or developer License. Not only will you get 1 full year of automatic updates and priority support, you will enjoy the tons of features packed into our add-ons that are not available in the free version." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
59
+		<h4><?php _e( 'Priority Support', 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
60
+		<p><?php _e( "If you want immediate support, please consider purchasing an add-on or developer License. Not only will you get 1 full year of automatic updates and priority support, you will enjoy the tons of features packed into our add-ons that are not available in the free version.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
61 61
 
62
-		<h4><?php _e( 'Knowledge Base' , 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
63
-		<p><?php printf( __( 'For plugin documentation, visit our <a href="%s" title="Knowledge Base" target="_blank">knowledge base</a>.' , 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) ); ?>
62
+		<h4><?php _e( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
63
+		<p><?php printf( __( 'For plugin documentation, visit our <a href="%s" title="Knowledge Base" target="_blank">knowledge base</a>.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) ); ?>
64 64
 		
65 65
 	</div>
66 66
 	
Please login to merge, or discard this patch.
admin/partials/welcome-page/welcome.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@  discard block
 block discarded – undo
7 7
 	 * @return void
8 8
 	 */
9 9
 	function yikes_easy_mc_welcome_tabs() {
10
-		$section = isset( $_GET['section'] ) ? $_GET['section'] : 'getting-started';
10
+		$section = isset( $_GET[ 'section' ] ) ? $_GET[ 'section' ] : 'getting-started';
11 11
 		?>
12 12
 		<h2 class="nav-tab-wrapper welcome-page-tabs">
13
-			<a class="nav-tab <?php echo $section == 'getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url_raw( admin_url( add_query_arg( array( 'page' => 'yikes-mailchimp-welcome' , 'section' => 'getting-started' ), 'admin.php' ) ) ); ?>">
13
+			<a class="nav-tab <?php echo $section == 'getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url_raw( admin_url( add_query_arg( array( 'page' => 'yikes-mailchimp-welcome', 'section' => 'getting-started' ), 'admin.php' ) ) ); ?>">
14 14
 				<span class="dashicons dashicons-admin-home"></span> <?php _e( 'Getting Started', 'yikes-inc-easy-mailchimp-extender' ); ?>
15 15
 			</a>
16
-			<a class="nav-tab <?php echo $section == 'whats-new' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url_raw( admin_url( add_query_arg( array( 'page' => 'yikes-mailchimp-welcome' , 'section' => 'whats-new' ), 'admin.php' ) ) ); ?>">
16
+			<a class="nav-tab <?php echo $section == 'whats-new' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url_raw( admin_url( add_query_arg( array( 'page' => 'yikes-mailchimp-welcome', 'section' => 'whats-new' ), 'admin.php' ) ) ); ?>">
17 17
 				<span class="dashicons dashicons-warning"></span> <?php _e( "What's New", 'yikes-inc-easy-mailchimp-extender' ); ?>
18 18
 			</a>
19
-			<a class="nav-tab <?php echo $section == 'add-ons' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url_raw( admin_url( add_query_arg( array( 'page' => 'yikes-mailchimp-welcome' , 'section' => 'add-ons' ), 'admin.php' ) ) ); ?>">
19
+			<a class="nav-tab <?php echo $section == 'add-ons' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url_raw( admin_url( add_query_arg( array( 'page' => 'yikes-mailchimp-welcome', 'section' => 'add-ons' ), 'admin.php' ) ) ); ?>">
20 20
 				<span class="dashicons dashicons-admin-plugins"></span> <?php _e( "Add-Ons", 'yikes-inc-easy-mailchimp-extender' ); ?>
21 21
 			</a>
22
-			<a class="nav-tab <?php echo $section == 'knowledge-base' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url_raw( admin_url( add_query_arg( array( 'page' => 'yikes-mailchimp-welcome' , 'section' => 'knowledge-base' ), 'admin.php' ) ) ); ?>">
22
+			<a class="nav-tab <?php echo $section == 'knowledge-base' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url_raw( admin_url( add_query_arg( array( 'page' => 'yikes-mailchimp-welcome', 'section' => 'knowledge-base' ), 'admin.php' ) ) ); ?>">
23 23
 				<span class="dashicons dashicons-welcome-learn-more"></span> <?php _e( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ); ?>
24 24
 			</a>
25
-			<a class="nav-tab <?php echo $section == 'credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url_raw( admin_url( add_query_arg( array( 'page' => 'yikes-mailchimp-welcome' , 'section' => 'credits' ), 'admin.php' ) ) ); ?>">
25
+			<a class="nav-tab <?php echo $section == 'credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url_raw( admin_url( add_query_arg( array( 'page' => 'yikes-mailchimp-welcome', 'section' => 'credits' ), 'admin.php' ) ) ); ?>">
26 26
 				<span class="dashicons dashicons-arrow-left-alt2"></span><?php _e( 'Credits', 'yikes-inc-easy-mailchimp-extender' ); ?><span class="dashicons dashicons-arrow-right-alt2"></span>
27 27
 			</a>
28 28
 		</h2>
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 	}
31 31
 	
32 32
 	function yikes_easy_mc_welcome_body() {
33
-		$section = isset( $_GET['section'] ) ? $_GET['section'] : 'getting-started';
34
-		if( isset( $section ) ) {
33
+		$section = isset( $_GET[ 'section' ] ) ? $_GET[ 'section' ] : 'getting-started';
34
+		if ( isset( $section ) ) {
35 35
 			include_once( plugin_dir_path( dirname( __FILE__ ) ) . '/welcome-page/welcome-sections/' . $section . '-section.php' );
36 36
 		}
37 37
 	}
@@ -44,17 +44,17 @@  discard block
 block discarded – undo
44 44
 		<div id="yikes-mailchimp-logo"></div>
45 45
 		
46 46
 		<h2 class="welcome-title">
47
-			Easy Forms for MailChimp by YIKES | <?php echo __( 'MailChimp Done Right' , 'yikes-inc-easy-mailchimp-extender' ); ?>
47
+			Easy Forms for MailChimp by YIKES | <?php echo __( 'MailChimp Done Right', 'yikes-inc-easy-mailchimp-extender' ); ?>
48 48
 		</h2>		
49 49
 		
50 50
 		<p class="about-text">
51 51
 			<?php 
52 52
 				// check if this is a fresh install
53
-				if( get_option( 'yikes_easy_mailchimp_activation_date', strtotime( 'now' ) ) == strtotime( 'now' ) ) {
54
-					echo sprintf( __( 'Welcome to the most powerful MailChimp integration for WordPress. Easy Forms for MailChimp by YIKES v%s is ready to help take your mailing lists to the next level!' , 'yikes-inc-easy-mailchimp-extender' ) , $this->version ); 
53
+				if ( get_option( 'yikes_easy_mailchimp_activation_date', strtotime( 'now' ) ) == strtotime( 'now' ) ) {
54
+					echo sprintf( __( 'Welcome to the most powerful MailChimp integration for WordPress. Easy Forms for MailChimp by YIKES v%s is ready to help take your mailing lists to the next level!', 'yikes-inc-easy-mailchimp-extender' ), $this->version ); 
55 55
 				} else {
56 56
 					// else thank you for updating :)
57
-					echo sprintf( __( 'Thank you for updating to the latest version! Easy Forms for MailChimp by YIKES v%s is ready to help take your mailing lists to the next level!' , 'yikes-inc-easy-mailchimp-extender' ) , $this->version ); 
57
+					echo sprintf( __( 'Thank you for updating to the latest version! Easy Forms for MailChimp by YIKES v%s is ready to help take your mailing lists to the next level!', 'yikes-inc-easy-mailchimp-extender' ), $this->version ); 
58 58
 				}
59 59
 			?>
60 60
 		</p>
Please login to merge, or discard this patch.
admin/partials/ajax/class.ajax.php 3 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -154,17 +154,17 @@
 block discarded – undo
154 154
 		public function findMCListIndex( $id, $array, $tag ) {
155 155
 			if( $tag == 'tag' ) {
156 156
 				foreach( $array as $key => $val ) {
157
-					   if ( $val['tag'] === $id ) {
158
-						   return $key;
159
-					   }
160
-				   }
161
-			   return null;
157
+						if ( $val['tag'] === $id ) {
158
+							return $key;
159
+						}
160
+					}
161
+				return null;
162 162
 			} else {
163 163
 				foreach ( $array as $key => $val ) {
164
-				   if ( $val['id'] == $id ) {
165
-					   return $key;
166
-				   }
167
-			   }
164
+					if ( $val['id'] == $id ) {
165
+						return $key;
166
+					}
167
+				}
168 168
 			return null;
169 169
 			}
170 170
 	  	} // end
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
 
13 13
 		public function __construct() {
14 14
 			// ajax send merge variable to form builder
15
-			add_action( 'wp_ajax_add_field_to_form', array( $this , 'send_field_to_form' ), 10 );
15
+			add_action( 'wp_ajax_add_field_to_form', array( $this, 'send_field_to_form' ), 10 );
16 16
 			// ajax send interest group to form builder
17
-			add_action( 'wp_ajax_add_interest_group_to_form', array( $this , 'send_interest_group_to_form' ), 10 );
17
+			add_action( 'wp_ajax_add_interest_group_to_form', array( $this, 'send_interest_group_to_form' ), 10 );
18 18
 			// return new list data + activity (for dashboard widget )
19
-			add_action( 'wp_ajax_get_new_list_data', array( $this , 'get_new_list_data' ), 10 );
19
+			add_action( 'wp_ajax_get_new_list_data', array( $this, 'get_new_list_data' ), 10 );
20 20
 			// return new list data + activity (for dashboard widget )
21
-			add_action( 'wp_ajax_check_list_for_interest_groups', array( $this , 'check_list_for_interest_groups' ), 10 );
21
+			add_action( 'wp_ajax_check_list_for_interest_groups', array( $this, 'check_list_for_interest_groups' ), 10 );
22 22
 			// Add a new notification to a form
23
-			add_action( 'wp_ajax_add_notification_to_form', array( $this , 'add_notification_to_form' ), 10 , 1 );
23
+			add_action( 'wp_ajax_add_notification_to_form', array( $this, 'add_notification_to_form' ), 10, 1 );
24 24
 		}
25 25
 
26 26
 		/*
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 		*	- return a single container
29 29
 		*/
30 30
 		public function add_notification_to_form() {
31
-			if( $_POST['notification_name'] ) {
31
+			if ( $_POST[ 'notification_name' ] ) {
32 32
 				include_once( YIKES_MC_PATH . 'admin/partials/ajax/add_notification_to_form.php' );
33 33
 			}
34 34
 			exit();
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 		// when the user wants to switch which form data
40 40
 		// is displayed on the dashboard
41 41
 		public function get_new_list_data() {
42
-			$list_id = $_POST['list_id'];
42
+			$list_id = $_POST[ 'list_id' ];
43 43
 			$api_key = yikes_get_mc_api_key();
44 44
 			$dash_position = strpos( $api_key, '-' );
45
-			if( $dash_position !== false ) {
45
+			if ( $dash_position !== false ) {
46 46
 				$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/list.json';
47 47
 			}
48 48
 			$list_data = wp_remote_post( $api_endpoint, array(
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
 				'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
55 55
 			) );
56 56
 			$list_data = json_decode( wp_remote_retrieve_body( $list_data ), true );
57
-			if( isset( $list_data['error'] ) ) {
58
-				if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
57
+			if ( isset( $list_data[ 'error' ] ) ) {
58
+				if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
59 59
 					require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
60 60
 					$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
61
-					$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data['error'], __( "Get Account Lists" , 'yikes-inc-easy-mailchimp-extender' ) , __( "MailChimp Widget" , 'yikes-inc-easy-mailchimp-extender' ) );
61
+					$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data[ 'error' ], __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ), __( "MailChimp Widget", 'yikes-inc-easy-mailchimp-extender' ) );
62 62
 				}
63 63
 			}
64
-			if( ! empty( $list_data['data'][0] ) ) {
64
+			if ( ! empty( $list_data[ 'data' ][ 0 ] ) ) {
65 65
 				include_once( YIKES_MC_PATH . 'admin/partials/dashboard-widgets/templates/stats-list-template.php' );
66 66
 			}
67 67
 			exit();
@@ -73,19 +73,19 @@  discard block
 block discarded – undo
73 73
 		// we want to return the interest groups associated with this list,
74 74
 		// to allow users to pre-check anything they want to assign users appropriately
75 75
 		/* note: this function is called statically from the integration settings page */
76
-		public static function check_list_for_interest_groups( $list_id='', $integration_type='', $load=false ) {
77
-			if( ! $list_id ) {
78
-				$list_id = $_POST['list_id'];
76
+		public static function check_list_for_interest_groups( $list_id = '', $integration_type = '', $load = false ) {
77
+			if ( ! $list_id ) {
78
+				$list_id = $_POST[ 'list_id' ];
79 79
 			}
80
-			if( ! $integration_type ) {
81
-				$integration_type = $_POST['integration'];
80
+			if ( ! $integration_type ) {
81
+				$integration_type = $_POST[ 'integration' ];
82 82
 			}
83 83
 			$api_key = yikes_get_mc_api_key();
84 84
 			// setup/check our transients
85
-			if ( WP_DEBUG ||  false === ( $interest_groupings = get_transient( $list_id . '_interest_group' ) ) ) {
85
+			if ( WP_DEBUG || false === ( $interest_groupings = get_transient( $list_id . '_interest_group' ) ) ) {
86 86
 			  // It wasn't there, so regenerate the data and save the transient
87 87
 				$dash_position = strpos( $api_key, '-' );
88
-				if( $dash_position !== false ) {
88
+				if ( $dash_position !== false ) {
89 89
 					$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/interest-groupings.json';
90 90
 				}
91 91
 				$interest_groupings = wp_remote_post( $api_endpoint, array(
@@ -98,22 +98,22 @@  discard block
 block discarded – undo
98 98
 					'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
99 99
 				) );
100 100
 				$interest_groupings = json_decode( wp_remote_retrieve_body( $interest_groupings ), true );
101
-				if( isset( $interest_groupings['error'] ) ) {
102
-					if( get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
101
+				if ( isset( $interest_groupings[ 'error' ] ) ) {
102
+					if ( get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
103 103
 						require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
104 104
 						$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
105
-						$error_logging->yikes_easy_mailchimp_write_to_error_log( $interest_groupings['error'], __( "Get Interest Groups" , 'yikes-inc-easy-mailchimp-extender' ), "class.ajax.php" );
105
+						$error_logging->yikes_easy_mailchimp_write_to_error_log( $interest_groupings[ 'error' ], __( "Get Interest Groups", 'yikes-inc-easy-mailchimp-extender' ), "class.ajax.php" );
106 106
 					}
107 107
 				} else {
108 108
 					// set the transient for 2 hours
109 109
 					set_transient( $list_id . '_interest_group', $interest_groupings, 2 * HOUR_IN_SECONDS );
110 110
 				}
111 111
 			}
112
-			if( isset( $interest_groupings ) && ! empty( $interest_groupings ) ) {
112
+			if ( isset( $interest_groupings ) && ! empty( $interest_groupings ) ) {
113 113
 				require( YIKES_MC_PATH . 'admin/partials/menu/options-sections/templates/integration-interest-groups.php' );
114 114
 			}
115 115
 			// do not kill off execution on load, only on an ajax request
116
-			if( ! $load ) {
116
+			if ( ! $load ) {
117 117
 				exit();
118 118
 				wp_die();
119 119
 			}
@@ -123,10 +123,10 @@  discard block
 block discarded – undo
123 123
 		// send a field to our form
124 124
 		public function send_field_to_form() {
125 125
 			$form_data_array = array(
126
-				'field_name' => $_POST['field_name'],
127
-				'merge_tag' => $_POST['merge_tag'],
128
-				'field_type' => $_POST['field_type'],
129
-				'list_id' => $_POST['list_id'],
126
+				'field_name' => $_POST[ 'field_name' ],
127
+				'merge_tag' => $_POST[ 'merge_tag' ],
128
+				'field_type' => $_POST[ 'field_type' ],
129
+				'list_id' => $_POST[ 'list_id' ],
130 130
 			);
131 131
 			include YIKES_MC_PATH . 'admin/partials/ajax/add_field_to_form.php';
132 132
 			exit();
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
 		// send interest group to our form
137 137
 		public function send_interest_group_to_form() {
138 138
 			$form_data_array = array(
139
-				'field_name' => $_POST['field_name'],
140
-				'group_id' => $_POST['group_id'],
141
-				'field_type' => $_POST['field_type'],
142
-				'list_id' => $_POST['list_id'],
139
+				'field_name' => $_POST[ 'field_name' ],
140
+				'group_id' => $_POST[ 'group_id' ],
141
+				'field_type' => $_POST[ 'field_type' ],
142
+				'list_id' => $_POST[ 'list_id' ],
143 143
 			);
144 144
 			include YIKES_MC_PATH . 'admin/partials/ajax/add_interest_group_to_form.php';
145 145
 			exit();
@@ -152,16 +152,16 @@  discard block
 block discarded – undo
152 152
 		*	- http://stackoverflow.com/questions/6661530/php-multi-dimensional-array-search
153 153
 		*/
154 154
 		public function findMCListIndex( $id, $array, $tag ) {
155
-			if( $tag == 'tag' ) {
156
-				foreach( $array as $key => $val ) {
157
-					   if ( $val['tag'] === $id ) {
155
+			if ( $tag == 'tag' ) {
156
+				foreach ( $array as $key => $val ) {
157
+					   if ( $val[ 'tag' ] === $id ) {
158 158
 						   return $key;
159 159
 					   }
160 160
 				   }
161 161
 			   return null;
162 162
 			} else {
163 163
 				foreach ( $array as $key => $val ) {
164
-				   if ( $val['id'] == $id ) {
164
+				   if ( $val[ 'id' ] == $id ) {
165 165
 					   return $key;
166 166
 				   }
167 167
 			   }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@
 block discarded – undo
7 7
 	*	@since 6.0.0
8 8
 	*	Author: Yikes Inc. | https://www.yikesinc.com
9 9
 	*/
10
-	class YIKES_Inc_Easy_MailChimp_Process_Ajax
11
-	{
10
+	class YIKES_Inc_Easy_MailChimp_Process_Ajax {
12 11
 
13 12
 		public function __construct() {
14 13
 			// ajax send merge variable to form builder
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/api-cache-settings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
3 3
 	-	Clear MailChimp transient data such as forms, form fields, list data, subscribers etc.
4 4
 		*	transient cache is stored for 60 minutes.
5 5
 -->
6
-<h3><span><?php _e( 'API Cache Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
6
+<h3><span><?php _e( 'API Cache Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7 7
 <div class="inside">
8 8
 									
9 9
 	<!-- Settings Form -->
10
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data' , 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" method="post">							
10
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data', 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" method="post">							
11 11
 									
12
-		<p><?php _e( "Delete all MailChimp data stored in your sites cache. Most data is stored in the cache for 1 hour." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
12
+		<p><?php _e( "Delete all MailChimp data stored in your sites cache. Most data is stored in the cache for 1 hour.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
13 13
 			<!-- check if any of our transients contain data -->							
14 14
 			<?php if ( false === get_transient( 'yikes-easy-mailchimp-list-data' ) && false === get_transient( 'yikes-easy-mailchimp-profile-data' ) && false === get_transient( 'yikes-easy-mailchimp-account-data' ) ) { ?>
15
-				<p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No MailChimp data found in temporary cache storage.' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear MailChimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
15
+				<p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No MailChimp data found in temporary cache storage.', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear MailChimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
16 16
 			<?php } else { ?>
17
-				<p><input type="submit" class="button-primary" value="<?php _e( 'Clear MailChimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
17
+				<p><input type="submit" class="button-primary" value="<?php _e( 'Clear MailChimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
18 18
 			<?php } ?>
19 19
 									
20 20
 	</form>
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/debug-settings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 	- php version, wp version, plugin version and debug log
5 5
 -->
6 6
 
7
-<h3><span><?php _e( 'Debug Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7
+<h3><span><?php _e( 'Debug Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
8 8
 
9 9
 <div class="inside">
10 10
 	
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 	
14 14
 		<?php settings_fields( 'yikes_inc_easy_mc_debug_settings_page' ); ?>
15 15
 	
16
-		<label for="yikes-mailchimp-debug-status"><strong><?php _e( 'Enable Debugging' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
17
-			<input type="checkbox" name="yikes-mailchimp-debug-status" id="yikes-mailchimp-debug-status" value="1" <?php checked( get_option( 'yikes-mailchimp-debug-status' , '' ) , '1' ); ?>>
16
+		<label for="yikes-mailchimp-debug-status"><strong><?php _e( 'Enable Debugging', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
17
+			<input type="checkbox" name="yikes-mailchimp-debug-status" id="yikes-mailchimp-debug-status" value="1" <?php checked( get_option( 'yikes-mailchimp-debug-status', '' ), '1' ); ?>>
18 18
 		</label>
19
-		<p class="description"><?php _e( "If you encounter an issue with Easy Forms for MailChimp you can toggle on debugging to display advanced error messages and start logging errors." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
19
+		<p class="description"><?php _e( "If you encounter an issue with Easy Forms for MailChimp you can toggle on debugging to display advanced error messages and start logging errors.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20 20
 		
21 21
 		<?php submit_button(); ?>
22 22
 									
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 				)
36 36
 			);
37 37
 		?>
38
-		<h2><?php _e( "Debug Log" , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="<?php echo $url; ?>" class="button-secondary"><?php _e( 'Clear Log', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h2>
38
+		<h2><?php _e( "Debug Log", 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="<?php echo $url; ?>" class="button-secondary"><?php _e( 'Clear Log', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h2>
39 39
 		
40 40
 		<table class="widefat" id="yikes-mailchimp-error-log">
41 41
 			<!-- table header -->
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/recaptcha-settings.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@  discard block
 block discarded – undo
12 12
 
13 13
 ?>
14 14
 
15
-<h3><span><?php _e( 'reCAPTCHA Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
15
+<h3><span><?php _e( 'reCAPTCHA Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
16 16
 
17 17
 <div class="inside">
18 18
 	
19 19
 	<p>
20
-		<?php _e( 'reCAPTCHA is a free CAPTCHA service, from Google, that helps protect your site against spam, malicious registrations and other forms of attacks where computers try to disguise themselves as a human. reCAPTCHA will help prevent spammers and bots from submitting data through your MailChimp forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?>
20
+		<?php _e( 'reCAPTCHA is a free CAPTCHA service, from Google, that helps protect your site against spam, malicious registrations and other forms of attacks where computers try to disguise themselves as a human. reCAPTCHA will help prevent spammers and bots from submitting data through your MailChimp forms.', 'yikes-inc-easy-mailchimp-extender' ); ?>
21 21
 	</p>
22 22
 	
23 23
 	<p>
24
-		<?php echo '<a href="https://www.google.com/recaptcha/admin" target="_blank" title="' . __( 'Get your reCAPTCHA API Key' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Get Your reCAPTCHA API Key' , 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; ?>
24
+		<?php echo '<a href="https://www.google.com/recaptcha/admin" target="_blank" title="' . __( 'Get your reCAPTCHA API Key', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Get Your reCAPTCHA API Key', 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; ?>
25 25
 	</p>
26 26
 	
27 27
 	<!-- Settings Form -->
@@ -29,21 +29,21 @@  discard block
 block discarded – undo
29 29
 		
30 30
 		<?php settings_fields( 'yikes_inc_easy_mc_recaptcha_settings_page' ); ?>
31 31
 		
32
-			<label for="yikes-mc-recaptcha-setting"><strong><?php _e( 'Enable reCAPTCHA Protection' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
33
-				<input type="checkbox" name="yikes-mc-recaptcha-status" class="recaptcha-setting-checkbox" value="1" <?php checked( get_option( 'yikes-mc-recaptcha-status' , '' ) , '1' ); ?>>
32
+			<label for="yikes-mc-recaptcha-setting"><strong><?php _e( 'Enable reCAPTCHA Protection', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
33
+				<input type="checkbox" name="yikes-mc-recaptcha-status" class="recaptcha-setting-checkbox" value="1" <?php checked( get_option( 'yikes-mc-recaptcha-status', '' ), '1' ); ?>>
34 34
 			</label>
35 35
 			
36
-			<label for="yikes-mc-recaptcha-api-key"><strong><?php _e( 'reCAPTCHA Site Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
37
-				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-site-key" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-site-key' , '' ) ); ?>">
36
+			<label for="yikes-mc-recaptcha-api-key"><strong><?php _e( 'reCAPTCHA Site Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
37
+				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-site-key" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-site-key', '' ) ); ?>">
38 38
 			</label>
39 39
 			
40
-			<label for="yikes-mc-recaptcha-private-api-key"><strong><?php _e( 'reCAPTCHA Secret Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
41
-				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-secret-key" id="" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-secret-key' , '' ) ); ?>">
40
+			<label for="yikes-mc-recaptcha-private-api-key"><strong><?php _e( 'reCAPTCHA Secret Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
41
+				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-secret-key" id="" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-secret-key', '' ) ); ?>">
42 42
 			</label>
43 43
 			
44
-			<a href="#" onclick="jQuery(this).next().slideToggle();return false;" class="recaptcha-preview-link"><?php _e( 'View reCAPTCHA Preview' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
44
+			<a href="#" onclick="jQuery(this).next().slideToggle();return false;" class="recaptcha-preview-link"><?php _e( 'View reCAPTCHA Preview', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
45 45
 				<span class="recaptcha-preview-container">
46
-					<img src="<?php echo YIKES_MC_URL . 'includes/images/recaptcha/recaptcha-demo.gif'; ?>" alt="<?php _e( 'reCAPTCHA Preview' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="recaptcha-demo-gif">
46
+					<img src="<?php echo YIKES_MC_URL . 'includes/images/recaptcha/recaptcha-demo.gif'; ?>" alt="<?php _e( 'reCAPTCHA Preview', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="recaptcha-demo-gif">
47 47
 				</span>
48 48
 			
49 49
 			
Please login to merge, or discard this patch.
partials/menu/options-sections/templates/integration-interest-groups.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 // print_r( $interest_groupings );
4 4
 
5
-$integration_options = get_option( 'optin-checkbox-init' , '' );	
5
+$integration_options = get_option( 'optin-checkbox-init', '' );	
6 6
 
7 7
 // print_r( $integration_options );
8 8
 
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 /*
12 12
 * Confirm the interest groups is an array and not empty or else bail
13 13
 */
14
-if( isset( $interest_groupings['error'] ) ) {
15
-	echo '<p class="description no-interest-groupings-enabled-message">' . $interest_groupings['error'] . '</p>';
14
+if ( isset( $interest_groupings[ 'error' ] ) ) {
15
+	echo '<p class="description no-interest-groupings-enabled-message">' . $interest_groupings[ 'error' ] . '</p>';
16 16
 	return;
17 17
 }
18 18
 
@@ -25,30 +25,30 @@  discard block
 block discarded – undo
25 25
 /*
26 26
 *	Loop over interest groups
27 27
 */
28
-foreach( $interest_groupings as $interest_group ) {
28
+foreach ( $interest_groupings as $interest_group ) {
29 29
 	
30
-	$interest_group_id = $interest_group['id'];
31
-	$interest_group_type = ( isset( $interest_group['form_field'] ) ) ? $interest_group['form_field'] : '';
32
-	$interest_groups_fields = ( isset( $interest_group['groups'] ) ) ? $interest_group['groups'] : false; // if not set return false
33
-	$selected_interest_groups = ( isset( $integration_options[$integration_type]['interest-groups'] ) ) ? $integration_options[$integration_type]['interest-groups'] : array();
30
+	$interest_group_id = $interest_group[ 'id' ];
31
+	$interest_group_type = ( isset( $interest_group[ 'form_field' ] ) ) ? $interest_group[ 'form_field' ] : '';
32
+	$interest_groups_fields = ( isset( $interest_group[ 'groups' ] ) ) ? $interest_group[ 'groups' ] : false; // if not set return false
33
+	$selected_interest_groups = ( isset( $integration_options[ $integration_type ][ 'interest-groups' ] ) ) ? $integration_options[ $integration_type ][ 'interest-groups' ] : array();
34 34
 	?>
35 35
 	<section class="interest-group-section">
36
-		<strong class="interest-group-section-title"><?php echo ucwords( $interest_group['name'] ); ?></strong>
36
+		<strong class="interest-group-section-title"><?php echo ucwords( $interest_group[ 'name' ] ); ?></strong>
37 37
 	<?php
38 38
 	/*
39 39
 	*	Loop over the interest group types, and return the appropriate type
40 40
 	*/	
41
-	switch( $interest_group_type ) {
41
+	switch ( $interest_group_type ) {
42 42
 	
43 43
 		default:
44 44
 		case 'hidden':
45 45
 		case 'checkboxes':
46
-			if( $interest_groups_fields ) {
47
-				foreach( $interest_groups_fields as $field ) {
46
+			if ( $interest_groups_fields ) {
47
+				foreach ( $interest_groups_fields as $field ) {
48 48
 				?>
49 49
 					<label>
50
-						<input type="checkbox" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field['name']; ?>" <?php if( isset( $selected_interest_groups[$interest_group_id] ) ) {  if( in_array( $field['name'], $selected_interest_groups[$interest_group_id] ) ) { ?> checked="checked" <?php } } ?>>
51
-						<?php echo $field['name']; ?>
50
+						<input type="checkbox" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field[ 'name' ]; ?>" <?php if ( isset( $selected_interest_groups[ $interest_group_id ] ) ) {  if ( in_array( $field[ 'name' ], $selected_interest_groups[ $interest_group_id ] ) ) { ?> checked="checked" <?php } } ?>>
51
+						<?php echo $field[ 'name' ]; ?>
52 52
 					</label>
53 53
 				<?php
54 54
 				}
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
 			break;
57 57
 			
58 58
 		case 'radio':
59
-			if( $interest_groups_fields ) {
59
+			if ( $interest_groups_fields ) {
60 60
 				$x = 1; //  used to decide which is pre-checked
61
-				foreach( $interest_groups_fields as $field ) {
61
+				foreach ( $interest_groups_fields as $field ) {
62 62
 				?>
63 63
 					<label>
64
-						<input type="radio" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field['name']; ?>" <?php if( isset( $selected_interest_groups[$interest_group_id] ) ) {  if( in_array( $field['name'], $selected_interest_groups[$interest_group_id] ) ) { ?> checked="checked" <?php } } elseif( $x == 1 ) { ?> checked="checked" <?php }?>>
65
-						<?php echo $field['name']; ?>
64
+						<input type="radio" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field[ 'name' ]; ?>" <?php if ( isset( $selected_interest_groups[ $interest_group_id ] ) ) {  if ( in_array( $field[ 'name' ], $selected_interest_groups[ $interest_group_id ] ) ) { ?> checked="checked" <?php } } elseif ( $x == 1 ) { ?> checked="checked" <?php }?>>
65
+						<?php echo $field[ 'name' ]; ?>
66 66
 					</label>
67 67
 				<?php
68 68
 					$x++;
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
 			break;
72 72
 			
73 73
 		case 'dropdown':
74
-			if( $interest_groups_fields ) {
74
+			if ( $interest_groups_fields ) {
75 75
 				?><select name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]"><?php
76
-				foreach( $interest_groups_fields as $field ) {
76
+				foreach ( $interest_groups_fields as $field ) {
77 77
 				?>
78
-					<option  value="<?php echo $field['name']; ?>" <?php if( isset( $selected_interest_groups[$interest_group_id] ) ) {  if( in_array( $field['name'], $selected_interest_groups[$interest_group_id] ) ) { ?> selected="selected" <?php } } ?>>
79
-						<?php echo $field['name']; ?>
78
+					<option  value="<?php echo $field[ 'name' ]; ?>" <?php if ( isset( $selected_interest_groups[ $interest_group_id ] ) ) {  if ( in_array( $field[ 'name' ], $selected_interest_groups[ $interest_group_id ] ) ) { ?> selected="selected" <?php } } ?>>
79
+						<?php echo $field[ 'name' ]; ?>
80 80
 					</option>
81 81
 				<?php
82 82
 				}
Please login to merge, or discard this patch.
admin/partials/menu/support.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,17 +10,17 @@  discard block
 block discarded – undo
10 10
 
11 11
 	<div id="yikes-mailchimp-logo" class="support-page"></div>
12 12
 	
13
-	<h1><?php _e( 'Support' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
14
-	<strong><?php _e( "You've got questions? We have answers!" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
15
-	<?php if( get_option( 'yikes-easy-mc-active-addons' , array() ) == array() ) { ?>
16
-		<p><?php _e( 'Users of the free version of YIKES Inc. Easy Forms for MailChimp are limited to two methods of support. We respond to support requests for the free version of the plugin once a week.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
17
-		<p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support, <a href="%s" target="_blank" title="' . __( 'check them out', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'check them out', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!' , 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p>
13
+	<h1><?php _e( 'Support', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
14
+	<strong><?php _e( "You've got questions? We have answers!", 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
15
+	<?php if ( get_option( 'yikes-easy-mc-active-addons', array() ) == array() ) { ?>
16
+		<p><?php _e( 'Users of the free version of YIKES Inc. Easy Forms for MailChimp are limited to two methods of support. We respond to support requests for the free version of the plugin once a week.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
17
+		<p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support, <a href="%s" target="_blank" title="' . __( 'check them out', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'check them out', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!', 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p>
18 18
 	<?php } else { ?>
19
-		<p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
-		<p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:[email protected]'>[email protected]</a> and a ticket will be created." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
19
+		<p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
+		<p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:[email protected]'>[email protected]</a> and a ticket will be created.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
21 21
 	<?php } ?>
22 22
 
23
-		<p><?php printf( __( 'Before submitting a support request, visit our %s.' , 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help.' ); ?></p>
23
+		<p><?php printf( __( 'Before submitting a support request, visit our %s.', 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help.' ); ?></p>
24 24
 
25 25
 	<hr />
26 26
 	
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
 		<div id="col-right">
30 30
 
31 31
 			<div class="col-wrap">
32
-				<h1><span class="github-octocat"></span><?php _e( 'Github Issue Tracker' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
32
+				<h1><span class="github-octocat"></span><?php _e( 'Github Issue Tracker', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
33 33
 				<div class="inside">
34 34
 					<p><?php _e( 'The fastest way to receive free support is to submit a new issue to our GitHub issue tracker. ', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
35
-					<img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/github-issue-screenshot.png" title="<?php esc_attr_e( 'Github Issue Tracker Screenshot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" >
35
+					<img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/github-issue-screenshot.png" title="<?php esc_attr_e( 'Github Issue Tracker Screenshot', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
36 36
 					<a href="https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/issues" target="_blank" class="button-secondary support-page-button"><?php _e( 'Submit New github.org Issue', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
37 37
 				</div>
38 38
 			</div>
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
 		<div id="col-left">
45 45
 
46 46
 			<div class="col-wrap">
47
-				<h1><span class="dashicons dashicons-wordpress-alt support-page-wordpress-font"></span>&nbsp;<?php _e( 'WordPress.org Plugin Directory' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
47
+				<h1><span class="dashicons dashicons-wordpress-alt support-page-wordpress-font"></span>&nbsp;<?php _e( 'WordPress.org Plugin Directory', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
48 48
 				<div class="inside">
49 49
 					<p><?php _e( 'Use your WordPress.org username to submit support requests on the WordPress Directory support forum.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
50
-					<img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/wordpress-issue-screenshot.png" title="<?php esc_attr_e( 'WordPress.org Issue Tracker Screenshot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" >
50
+					<img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/wordpress-issue-screenshot.png" title="<?php esc_attr_e( 'WordPress.org Issue Tracker Screenshot', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
51 51
 					<a href="https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender" target="_blank" class="button-secondary support-page-button"><?php _e( 'Submit New WordPress.org Support Request', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
52 52
 				</div>
53 53
 			</div>
Please login to merge, or discard this patch.
admin/partials/helpers/init.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
 	class Yikes_Inc_Easy_Mailchimp_Extender_Helper {
8 8
 	
9 9
 			/**
10
-			*	Helper functions to help out with extensions (still fleshing out)
11
-			*	@since 6.0
12
-			*	@ Parameters (array of data)
13
-			*		-	Section ID - id of the section, should be a slug style text ie: 'custom-section'
14
-			*		-	Link Text - Visible text for this link ie: 'Custom Section'
15
-			*		-	Dashicon - class of the icon you would like to use for this link
16
-			**/
10
+			 *	Helper functions to help out with extensions (still fleshing out)
11
+			 *	@since 6.0
12
+			 *	@ Parameters (array of data)
13
+			 *		-	Section ID - id of the section, should be a slug style text ie: 'custom-section'
14
+			 *		-	Link Text - Visible text for this link ie: 'Custom Section'
15
+			 *		-	Dashicon - class of the icon you would like to use for this link
16
+			 **/
17 17
 			public static function add_edit_form_section_link( $link_array=array() ) {
18 18
 				if( !empty( $link_array ) ) {
19 19
 					$link_data = wp_parse_args( array() , $link_array );
@@ -36,17 +36,17 @@  discard block
 block discarded – undo
36 36
 			}
37 37
 			
38 38
 			/**
39
-			*	Helper functions to help out with extensions (still fleshing out)
40
-			*	@since 6.0
41
-			*	@ Parameters:
42
-			*		-	Section ID - id of the section, should be a slug style text ie: 'custom-section'
43
-			*		-	Class - class file to call function from?
44
-			*		-	Main Callback - call back for main section
45
-			*		-	Main Section Title - main section title
46
-			*		-	Sidebar Callback - callback for the sidebar section
47
-			*		-	Sidebar Title - title of the sidebar section
48
-			*		-	Class - class to reference funtions out of (optiona, if left blank functions should be defined in functions.php (or outside of a class))
49
-			**/
39
+			 *	Helper functions to help out with extensions (still fleshing out)
40
+			 *	@since 6.0
41
+			 *	@ Parameters:
42
+			 *		-	Section ID - id of the section, should be a slug style text ie: 'custom-section'
43
+			 *		-	Class - class file to call function from?
44
+			 *		-	Main Callback - call back for main section
45
+			 *		-	Main Section Title - main section title
46
+			 *		-	Sidebar Callback - callback for the sidebar section
47
+			 *		-	Sidebar Title - title of the sidebar section
48
+			 *		-	Class - class to reference funtions out of (optiona, if left blank functions should be defined in functions.php (or outside of a class))
49
+			 **/
50 50
 			public static function add_edit_form_section( $section_array=array() ) {
51 51
 				if( !empty( $section_array ) ) {
52 52
 					$section_data = wp_parse_args( array() , $section_array );
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 			}
60 60
 			
61 61
 			/**
62
-			*	Check if the custom section is single or two columns (with sidebar)
63
-			*	@since 6.0
64
-			*	@Parameters:
65
-			*		-	Section Data - the array of data associated with the custom field you've set up
66
-			*/
62
+			 *	Check if the custom section is single or two columns (with sidebar)
63
+			 *	@since 6.0
64
+			 *	@Parameters:
65
+			 *		-	Section Data - the array of data associated with the custom field you've set up
66
+			 */
67 67
 			public static function is_custom_section_two_column( $custom_section_data ) {
68 68
 				// print_r( $custom_section_data );
69 69
 				$value = ( isset( $custom_section_data['sidebar_title'] ) && isset( $custom_section_data['sidebar_fields'] ) && !empty( $custom_section_data['sidebar_fields'] ) ) ?  true : false;
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -14,21 +14,21 @@  discard block
 block discarded – undo
14 14
 			*		-	Link Text - Visible text for this link ie: 'Custom Section'
15 15
 			*		-	Dashicon - class of the icon you would like to use for this link
16 16
 			**/
17
-			public static function add_edit_form_section_link( $link_array=array() ) {
18
-				if( !empty( $link_array ) ) {
19
-					$link_data = wp_parse_args( array() , $link_array );
20
-					if( !empty( $link_data['text'] ) && !empty( $link_data['id'] ) ) {
21
-						if( !empty( $link_data['icon'] ) ) {
22
-							if( !isset( $link_data['icon_family'] ) || $link_data['icon_family'] == 'dashicons' || $link_data['icon_family'] == 'dashicon' ) {
23
-								$icon =  '<span class="dashicons dashicons-' . esc_attr__( $link_data['icon'] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
17
+			public static function add_edit_form_section_link( $link_array = array() ) {
18
+				if ( ! empty( $link_array ) ) {
19
+					$link_data = wp_parse_args( array(), $link_array );
20
+					if ( ! empty( $link_data[ 'text' ] ) && ! empty( $link_data[ 'id' ] ) ) {
21
+						if ( ! empty( $link_data[ 'icon' ] ) ) {
22
+							if ( ! isset( $link_data[ 'icon_family' ] ) || $link_data[ 'icon_family' ] == 'dashicons' || $link_data[ 'icon_family' ] == 'dashicon' ) {
23
+								$icon = '<span class="dashicons dashicons-' . esc_attr__( $link_data[ 'icon' ] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
24 24
 							} else {
25
-								$icon =  '<span class="' . esc_attr__( $link_data['icon'] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
25
+								$icon = '<span class="' . esc_attr__( $link_data[ 'icon' ] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
26 26
 							}
27 27
 						} else {
28 28
 							$icon = '';
29 29
 						}
30 30
 						$link = '<li class="hidden_setting_list">';
31
-							$link .= '<a class="hidden_setting ' . esc_attr__( $link_data['id'] ) . '" data-attr-container="' . esc_attr__( $link_data['id'] ) . '" onclick="return false;" title="' . esc_attr__( $link_data['text'] ) . '" href="#">' . $icon . esc_attr__( $link_data['text'] ) . '</a>';
31
+							$link .= '<a class="hidden_setting ' . esc_attr__( $link_data[ 'id' ] ) . '" data-attr-container="' . esc_attr__( $link_data[ 'id' ] ) . '" onclick="return false;" title="' . esc_attr__( $link_data[ 'text' ] ) . '" href="#">' . $icon . esc_attr__( $link_data[ 'text' ] ) . '</a>';
32 32
 						$link .= '</li>';
33 33
 						echo $link;
34 34
 					}
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 			*		-	Sidebar Title - title of the sidebar section
48 48
 			*		-	Class - class to reference funtions out of (optiona, if left blank functions should be defined in functions.php (or outside of a class))
49 49
 			**/
50
-			public static function add_edit_form_section( $section_array=array() ) {
51
-				if( !empty( $section_array ) ) {
52
-					$section_data = wp_parse_args( array() , $section_array );
50
+			public static function add_edit_form_section( $section_array = array() ) {
51
+				if ( ! empty( $section_array ) ) {
52
+					$section_data = wp_parse_args( array(), $section_array );
53 53
 					ob_start();
54 54
 					include ( YIKES_MC_PATH . 'admin/partials/helpers/edit-form-hidden-section-template.php' );
55 55
 					$section = ob_get_contents();
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 			*/
67 67
 			public static function is_custom_section_two_column( $custom_section_data ) {
68 68
 				// print_r( $custom_section_data );
69
-				$value = ( isset( $custom_section_data['sidebar_title'] ) && isset( $custom_section_data['sidebar_fields'] ) && !empty( $custom_section_data['sidebar_fields'] ) ) ?  true : false;
69
+				$value = ( isset( $custom_section_data[ 'sidebar_title' ] ) && isset( $custom_section_data[ 'sidebar_fields' ] ) && ! empty( $custom_section_data[ 'sidebar_fields' ] ) ) ? true : false;
70 70
 				return $value;
71 71
 			}
72 72
 			
Please login to merge, or discard this patch.