@@ -27,16 +27,16 @@ discard block |
||
27 | 27 | ?> |
28 | 28 | <div class="wrap"> |
29 | 29 | <!-- Freddie Logo --> |
30 | - <img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" /> |
|
30 | + <img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" /> |
|
31 | 31 | |
32 | - <h1>Easy Forms for Mailchimp | <?php _e( 'Manage Mailing Lists' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1> |
|
32 | + <h1>Easy Forms for Mailchimp | <?php _e( 'Manage Mailing Lists', 'yikes-inc-easy-mailchimp-extender' ); ?></h1> |
|
33 | 33 | |
34 | 34 | <!-- Settings Page Description --> |
35 | - <p class="yikes-easy-mc-about-text about-text"><?php _e( 'Make edits to your Mailchimp lists.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
35 | + <p class="yikes-easy-mc-about-text about-text"><?php _e( 'Make edits to your Mailchimp lists.', 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
36 | 36 | |
37 | 37 | <?php |
38 | 38 | /* If the user hasn't authenticated yet, lets kill off */ |
39 | - if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) != 'valid_api_key' ) { |
|
39 | + if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) != 'valid_api_key' ) { |
|
40 | 40 | |
41 | 41 | $error_string = sprintf( |
42 | 42 | esc_html__( 'You need to connect to Mailchimp before you can start creating forms. Head over to the %s and enter your API key.', 'yikes-inc-easy-mailchimp-extender' ), |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | <!-- TABLE HEAD --> |
73 | 73 | <thead> |
74 | 74 | <tr> |
75 | - <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th> |
|
76 | - <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></th> |
|
75 | + <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List Name', 'yikes-inc-easy-mailchimp-extender' ); ?></th> |
|
76 | + <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count', 'yikes-inc-easy-mailchimp-extender' ); ?></th> |
|
77 | 77 | </tr> |
78 | 78 | </thead> |
79 | 79 | <!-- end header --> |
@@ -81,25 +81,25 @@ discard block |
||
81 | 81 | <!-- FOOTER --> |
82 | 82 | <tfoot> |
83 | 83 | <tr> |
84 | - <th class="manage-column column-columnname" scope="col"><?php _e( 'List Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th> |
|
85 | - <th class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></th> |
|
84 | + <th class="manage-column column-columnname" scope="col"><?php _e( 'List Name', 'yikes-inc-easy-mailchimp-extender' ); ?></th> |
|
85 | + <th class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count', 'yikes-inc-easy-mailchimp-extender' ); ?></th> |
|
86 | 86 | </tr> |
87 | 87 | </tfoot> |
88 | 88 | <!-- end footer --> |
89 | 89 | |
90 | 90 | <!-- TABLE BODY --> |
91 | 91 | <tbody> |
92 | - <?php if( count( $list_data ) > 0 ) { |
|
92 | + <?php if ( count( $list_data ) > 0 ) { |
|
93 | 93 | $i = 1; |
94 | - foreach( $list_data as $list ) { |
|
94 | + foreach ( $list_data as $list ) { |
|
95 | 95 | ?> |
96 | - <tr class="<?php if( $i % 2 == 0 ) { echo 'alternate'; } ?>"> |
|
96 | + <tr class="<?php if ( $i % 2 == 0 ) { echo 'alternate'; } ?>"> |
|
97 | 97 | <td class="column-columnname"> |
98 | - <a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list['id'] ) , admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>" class="row-title"> |
|
99 | - <?php echo stripslashes( $list['name'] ); ?> |
|
98 | + <a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list[ 'id' ] ), admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>" class="row-title"> |
|
99 | + <?php echo stripslashes( $list[ 'name' ] ); ?> |
|
100 | 100 | </a> |
101 | 101 | <div class="row-actions"> |
102 | - <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list['id'] ) , admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>"><?php _e( "View" , 'yikes-inc-easy-mailchimp-extender' ); ?></a></span> |
|
102 | + <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list[ 'id' ] ), admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>"><?php _e( "View", 'yikes-inc-easy-mailchimp-extender' ); ?></a></span> |
|
103 | 103 | <?php |
104 | 104 | /* |
105 | 105 | * Custom action to allow users to add additional action links |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | ?> |
110 | 110 | </div> |
111 | 111 | </td> |
112 | - <td class="column-columnname num"><?php echo $list['stats']['member_count']; ?></td> |
|
112 | + <td class="column-columnname num"><?php echo $list[ 'stats' ][ 'member_count' ]; ?></td> |
|
113 | 113 | </tr> |
114 | 114 | <?php |
115 | 115 | $i++; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } else { |
118 | 118 | ?> |
119 | 119 | <tr class="no-items"> |
120 | - <td class="colspanchange no-mailchimp-lists-found" colspan="3"><em><?php printf( __( 'No Mailchimp lists found. Head over to <a href="%s" title="Mailchimp.com">Mailchimp.com</a> to setup your first mailing list. Once thats done you can head back here to customize it!' , 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'http://mailchimp.com/' ) ); ?></em></td> |
|
120 | + <td class="colspanchange no-mailchimp-lists-found" colspan="3"><em><?php printf( __( 'No Mailchimp lists found. Head over to <a href="%s" title="Mailchimp.com">Mailchimp.com</a> to setup your first mailing list. Once thats done you can head back here to customize it!', 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'http://mailchimp.com/' ) ); ?></em></td> |
|
121 | 121 | </tr> |
122 | 122 | <?php } ?> |
123 | 123 | </tbody> |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | <div class="postbox yikes-easy-mc-postbox"> |
138 | 138 | <div class="inside"> |
139 | 139 | |
140 | - <a href="https://us3.admin.mailchimp.com/" title="<?php _e( 'Mailchimp Site' , 'yikes-inc-easy-mailchimp-extender' ); ?>" target="_blank"> |
|
141 | - <img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/mailchimp-logo.png'; ?>" title="<?php _e( 'Mailchimp Site' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="list-page-mailchimp-logo"> |
|
140 | + <a href="https://us3.admin.mailchimp.com/" title="<?php _e( 'Mailchimp Site', 'yikes-inc-easy-mailchimp-extender' ); ?>" target="_blank"> |
|
141 | + <img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/mailchimp-logo.png'; ?>" title="<?php _e( 'Mailchimp Site', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="list-page-mailchimp-logo"> |
|
142 | 142 | </a> |
143 | 143 | |
144 | 144 | </div> |
@@ -148,42 +148,42 @@ discard block |
||
148 | 148 | <div class="postbox yikes-easy-mc-postbox list-page-sidebar"> |
149 | 149 | <div class="inside"> |
150 | 150 | |
151 | - <h2 class="account-status"><?php echo $account_details['username']; ?> <small>(<?php echo $account_details['role']; ?>)</small></h2> |
|
151 | + <h2 class="account-status"><?php echo $account_details[ 'username' ]; ?> <small>(<?php echo $account_details[ 'role' ]; ?>)</small></h2> |
|
152 | 152 | |
153 | - <img class="mailchimp-avatar" src="<?php echo esc_url_raw( $account_details['avatar_url'] ); ?>" title="<?php echo $account_details['username'] . ' ' . __( "Mailchimp avatar" , 'yikes-inc-easy-mailchimp-extender' ); ?>"> |
|
153 | + <img class="mailchimp-avatar" src="<?php echo esc_url_raw( $account_details[ 'avatar_url' ] ); ?>" title="<?php echo $account_details[ 'username' ] . ' ' . __( "Mailchimp avatar", 'yikes-inc-easy-mailchimp-extender' ); ?>"> |
|
154 | 154 | |
155 | 155 | <table class="form-table" id="account-details-table"> |
156 | 156 | <tr valign="top"> |
157 | 157 | <td scope="row"> |
158 | 158 | <label for="tablecell"> |
159 | - <strong><?php _e( 'Company' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> |
|
159 | + <strong><?php _e( 'Company', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> |
|
160 | 160 | </label> |
161 | 161 | </td> |
162 | - <td><?php echo $account_details['contact']['company']; ?><br /><?php echo $account_details['contact']['city'] . ', ' . $account_details['contact']['state']; ?></td> |
|
162 | + <td><?php echo $account_details[ 'contact' ][ 'company' ]; ?><br /><?php echo $account_details[ 'contact' ][ 'city' ] . ', ' . $account_details[ 'contact' ][ 'state' ]; ?></td> |
|
163 | 163 | </tr> |
164 | 164 | <tr valign="top"> |
165 | 165 | <td scope="row"> |
166 | 166 | <label for="tablecell"> |
167 | - <strong><?php _e( 'Industry' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> |
|
167 | + <strong><?php _e( 'Industry', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> |
|
168 | 168 | </label> |
169 | 169 | </td> |
170 | - <td><?php echo $account_details['account_industry']; ?></td> |
|
170 | + <td><?php echo $account_details[ 'account_industry' ]; ?></td> |
|
171 | 171 | </tr> |
172 | 172 | <tr valign="top"> |
173 | 173 | <td scope="row"> |
174 | 174 | <label for="tablecell"> |
175 | - <strong><?php _e( 'Member Since' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> |
|
175 | + <strong><?php _e( 'Member Since', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> |
|
176 | 176 | </label> |
177 | 177 | </td> |
178 | - <td><?php echo date( get_option('date_format') , strtotime( $account_details['member_since'] ) ); ?></td> |
|
178 | + <td><?php echo date( get_option( 'date_format' ), strtotime( $account_details[ 'member_since' ] ) ); ?></td> |
|
179 | 179 | </tr> |
180 | 180 | <tr valign="top"> |
181 | 181 | <td scope="row"> |
182 | 182 | <label for="tablecell"> |
183 | - <strong><?php _e( 'Plan Type' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> |
|
183 | + <strong><?php _e( 'Plan Type', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> |
|
184 | 184 | </label> |
185 | 185 | </td> |
186 | - <td><?php echo ucwords( $account_details['pricing_plan_type'] ); ?></td> |
|
186 | + <td><?php echo ucwords( $account_details[ 'pricing_plan_type' ] ); ?></td> |
|
187 | 187 | </tr> |
188 | 188 | </table> |
189 | 189 |