WP Subscribe - Version 1.2.13

Version Description

  • Fixed a security issue
Download this release

Release Info

Developer MyThemeShop
Plugin Icon 128x128 WP Subscribe
Version 1.2.13
Comparing to
See all releases

Code changes from version 1.2.12 to 1.2.13

Files changed (36) hide show
  1. .csscomb.json +332 -0
  2. .gitattributes +17 -0
  3. .jshintrc +48 -0
  4. Gruntfile.js +0 -69
  5. assets/css/wp-subscribe-form.css +0 -0
  6. assets/css/wp-subscribe-options.css +0 -0
  7. assets/js/jquery.cookie.js +0 -0
  8. assets/js/jquery.exitIntent.js +0 -0
  9. assets/js/magnificpopup.js +0 -0
  10. assets/js/wp-subscribe-admin.js +0 -0
  11. assets/js/wp-subscribe-form.js +0 -0
  12. assets/js/wp-subscribe-options.js +0 -0
  13. includes/class-wps-base.php +0 -0
  14. includes/subscription/class-wps-aweber.php +18 -3
  15. includes/subscription/class-wps-base.php +5 -0
  16. includes/subscription/class-wps-feedburner.php +13 -9
  17. includes/subscription/class-wps-mailchimp.php +4 -0
  18. includes/subscription/libs/aweber_api/aweber.php +0 -0
  19. includes/subscription/libs/aweber_api/aweber_api.php +0 -0
  20. includes/subscription/libs/aweber_api/aweber_collection.php +0 -0
  21. includes/subscription/libs/aweber_api/aweber_entry.php +0 -0
  22. includes/subscription/libs/aweber_api/aweber_entry_data_array.php +0 -0
  23. includes/subscription/libs/aweber_api/aweber_response.php +0 -0
  24. includes/subscription/libs/aweber_api/curl_object.php +0 -0
  25. includes/subscription/libs/aweber_api/curl_response.php +0 -0
  26. includes/subscription/libs/aweber_api/exceptions.php +0 -0
  27. includes/subscription/libs/aweber_api/oauth_adapter.php +0 -0
  28. includes/subscription/libs/aweber_api/oauth_application.php +0 -0
  29. includes/subscription/libs/mailchimp.php +0 -0
  30. includes/wps-functions-options.php +13 -13
  31. includes/wps-helpers.php +6 -7
  32. includes/wps-widget.php +118 -118
  33. languages/wp-subscribe.pot +117 -130
  34. package.json +0 -19
  35. readme.txt +5 -2
  36. wp-subscribe.php +5 -4
.csscomb.json ADDED
@@ -0,0 +1,332 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "exclude": [
3
+ ".git/**",
4
+ "node_modules/**",
5
+ "bower_components/**"
6
+ ],
7
+
8
+ "remove-empty-rulesets": true,
9
+ "always-semicolon": true,
10
+ "color-case": "lower",
11
+ "block-indent": " ",
12
+ "color-shorthand": true,
13
+ "element-case": "lower",
14
+ "eof-newline": false,
15
+ "leading-zero": false,
16
+ "quotes": "single",
17
+ "sort-order-fallback": "abc",
18
+ "space-before-colon": "",
19
+ "space-after-colon": " ",
20
+ "space-before-combinator": " ",
21
+ "space-after-combinator": " ",
22
+ "space-between-declarations": "\n",
23
+ "space-before-opening-brace": " ",
24
+ "space-after-opening-brace": "\n",
25
+ "space-after-selector-delimiter": "\n",
26
+ "space-before-selector-delimiter": "",
27
+ "space-before-closing-brace": "\n",
28
+ "strip-spaces": true,
29
+ "tab-size": true,
30
+ "unitless-zero": true,
31
+ "vendor-prefix-align": true,
32
+ "sort-order": [
33
+ [
34
+ "font",
35
+ "font-family",
36
+ "font-size",
37
+ "font-weight",
38
+ "font-style",
39
+ "font-variant",
40
+ "font-size-adjust",
41
+ "font-stretch",
42
+ "font-effect",
43
+ "font-emphasize",
44
+ "font-emphasize-position",
45
+ "font-emphasize-style",
46
+ "font-smooth",
47
+ "line-height"
48
+ ],
49
+ [
50
+ "position",
51
+ "z-index",
52
+ "top",
53
+ "right",
54
+ "bottom",
55
+ "left"
56
+ ],
57
+ [
58
+ "display",
59
+ "visibility",
60
+ "float",
61
+ "clear",
62
+ "overflow",
63
+ "overflow-x",
64
+ "overflow-y",
65
+ "-ms-overflow-x",
66
+ "-ms-overflow-y",
67
+ "clip",
68
+ "zoom",
69
+ "flex-direction",
70
+ "flex-order",
71
+ "flex-pack",
72
+ "flex-align"
73
+ ],
74
+ [
75
+ "-webkit-box-sizing",
76
+ "-moz-box-sizing",
77
+ "box-sizing",
78
+ "width",
79
+ "min-width",
80
+ "max-width",
81
+ "height",
82
+ "min-height",
83
+ "max-height",
84
+ "margin",
85
+ "margin-top",
86
+ "margin-right",
87
+ "margin-bottom",
88
+ "margin-left",
89
+ "padding",
90
+ "padding-top",
91
+ "padding-right",
92
+ "padding-bottom",
93
+ "padding-left"
94
+ ],
95
+ [
96
+ "table-layout",
97
+ "empty-cells",
98
+ "caption-side",
99
+ "border-spacing",
100
+ "border-collapse",
101
+ "list-style",
102
+ "list-style-position",
103
+ "list-style-type",
104
+ "list-style-image"
105
+ ],
106
+ [
107
+ "content",
108
+ "quotes",
109
+ "counter-reset",
110
+ "counter-increment",
111
+ "resize",
112
+ "cursor",
113
+ "-webkit-user-select",
114
+ "-moz-user-select",
115
+ "-ms-user-select",
116
+ "user-select",
117
+ "nav-index",
118
+ "nav-up",
119
+ "nav-right",
120
+ "nav-down",
121
+ "nav-left",
122
+ "-webkit-transition",
123
+ "-moz-transition",
124
+ "-ms-transition",
125
+ "-o-transition",
126
+ "transition",
127
+ "-webkit-transition-delay",
128
+ "-moz-transition-delay",
129
+ "-ms-transition-delay",
130
+ "-o-transition-delay",
131
+ "transition-delay",
132
+ "-webkit-transition-timing-function",
133
+ "-moz-transition-timing-function",
134
+ "-ms-transition-timing-function",
135
+ "-o-transition-timing-function",
136
+ "transition-timing-function",
137
+ "-webkit-transition-duration",
138
+ "-moz-transition-duration",
139
+ "-ms-transition-duration",
140
+ "-o-transition-duration",
141
+ "transition-duration",
142
+ "-webkit-transition-property",
143
+ "-moz-transition-property",
144
+ "-ms-transition-property",
145
+ "-o-transition-property",
146
+ "transition-property",
147
+ "-webkit-transform",
148
+ "-moz-transform",
149
+ "-ms-transform",
150
+ "-o-transform",
151
+ "transform",
152
+ "-webkit-transform-origin",
153
+ "-moz-transform-origin",
154
+ "-ms-transform-origin",
155
+ "-o-transform-origin",
156
+ "transform-origin",
157
+ "-webkit-animation",
158
+ "-moz-animation",
159
+ "-ms-animation",
160
+ "-o-animation",
161
+ "animation",
162
+ "-webkit-animation-name",
163
+ "-moz-animation-name",
164
+ "-ms-animation-name",
165
+ "-o-animation-name",
166
+ "animation-name",
167
+ "-webkit-animation-duration",
168
+ "-moz-animation-duration",
169
+ "-ms-animation-duration",
170
+ "-o-animation-duration",
171
+ "animation-duration",
172
+ "-webkit-animation-play-state",
173
+ "-moz-animation-play-state",
174
+ "-ms-animation-play-state",
175
+ "-o-animation-play-state",
176
+ "animation-play-state",
177
+ "-webkit-animation-timing-function",
178
+ "-moz-animation-timing-function",
179
+ "-ms-animation-timing-function",
180
+ "-o-animation-timing-function",
181
+ "animation-timing-function",
182
+ "-webkit-animation-delay",
183
+ "-moz-animation-delay",
184
+ "-ms-animation-delay",
185
+ "-o-animation-delay",
186
+ "animation-delay",
187
+ "-webkit-animation-iteration-count",
188
+ "-moz-animation-iteration-count",
189
+ "-ms-animation-iteration-count",
190
+ "-o-animation-iteration-count",
191
+ "animation-iteration-count",
192
+ "-webkit-animation-direction",
193
+ "-moz-animation-direction",
194
+ "-ms-animation-direction",
195
+ "-o-animation-direction",
196
+ "animation-direction",
197
+ "text-align",
198
+ "-webkit-text-align-last",
199
+ "-moz-text-align-last",
200
+ "-ms-text-align-last",
201
+ "text-align-last",
202
+ "vertical-align",
203
+ "white-space",
204
+ "text-decoration",
205
+ "text-emphasis",
206
+ "text-emphasis-color",
207
+ "text-emphasis-style",
208
+ "text-emphasis-position",
209
+ "text-indent",
210
+ "-ms-text-justify",
211
+ "text-justify",
212
+ "letter-spacing",
213
+ "word-spacing",
214
+ "-ms-writing-mode",
215
+ "text-outline",
216
+ "text-transform",
217
+ "text-wrap",
218
+ "text-overflow",
219
+ "-ms-text-overflow",
220
+ "text-overflow-ellipsis",
221
+ "text-overflow-mode",
222
+ "-ms-word-wrap",
223
+ "word-wrap",
224
+ "word-break",
225
+ "-ms-word-break",
226
+ "-moz-tab-size",
227
+ "-o-tab-size",
228
+ "tab-size",
229
+ "-webkit-hyphens",
230
+ "-moz-hyphens",
231
+ "hyphens",
232
+ "pointer-events"
233
+ ],
234
+ [
235
+ "opacity",
236
+ "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity",
237
+ "-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha",
238
+ "-ms-interpolation-mode",
239
+ "color",
240
+ "border",
241
+ "border-width",
242
+ "border-style",
243
+ "border-color",
244
+ "border-top",
245
+ "border-top-width",
246
+ "border-top-style",
247
+ "border-top-color",
248
+ "border-right",
249
+ "border-right-width",
250
+ "border-right-style",
251
+ "border-right-color",
252
+ "border-bottom",
253
+ "border-bottom-width",
254
+ "border-bottom-style",
255
+ "border-bottom-color",
256
+ "border-left",
257
+ "border-left-width",
258
+ "border-left-style",
259
+ "border-left-color",
260
+ "-webkit-border-radius",
261
+ "-moz-border-radius",
262
+ "border-radius",
263
+ "-webkit-border-top-left-radius",
264
+ "-moz-border-radius-topleft",
265
+ "border-top-left-radius",
266
+ "-webkit-border-top-right-radius",
267
+ "-moz-border-radius-topright",
268
+ "border-top-right-radius",
269
+ "-webkit-border-bottom-right-radius",
270
+ "-moz-border-radius-bottomright",
271
+ "border-bottom-right-radius",
272
+ "-webkit-border-bottom-left-radius",
273
+ "-moz-border-radius-bottomleft",
274
+ "border-bottom-left-radius",
275
+ "-webkit-border-image",
276
+ "-moz-border-image",
277
+ "-o-border-image",
278
+ "border-image",
279
+ "-webkit-border-image-source",
280
+ "-moz-border-image-source",
281
+ "-o-border-image-source",
282
+ "border-image-source",
283
+ "-webkit-border-image-slice",
284
+ "-moz-border-image-slice",
285
+ "-o-border-image-slice",
286
+ "border-image-slice",
287
+ "-webkit-border-image-width",
288
+ "-moz-border-image-width",
289
+ "-o-border-image-width",
290
+ "border-image-width",
291
+ "-webkit-border-image-outset",
292
+ "-moz-border-image-outset",
293
+ "-o-border-image-outset",
294
+ "border-image-outset",
295
+ "-webkit-border-image-repeat",
296
+ "-moz-border-image-repeat",
297
+ "-o-border-image-repeat",
298
+ "border-image-repeat",
299
+ "outline",
300
+ "outline-width",
301
+ "outline-style",
302
+ "outline-color",
303
+ "outline-offset",
304
+ "background",
305
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader",
306
+ "background-color",
307
+ "background-image",
308
+ "background-repeat",
309
+ "background-attachment",
310
+ "background-position",
311
+ "background-position-x",
312
+ "-ms-background-position-x",
313
+ "background-position-y",
314
+ "-ms-background-position-y",
315
+ "-webkit-background-clip",
316
+ "-moz-background-clip",
317
+ "background-clip",
318
+ "background-origin",
319
+ "-webkit-background-size",
320
+ "-moz-background-size",
321
+ "-o-background-size",
322
+ "background-size",
323
+ "box-decoration-break",
324
+ "-webkit-box-shadow",
325
+ "-moz-box-shadow",
326
+ "box-shadow",
327
+ "filter:progid:DXImageTransform.Microsoft.gradient",
328
+ "-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient",
329
+ "text-shadow"
330
+ ]
331
+ ]
332
+ }
.gitattributes ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
3
+
4
+ # Custom for Visual Studio
5
+ *.cs diff=csharp
6
+
7
+ # Standard to msysgit
8
+ *.doc diff=astextplain
9
+ *.DOC diff=astextplain
10
+ *.docx diff=astextplain
11
+ *.DOCX diff=astextplain
12
+ *.dot diff=astextplain
13
+ *.DOT diff=astextplain
14
+ *.pdf diff=astextplain
15
+ *.PDF diff=astextplain
16
+ *.rtf diff=astextplain
17
+ *.RTF diff=astextplain
.jshintrc ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ // Enforcing options
3
+ "curly": true,
4
+ "sub": true,
5
+ "eqeqeq": true,
6
+ "immed": true,
7
+ "laxbreak": true,
8
+ "indent": 4,
9
+ "latedef": true,
10
+ "newcap": true,
11
+ "nonbsp": true,
12
+ "strict": false,
13
+ "undef": true,
14
+ "unused": true,
15
+
16
+ // Environments
17
+ "browser": true,
18
+ "jquery": true,
19
+
20
+ "globals": {
21
+ "console": true,
22
+ "document": true,
23
+ "window": true,
24
+ "prompt": true,
25
+
26
+ // Libs
27
+ "_": false,
28
+ "Backbone": true,
29
+ "jQuery": true,
30
+ "gapi": true,
31
+ "FB": true,
32
+ "twttr": true,
33
+ "IN": true,
34
+
35
+ // Wordpress
36
+ "wp": true,
37
+ "tinyMCE": true,
38
+ "wpActiveEditor": true,
39
+ "ajaxurl": true,
40
+
41
+ // Atom
42
+ "ContentLocker": true,
43
+ "cl": true,
44
+ "__contentlocker": true,
45
+ "ControlBase": true,
46
+ "ControlSigninBase": true
47
+ }
48
+ }
Gruntfile.js DELETED
@@ -1,69 +0,0 @@
1
- module.exports = function(grunt) {
2
-
3
- // Project configuration.
4
- grunt.initConfig({
5
- pkg: grunt.file.readJSON('package.json'),
6
-
7
- // Generate POT files.
8
- makepot: {
9
- dist: {
10
- options: {
11
- type: 'wp-plugin',
12
- mainFile: 'wp-subscribe-pro.php',
13
- domainPath: 'languages',
14
- potHeaders: {
15
- 'report-msgid-bugs-to': 'https://community.mythemeshop.com/',
16
- 'language-team': 'MyThemeShop <support-team@mythemeshop.com>'
17
- },
18
- potFilename: 'wp-subscribe-pro.pot',
19
- exclude: [
20
- 'node_modules/.*'
21
- ]
22
- }
23
- }
24
- },
25
-
26
- // Check textdomain errors.
27
- checktextdomain: {
28
- options: {
29
- // Keywords specs wordpress
30
- keywords: [
31
- '__:1,2d',
32
- '_e:1,2d',
33
- '_x:1,2c,3d',
34
- 'esc_html__:1,2d',
35
- 'esc_html_e:1,2d',
36
- 'esc_html_x:1,2c,3d',
37
- 'esc_attr__:1,2d',
38
- 'esc_attr_e:1,2d',
39
- 'esc_attr_x:1,2c,3d',
40
- '_ex:1,2c,3d',
41
- '_n:1,2,4d',
42
- '_nx:1,2,4c,5d',
43
- '_n_noop:1,2,3d',
44
- '_nx_noop:1,2,3c,4d'
45
- ]
46
- },
47
-
48
- plugin: {
49
- //cwd: '/',
50
- src: ['**/*.php', '!node_modules/**'],
51
- expand: true,
52
- options: {
53
- text_domain: ['wp-subscribe']
54
- }
55
- }
56
- }
57
- });
58
-
59
- // Default task(s).
60
- grunt.registerTask('default', [
61
- 'checktextdomain', 'makepot'
62
- ]);
63
-
64
- // Load the plugin that provides the tasks.
65
- grunt.loadNpmTasks( 'grunt-wp-i18n' );
66
-
67
- // Quality Assurance
68
- grunt.loadNpmTasks( 'grunt-checktextdomain' );
69
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/wp-subscribe-form.css CHANGED
File without changes
assets/css/wp-subscribe-options.css CHANGED
File without changes
assets/js/jquery.cookie.js CHANGED
File without changes
assets/js/jquery.exitIntent.js CHANGED
File without changes
assets/js/magnificpopup.js CHANGED
File without changes
assets/js/wp-subscribe-admin.js CHANGED
File without changes
assets/js/wp-subscribe-form.js CHANGED
File without changes
assets/js/wp-subscribe-options.js CHANGED
File without changes
includes/class-wps-base.php CHANGED
File without changes
includes/subscription/class-wps-aweber.php CHANGED
@@ -2,6 +2,11 @@
2
  /**
3
  * Aweber Subscription
4
  */
 
 
 
 
 
5
  class WPS_Subscription_Aweber extends WPS_Subscription_Base {
6
 
7
  /**
@@ -217,8 +222,18 @@ class WPS_Subscription_Aweber extends WPS_Subscription_Base {
217
  <strong><?php esc_html_e( 'To connect your Aweber account:', 'content-locker' ) ?></strong>
218
  <br />
219
  <ul>
220
- <li><?php printf( wp_kses_post( __( '<span>1.</span> <a href="%s" target="_blank">Click here</a> <span>to open the authorization page and log in.</span>', 'content-locker' ) ), 'https://auth.aweber.com/1.0/oauth/authorize_app/1afc783e' ) ?></li>
221
- <li><?php echo wp_kses_post( __( '<span>2.</span> Copy and paste the authorization code in the field below.', 'content-locker' ) ) ?></li>
 
 
 
 
 
 
 
 
 
 
222
  </ul>
223
 
224
  <textarea rows="4" cols="80"></textarea>
@@ -227,7 +242,7 @@ class WPS_Subscription_Aweber extends WPS_Subscription_Base {
227
  </div>
228
  <div class="alert alert-hint mb30 <?php echo empty( $instance['aweber_access_key'] ) ? ' hidden' : '' ?>">
229
  <p>
230
- <strong><?php _e( 'Your Aweber Account is connected.', 'content-locker' ) ?></strong>
231
  <?php echo wp_kses_post( __( '<a href="#" class="aweber_disconnect">Click here</a> <span>to disconnect.</span>', 'content-locker' ) ) ?>
232
  </p>
233
  </div>
2
  /**
3
  * Aweber Subscription
4
  */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
  class WPS_Subscription_Aweber extends WPS_Subscription_Base {
11
 
12
  /**
222
  <strong><?php esc_html_e( 'To connect your Aweber account:', 'content-locker' ) ?></strong>
223
  <br />
224
  <ul>
225
+ <li>
226
+ <?php
227
+ // Translators: %1$s is "1." and %2$s is is the URL to the Aweber authorization page.
228
+ printf( wp_kses_post( __( '%1$s <a href="%2$s" target="_blank">Click here</a> <span>to open the authorization page and log in.</span>', 'content-locker' ) ), '<span>1.</span>', 'https://auth.aweber.com/1.0/oauth/authorize_app/1afc783e' );
229
+ ?>
230
+ </li>
231
+ <li>
232
+ <?php
233
+ // Translators: %s is "2.".
234
+ printf( wp_kses_post( __( '%s Copy and paste the authorization code in the field below.', 'content-locker' ) ), '<span>2.</span>' );
235
+ ?>
236
+ </li>
237
  </ul>
238
 
239
  <textarea rows="4" cols="80"></textarea>
242
  </div>
243
  <div class="alert alert-hint mb30 <?php echo empty( $instance['aweber_access_key'] ) ? ' hidden' : '' ?>">
244
  <p>
245
+ <strong><?php esc_html_e( 'Your Aweber Account is connected.', 'content-locker' ) ?></strong>
246
  <?php echo wp_kses_post( __( '<a href="#" class="aweber_disconnect">Click here</a> <span>to disconnect.</span>', 'content-locker' ) ) ?>
247
  </p>
248
  </div>
includes/subscription/class-wps-base.php CHANGED
@@ -2,6 +2,11 @@
2
  /**
3
  * A class for subscription services
4
  */
 
 
 
 
 
5
  abstract class WPS_Subscription_Base {
6
 
7
  /**
2
  /**
3
  * A class for subscription services
4
  */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
  abstract class WPS_Subscription_Base {
11
 
12
  /**
includes/subscription/class-wps-feedburner.php CHANGED
@@ -3,29 +3,33 @@
3
  * FeedBurner Subscription
4
  */
5
 
 
 
 
 
6
  class WPS_Subscription_FeedBurner extends WPS_Subscription_Base {
7
 
8
- public function the_form( $id, $options ) {
9
  ?>
10
 
11
- <form action="https://feedburner.google.com/fb/a/mailverify?uri=<?php echo $options['feedburner_id'] ?>" method="post" class="wp-subscribe-form wp-subscribe-feedburner" id="wp-subscribe-form-<?php echo $id ?>" target="popupwindow">
12
 
13
  <input class="regular-text email-field" type="email" name="email" placeholder="<?php echo esc_attr( $options['email_placeholder'] ) ?>" required>
14
 
15
- <input type="hidden" name="uri" value="<?php echo $options['feedburner_id'] ?>">
16
 
17
  <input type="hidden" name="loc" value="en_US">
18
 
19
- <input type="hidden" name="form_type" value="<?php echo $options['form_type'] ?>">
20
 
21
- <input type="hidden" name="service" value="<?php echo $options['service'] ?>">
22
 
23
- <input type="hidden" name="widget" value="<?php echo isset( $options['widget_id'] ) ? $options['widget_id'] : '0'; ?>">
24
- <?php if( !empty( $options['consent_text'] ) ) : ?>
25
  <div class="wps-consent-wrapper">
26
  <label for="consent-field">
27
  <input class="consent-field" id="consent-field" type="checkbox" name="consent" required />
28
- <?php _e( $options['consent_text'] ) ?>
29
  </label>
30
  </div>
31
  <?php endif; ?>
@@ -43,7 +47,7 @@ class WPS_Subscription_FeedBurner extends WPS_Subscription_Base {
43
  'id' => 'feedburner_id',
44
  'name' => 'feedburner_id',
45
  'type' => 'text',
46
- 'title' => esc_html__( 'Feedburner ID', 'wp-subscribe' ),
47
  )
48
  );
49
 
3
  * FeedBurner Subscription
4
  */
5
 
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
  class WPS_Subscription_FeedBurner extends WPS_Subscription_Base {
11
 
12
+ public function the_form( $id, $options ) {
13
  ?>
14
 
15
+ <form action="https://feedburner.google.com/fb/a/mailverify?uri=<?php echo esc_attr( $options['feedburner_id'] ); ?>" method="post" class="wp-subscribe-form wp-subscribe-feedburner" id="wp-subscribe-form-<?php echo esc_attr( $id ); ?>" target="popupwindow">
16
 
17
  <input class="regular-text email-field" type="email" name="email" placeholder="<?php echo esc_attr( $options['email_placeholder'] ) ?>" required>
18
 
19
+ <input type="hidden" name="uri" value="<?php echo esc_attr( $options['feedburner_id'] ); ?>">
20
 
21
  <input type="hidden" name="loc" value="en_US">
22
 
23
+ <input type="hidden" name="form_type" value="<?php echo esc_attr( $options['form_type'] ); ?>">
24
 
25
+ <input type="hidden" name="service" value="<?php echo esc_attr( $options['service'] ); ?>">
26
 
27
+ <input type="hidden" name="widget" value="<?php echo isset( $options['widget_id'] ) ? esc_attr( $options['widget_id'] ) : '0'; ?>">
28
+ <?php if( ! empty( $options['consent_text'] ) ) : ?>
29
  <div class="wps-consent-wrapper">
30
  <label for="consent-field">
31
  <input class="consent-field" id="consent-field" type="checkbox" name="consent" required />
32
+ <?php echo wp_kses_post( $options['consent_text'] ); ?>
33
  </label>
34
  </div>
35
  <?php endif; ?>
47
  'id' => 'feedburner_id',
48
  'name' => 'feedburner_id',
49
  'type' => 'text',
50
+ 'title' => __( 'Feedburner ID', 'wp-subscribe' ),
51
  )
52
  );
53
 
includes/subscription/class-wps-mailchimp.php CHANGED
@@ -3,6 +3,10 @@
3
  * MailChimp Subscription
4
  */
5
 
 
 
 
 
6
  class WPS_Subscription_MailChimp extends WPS_Subscription_Base {
7
 
8
  public function init( $api_key ) {
3
  * MailChimp Subscription
4
  */
5
 
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
  class WPS_Subscription_MailChimp extends WPS_Subscription_Base {
11
 
12
  public function init( $api_key ) {
includes/subscription/libs/aweber_api/aweber.php CHANGED
File without changes
includes/subscription/libs/aweber_api/aweber_api.php CHANGED
File without changes
includes/subscription/libs/aweber_api/aweber_collection.php CHANGED
File without changes
includes/subscription/libs/aweber_api/aweber_entry.php CHANGED
File without changes
includes/subscription/libs/aweber_api/aweber_entry_data_array.php CHANGED
File without changes
includes/subscription/libs/aweber_api/aweber_response.php CHANGED
File without changes
includes/subscription/libs/aweber_api/curl_object.php CHANGED
File without changes
includes/subscription/libs/aweber_api/curl_response.php CHANGED
File without changes
includes/subscription/libs/aweber_api/exceptions.php CHANGED
File without changes
includes/subscription/libs/aweber_api/oauth_adapter.php CHANGED
File without changes
includes/subscription/libs/aweber_api/oauth_application.php CHANGED
File without changes
includes/subscription/libs/mailchimp.php CHANGED
File without changes
includes/wps-functions-options.php CHANGED
@@ -6,30 +6,30 @@
6
  /**
7
  * Get mailing services
8
  *
9
- * @use filter wp_subscribe_mailing_services
10
  * @return array
11
  */
12
  function wps_get_mailing_services( $type = 'raw' ) {
13
 
14
  $services = array(
15
 
16
- 'aweber' => array(
17
- 'title' => esc_html__( 'Aweber', 'wp-subscribe' ),
18
- 'description' => esc_html__( 'Adds subscribers to your Aweber account.', 'wp-subscribe' ),
19
- 'class' => 'WPS_Subscription_Aweber'
20
- ),
21
 
22
  'feedburner' => array(
23
- 'title' => esc_html__( 'FeedBurner', 'wp-subscribe' ),
24
- 'description' => esc_html__( 'Adds subscribers to your FeedBurner account.', 'wp-subscribe' ),
25
- 'class' => 'WPS_Subscription_FeedBurner'
26
- ),
27
 
28
  'mailchimp' => array(
29
- 'title' => esc_html__( 'MailChimp', 'wp-subscribe' ),
30
- 'description' => esc_html__( 'Adds subscribers to your MailChimp account.', 'wp-subscribe' ),
31
  'class' => 'WPS_Subscription_MailChimp'
32
- )
33
  );
34
 
35
  $services = apply_filters( 'wp_subscribe_mailing_services', $services );
6
  /**
7
  * Get mailing services
8
  *
9
+ * @use filter wp_subscribe_mailing_services
10
  * @return array
11
  */
12
  function wps_get_mailing_services( $type = 'raw' ) {
13
 
14
  $services = array(
15
 
16
+ 'aweber' => array(
17
+ 'title' => __( 'Aweber', 'wp-subscribe' ),
18
+ 'description' => __( 'Adds subscribers to your Aweber account.', 'wp-subscribe' ),
19
+ 'class' => 'WPS_Subscription_Aweber'
20
+ ),
21
 
22
  'feedburner' => array(
23
+ 'title' => __( 'FeedBurner', 'wp-subscribe' ),
24
+ 'description' => __( 'Adds subscribers to your FeedBurner account.', 'wp-subscribe' ),
25
+ 'class' => 'WPS_Subscription_FeedBurner'
26
+ ),
27
 
28
  'mailchimp' => array(
29
+ 'title' => __( 'MailChimp', 'wp-subscribe' ),
30
+ 'description' => __( 'Adds subscribers to your MailChimp account.', 'wp-subscribe' ),
31
  'class' => 'WPS_Subscription_MailChimp'
32
+ )
33
  );
34
 
35
  $services = apply_filters( 'wp_subscribe_mailing_services', $services );
includes/wps-helpers.php CHANGED
@@ -30,12 +30,12 @@ function wps_the_form( $options = null ) {
30
  $current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) );
31
  ?>
32
  <?php if( isset( $options['before_widget'] ) ) : ?>
33
- <?php echo $options['before_widget'] ?>
34
  <?php else: ?>
35
  <div class="wp-subscribe-popup-form-wrapper">
36
  <?php endif; ?>
37
 
38
- <div id="wp-subscribe" class="wp-subscribe-wrap wp-subscribe wp-subscribe-<?php echo $wp_subscribe_forms ?>" data-thanks_page="<?php echo absint( isset( $options['thanks_page'] ) ? $options['thanks_page'] : 0 ) ?>" data-thanks_page_url="<?php echo isset( $options['thanks_page_url'] ) ? esc_url( $options['thanks_page_url'] ) : '' ?>" data-thanks_page_new_window="0">
39
 
40
  <h4 class="title"><?php echo wp_kses_post( $options['title'] )?></h4>
41
 
@@ -63,9 +63,8 @@ function wps_the_form( $options = null ) {
63
  <div class="wps-consent-wrapper">
64
  <label for="consent-field">
65
  <input class="consent-field" id="consent-field" type="checkbox" name="consent" required>
66
- <?php _e( $options['consent_text'] ); ?>
67
  </label>
68
- </div>
69
  <?php endif; ?>
70
  <input class="submit" type="submit" name="submit" value="<?php echo esc_attr( $options['button_text'] ); ?>">
71
 
@@ -91,12 +90,12 @@ function wps_the_form( $options = null ) {
91
 
92
  <div class="clear"></div>
93
 
94
- <p class="footer-text"><?php echo $options['footer_text'];?></p>
95
 
96
  </div>
97
 
98
  <?php if( isset( $options['after_widget'] ) ) : ?>
99
- <?php echo $options['after_widget'] ?>
100
  <?php else: ?>
101
  </div><!-- /form-wrapper -->
102
  <?php endif; ?>
@@ -194,7 +193,7 @@ function wps_field_text( $args = array() ) {
194
  'class' => 'widefat'
195
  ) ) );
196
  ?>
197
- <input class="<?php echo esc_attr( $class ) ?>" id="<?php echo esc_attr( $id ) ?>" name="<?php echo esc_attr( $name ) ?>" type="text" value="<?php echo esc_attr( $value ) ?>"<?php if( isset( $data_id ) ) { printf( 'data-id="%s"', $data_id ); } ?>>
198
  <?php
199
  }
200
 
30
  $current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) );
31
  ?>
32
  <?php if( isset( $options['before_widget'] ) ) : ?>
33
+ <?php echo wp_kses_post( $options['before_widget'] ); ?>
34
  <?php else: ?>
35
  <div class="wp-subscribe-popup-form-wrapper">
36
  <?php endif; ?>
37
 
38
+ <div id="wp-subscribe" class="wp-subscribe-wrap wp-subscribe wp-subscribe-<?php echo esc_attr( $wp_subscribe_forms ); ?>" data-thanks_page="<?php echo absint( isset( $options['thanks_page'] ) ? $options['thanks_page'] : 0 ) ?>" data-thanks_page_url="<?php echo isset( $options['thanks_page_url'] ) ? esc_url( $options['thanks_page_url'] ) : '' ?>" data-thanks_page_new_window="0">
39
 
40
  <h4 class="title"><?php echo wp_kses_post( $options['title'] )?></h4>
41
 
63
  <div class="wps-consent-wrapper">
64
  <label for="consent-field">
65
  <input class="consent-field" id="consent-field" type="checkbox" name="consent" required>
66
+ <?php echo wp_kses_post( $options['consent_text'] ); ?>
67
  </label>
 
68
  <?php endif; ?>
69
  <input class="submit" type="submit" name="submit" value="<?php echo esc_attr( $options['button_text'] ); ?>">
70
 
90
 
91
  <div class="clear"></div>
92
 
93
+ <p class="footer-text"><?php echo wp_kses_post( $options['footer_text'] );?></p>
94
 
95
  </div>
96
 
97
  <?php if( isset( $options['after_widget'] ) ) : ?>
98
+ <?php echo wp_kses_post( $options['after_widget'] ); ?>
99
  <?php else: ?>
100
  </div><!-- /form-wrapper -->
101
  <?php endif; ?>
193
  'class' => 'widefat'
194
  ) ) );
195
  ?>
196
+ <input class="<?php echo esc_attr( $class ) ?>" id="<?php echo esc_attr( $id ) ?>" name="<?php echo esc_attr( $name ) ?>" type="text" value="<?php echo esc_attr( $value ) ?>"<?php if( isset( $data_id ) ) { printf( 'data-id="%s"', esc_attr( $data_id ) ); } ?>>
197
  <?php
198
  }
199
 
includes/wps-widget.php CHANGED
@@ -4,38 +4,40 @@
4
  * The WP Subscribe widget class
5
  */
6
 
7
- if( ! class_exists('wp_subscribe') ) :
 
 
8
 
9
  class wp_subscribe extends WP_Widget {
10
 
11
  /**
12
  * The Constructor
13
  */
14
- public function __construct() {
15
 
16
- add_action( 'wp_enqueue_scripts', array( &$this, 'register_scripts' ) );
17
- add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
18
- add_action( 'customize_controls_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
19
 
20
- // Widget settings
21
- $widget_ops = array(
22
- 'classname' => 'wp_subscribe',
23
- 'description' => esc_html__( 'Displays subscription form, supports FeedBurner, MailChimp & AWeber.', 'wp-subscribe' )
24
  );
25
 
26
- // Widget control settings
27
- $control_ops = array(
28
  'id_base' => 'wp_subscribe'
29
  );
30
 
31
- // Create the widget.
32
- parent::__construct(
33
  'wp_subscribe',
34
  esc_html__( 'WP Subscribe Widget', 'wp-subscribe' ),
35
  $widget_ops,
36
  $control_ops
37
  );
38
- }
39
 
40
  /**
41
  * Get default values for widget
@@ -45,46 +47,47 @@ class wp_subscribe extends WP_Widget {
45
 
46
  return apply_filters( 'wp_subscribe_form_defaults', array(
47
  'service' => 'feedburner',
48
- 'include_name_field' => false,
49
-
50
- 'title' => esc_html__( 'Get more stuff', 'wp-subscribe' ),
51
- 'text' => esc_html__( 'Subscribe to our mailing list and get interesting stuff and updates to your email inbox.', 'wp-subscribe' ),
52
- 'email_placeholder' => esc_html__( 'Enter your email here', 'wp-subscribe' ),
53
- 'consent_text' => esc_html__( 'I consent to my submitted data being collected via this form*', 'wp-subscribe' ),
54
- 'name_placeholder' => esc_html__( 'Enter your name here', 'wp-subscribe' ),
55
- 'button_text' => esc_html__( 'Sign Up Now', 'wp-subscribe' ),
56
- 'success_message' => esc_html__( 'Thank you for subscribing.', 'wp-subscribe' ),
57
- 'error_message' => esc_html__( 'Something went wrong.', 'wp-subscribe' ),
58
- 'footer_text' => esc_html__( 'we respect your privacy and take protecting it seriously', 'wp-subscribe' )
59
- ));
60
- }
61
 
62
  /**
63
  * Register scripts and json to be used in plugin
64
  * @return void
65
  */
66
- function register_scripts() {
67
 
68
- wp_register_style( 'wp-subscribe', wps()->plugin_url() . '/assets/css/wp-subscribe-form.css' );
69
- wp_register_script( 'wp-subscribe', wps()->plugin_url() . '/assets/js/wp-subscribe-form.js', array( 'jquery' ) );
70
 
71
- wp_localize_script( 'wp-subscribe', 'wp_subscribe', array(
72
  'ajaxurl' => admin_url( 'admin-ajax.php' )
73
  ) );
74
- }
75
 
76
  /**
77
  * Enqueue script for specific screens only
78
  * @return void
79
  */
80
- function enqueue_scripts() {
81
- $screen = get_current_screen();
82
- $current_filter = current_filter();
83
- if ( 'widgets' === $screen->id || 'customize_controls_enqueue_scripts' === $current_filter ) {
84
- wp_enqueue_style( 'wp-subscribe-options', wps()->plugin_url() . '/assets/css/wp-subscribe-options.css' );
85
- }
86
- wp_enqueue_script( 'wp-subscribe-admin', wps()->plugin_url() . '/assets/js/wp-subscribe-admin.js', array( 'jquery' ) );
87
- }
 
88
 
89
  /**
90
  * Display widget
@@ -92,10 +95,10 @@ class wp_subscribe extends WP_Widget {
92
  * @param array $instance
93
  * @return void
94
  */
95
- function widget( $args, $instance ) {
96
 
97
  extract( $args );
98
- $instance = wp_parse_args( (array) $instance, $this->get_defaults() );
99
 
100
  $instance['before_widget'] = $before_widget;
101
  $instance['after_widget'] = $after_widget;
@@ -103,7 +106,7 @@ class wp_subscribe extends WP_Widget {
103
  $instance['form_type'] = 'widget';
104
 
105
  wps_the_form( $instance );
106
- }
107
 
108
  /**
109
  * Update widget
@@ -113,18 +116,18 @@ class wp_subscribe extends WP_Widget {
113
  *
114
  * @return array
115
  */
116
- function update( $new_instance, $old_instance ) {
117
 
118
  $instance = $old_instance;
119
- $instance = array_merge( $instance, $new_instance );
120
 
121
- // Feedburner ID -- make sure the user didn't insert full url
122
- if( isset( $instance['feedburner_id'] ) && 0 === strpos( $instance['feedburner_id'], 'http' ) ) {
123
  $instance['feedburner_id'] = substr( $instance['feedburner_id'], strrpos( $instance['feedburner_id'], '/' ) + 1 );
124
  }
125
 
126
- return $instance;
127
- }
128
 
129
  /**
130
  * Display widget form
@@ -132,15 +135,15 @@ class wp_subscribe extends WP_Widget {
132
  * @param array $instance
133
  * @return void
134
  */
135
- function form( $instance ) {
136
 
137
  $instance = wp_parse_args( (array) $instance, $this->get_defaults() );
138
  $services = wps_get_mailing_services('options');
139
- ?>
140
- <div class="wp_subscribe_options_form">
141
 
142
- <!-- Hidden title field to prevent WP picking up Title Color field as widget title -->
143
- <input type="hidden" value="" id="<?php echo $this->get_field_id('title') ?>" name="<?php echo $this->get_field_name('title') ?>">
144
 
145
  <?php $this->field_select(array(
146
  'id' => 'service',
@@ -151,7 +154,7 @@ class wp_subscribe extends WP_Widget {
151
  'class' => 'services_dropdown'
152
  )); ?>
153
 
154
- <div class="wp_subscribe_account_details">
155
 
156
  <?php foreach( $services as $service_id => $service_name ): ?>
157
  <div class="wps-account-details wp_subscribe_account_details_<?php echo esc_attr( $service_id ) ?>" data-service="<?php echo esc_attr( $service_id ) ?>" style="display: none;">
@@ -162,23 +165,23 @@ class wp_subscribe extends WP_Widget {
162
  </div><!-- /wp_subscribe_account_details_<?php echo esc_attr( $service_id ) ?> -->
163
  <?php endforeach; ?>
164
 
165
- </div><!-- .wp_subscribe_account_details -->
166
 
167
- <p class="wp_subscribe_include_name">
168
 
169
- <label for="<?php echo $this->get_field_id('include_name_field') ?>">
170
- <input type="hidden" name="<?php echo $this->get_field_name('include_name_field'); ?>" value="0">
171
- <input id="<?php echo $this->get_field_id('include_name_field'); ?>" type="checkbox" class="include-name-field" name="<?php echo $this->get_field_name('include_name_field'); ?>" value="1" <?php checked($instance['include_name_field']); ?>>
172
- <?php echo wp_kses_post( __( 'Include <strong>Name</strong> field', 'wp-subscribe' ) ) ?>
173
- </label>
174
 
175
  </p>
176
 
177
- <h4 class="wp_subscribe_labels_header">
178
- <a class="wp-subscribe-toggle" href="#" rel="wp_subscribe_labels"><?php _e('Labels', 'wp-subscribe'); ?></a>
179
  </h4>
180
 
181
- <div class="wp_subscribe_labels" style="display: none;">
182
 
183
  <?php
184
 
@@ -244,48 +247,47 @@ class wp_subscribe extends WP_Widget {
244
  'title' => esc_html( 'Footer Text', 'wp-subscribe' ),
245
  'value' => $instance['footer_text']
246
  ));
247
- ?>
248
-
249
- </div><!-- .wp_subscribe_labels -->
250
 
251
- </div><!-- .wp_subscribe_options_form -->
252
- <?php
253
- }
254
 
255
- // -------------------------- FIELD HELPRES ----------------------
 
 
256
 
257
- public function field_textarea( $args = array() ) {
258
 
 
259
  extract( $args );
260
  ?>
261
- <p class="wp-subscribe-label-field wp-subscribe-<?php echo $id; ?>-field">
262
- <label for="<?php echo $this->get_field_id($id) ?>">
263
- <?php echo $title ?>
264
- </label>
265
 
266
- <textarea class="widefat" id="<?php echo $this->get_field_id($id) ?>" name="<?php echo $this->get_field_name($id) ?>"><?php echo esc_textarea( $value ) ?></textarea>
267
- </p>
268
 
269
- <?php
270
- }
271
 
272
  public function field_text( $args = array() ) {
273
 
274
  extract( $args );
275
  ?>
276
- <div class="wp-subscribe-label-field wp-subscribe-<?php echo $id; ?>-field">
277
- <label for="<?php echo $this->get_field_id( $id ) ?>">
278
- <?php echo esc_html( $title ) ?>
279
- </label>
280
 
281
  <div class="wps-input-wrapper">
282
 
283
  <?php wps_field_text(array(
284
- 'id' => $this->get_field_id( $id ),
285
- 'name' => $this->get_field_name( $id ),
286
- 'value' => $value,
287
  'data_id' => $id
288
- )) ?>
289
 
290
  <?php if( isset( $link ) ) {
291
  printf( ' <a target="_blank" href="%s" class="button">%s</a>', esc_url( $link ), esc_html__( 'Click here', 'wp-subscribe' ) );
@@ -297,40 +299,40 @@ class wp_subscribe extends WP_Widget {
297
 
298
  </div>
299
 
300
- </div>
301
- <?php
302
- }
303
 
304
  public function field_hidden( $args = array() ) {
305
 
306
  extract( $args );
307
 
308
  wps_field_hidden(array(
309
- 'id' => $this->get_field_id( $id ),
310
- 'name' => $this->get_field_name( $id ),
311
- 'value' => $value,
312
  'data_id' => $id
313
  ));
314
- }
315
 
316
  public function field_raw( $args = array() ) {
317
 
318
  call_user_func_array( $args['content'], array( $args['value'] ) );
319
- }
320
 
321
  public function field_checkbox( $args = array() ) {
322
 
323
  extract( $args );
324
  ?>
325
- <div class="wp-subscribe-<?php echo $id; ?>-field">
326
 
327
- <label for="<?php echo $this->get_field_id( $id ) ?>">
328
 
329
- <input type="hidden" name="<?php echo $this->get_field_name( $id ) ?>" value="0" data-id="<?php echo $this->get_field_id( $id ) ?>">
330
 
331
- <input type="checkbox" id="<?php echo $this->get_field_id( $id ) ?>" name="<?php echo $this->get_field_name( $id ) ?>" value="1"<?php checked( $value ) ?> data-id="<?php echo $id ?>">
332
 
333
- <?php echo esc_html($title) ?>
334
 
335
  </label>
336
 
@@ -338,24 +340,24 @@ class wp_subscribe extends WP_Widget {
338
  <?php
339
  }
340
 
341
- public function field_select( $args = array() ) {
342
 
343
  $options = array();
344
  extract( $args );
345
- ?>
346
 
347
- <div class="wp-subscribe-label-field wp-subscribe-<?php echo $id ?>-field">
348
- <label for="<?php echo $this->get_field_id( $id ) ?>">
349
- <?php echo esc_html( $title ) ?>
350
- </label>
351
 
352
  <div class="wps-input-wrapper">
353
  <?php wps_field_select(array(
354
- 'id' => $this->get_field_id( $id ),
355
- 'name' => $this->get_field_name( $id ),
356
- 'value' => $value,
357
  'options' => $options,
358
- 'class' => 'widefat list-selectbox'
359
  )) ?>
360
 
361
  <?php if( isset( $is_list ) && $is_list ) {
@@ -372,10 +374,10 @@ class wp_subscribe extends WP_Widget {
372
 
373
  </div>
374
 
375
- </div>
376
 
377
- <?php
378
- }
379
  }
380
 
381
  /**
@@ -384,7 +386,5 @@ class wp_subscribe extends WP_Widget {
384
  */
385
  add_action( 'widgets_init', 'wps_register_widget' );
386
  function wps_register_widget() {
387
- register_widget( 'wp_subscribe' );
388
  }
389
-
390
- endif;
4
  * The WP Subscribe widget class
5
  */
6
 
7
+ if ( ! defined( 'ABSPATH' ) ) {
8
+ exit;
9
+ }
10
 
11
  class wp_subscribe extends WP_Widget {
12
 
13
  /**
14
  * The Constructor
15
  */
16
+ public function __construct() {
17
 
18
+ add_action( 'wp_enqueue_scripts', array( &$this, 'register_scripts' ) );
19
+ add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
20
+ add_action( 'customize_controls_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
21
 
22
+ // Widget settings
23
+ $widget_ops = array(
24
+ 'classname' => 'wp_subscribe',
25
+ 'description' => esc_html__( 'Displays subscription form, supports FeedBurner, MailChimp & AWeber.', 'wp-subscribe' )
26
  );
27
 
28
+ // Widget control settings
29
+ $control_ops = array(
30
  'id_base' => 'wp_subscribe'
31
  );
32
 
33
+ // Create the widget.
34
+ parent::__construct(
35
  'wp_subscribe',
36
  esc_html__( 'WP Subscribe Widget', 'wp-subscribe' ),
37
  $widget_ops,
38
  $control_ops
39
  );
40
+ }
41
 
42
  /**
43
  * Get default values for widget
47
 
48
  return apply_filters( 'wp_subscribe_form_defaults', array(
49
  'service' => 'feedburner',
50
+ 'include_name_field' => false,
51
+
52
+ 'title' => __( 'Get more stuff', 'wp-subscribe' ),
53
+ 'text' => __( 'Subscribe to our mailing list and get interesting stuff and updates to your email inbox.', 'wp-subscribe' ),
54
+ 'email_placeholder' => __( 'Enter your email here', 'wp-subscribe' ),
55
+ 'consent_text' => __( 'I consent to my submitted data being collected via this form*', 'wp-subscribe' ),
56
+ 'name_placeholder' => __( 'Enter your name here', 'wp-subscribe' ),
57
+ 'button_text' => __( 'Sign Up Now', 'wp-subscribe' ),
58
+ 'success_message' => __( 'Thank you for subscribing.', 'wp-subscribe' ),
59
+ 'error_message' => __( 'Something went wrong.', 'wp-subscribe' ),
60
+ 'footer_text' => __( 'we respect your privacy and take protecting it seriously', 'wp-subscribe' )
61
+ ));
62
+ }
63
 
64
  /**
65
  * Register scripts and json to be used in plugin
66
  * @return void
67
  */
68
+ function register_scripts() {
69
 
70
+ wp_register_style( 'wp-subscribe', wps()->plugin_url() . '/assets/css/wp-subscribe-form.css' );
71
+ wp_register_script( 'wp-subscribe', wps()->plugin_url() . '/assets/js/wp-subscribe-form.js', array( 'jquery' ) );
72
 
73
+ wp_localize_script( 'wp-subscribe', 'wp_subscribe', array(
74
  'ajaxurl' => admin_url( 'admin-ajax.php' )
75
  ) );
76
+ }
77
 
78
  /**
79
  * Enqueue script for specific screens only
80
  * @return void
81
  */
82
+ function enqueue_scripts() {
83
+ $screen = get_current_screen();
84
+ $current_filter = current_filter();
85
+ if ( 'widgets' === $screen->id || 'customize_controls_enqueue_scripts' === $current_filter ) {
86
+ wp_enqueue_style( 'wp-subscribe-options', wps()->plugin_url() . '/assets/css/wp-subscribe-options.css' );
87
+ }
88
+
89
+ wp_enqueue_script( 'wp-subscribe-admin', wps()->plugin_url() . '/assets/js/wp-subscribe-admin.js', array( 'jquery' ) );
90
+ }
91
 
92
  /**
93
  * Display widget
95
  * @param array $instance
96
  * @return void
97
  */
98
+ function widget( $args, $instance ) {
99
 
100
  extract( $args );
101
+ $instance = wp_parse_args( (array) $instance, $this->get_defaults() );
102
 
103
  $instance['before_widget'] = $before_widget;
104
  $instance['after_widget'] = $after_widget;
106
  $instance['form_type'] = 'widget';
107
 
108
  wps_the_form( $instance );
109
+ }
110
 
111
  /**
112
  * Update widget
116
  *
117
  * @return array
118
  */
119
+ function update( $new_instance, $old_instance ) {
120
 
121
  $instance = $old_instance;
122
+ $instance = array_merge( $instance, $new_instance );
123
 
124
+ // Feedburner ID -- make sure the user didn't insert full url
125
+ if( isset( $instance['feedburner_id'] ) && 0 === strpos( $instance['feedburner_id'], 'http' ) ) {
126
  $instance['feedburner_id'] = substr( $instance['feedburner_id'], strrpos( $instance['feedburner_id'], '/' ) + 1 );
127
  }
128
 
129
+ return $instance;
130
+ }
131
 
132
  /**
133
  * Display widget form
135
  * @param array $instance
136
  * @return void
137
  */
138
+ function form( $instance ) {
139
 
140
  $instance = wp_parse_args( (array) $instance, $this->get_defaults() );
141
  $services = wps_get_mailing_services('options');
142
+ ?>
143
+ <div class="wp_subscribe_options_form">
144
 
145
+ <!-- Hidden title field to prevent WP picking up Title Color field as widget title -->
146
+ <input type="hidden" value="" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>">
147
 
148
  <?php $this->field_select(array(
149
  'id' => 'service',
154
  'class' => 'services_dropdown'
155
  )); ?>
156
 
157
+ <div class="wp_subscribe_account_details">
158
 
159
  <?php foreach( $services as $service_id => $service_name ): ?>
160
  <div class="wps-account-details wp_subscribe_account_details_<?php echo esc_attr( $service_id ) ?>" data-service="<?php echo esc_attr( $service_id ) ?>" style="display: none;">
165
  </div><!-- /wp_subscribe_account_details_<?php echo esc_attr( $service_id ) ?> -->
166
  <?php endforeach; ?>
167
 
168
+ </div><!-- .wp_subscribe_account_details -->
169
 
170
+ <p class="wp_subscribe_include_name">
171
 
172
+ <label for="<?php echo esc_attr( $this->get_field_id('include_name_field') ); ?>">
173
+ <input type="hidden" name="<?php echo esc_attr( $this->get_field_name('include_name_field') ); ?>" value="0">
174
+ <input id="<?php echo esc_attr( $this->get_field_id('include_name_field') ); ?>" type="checkbox" class="include-name-field" name="<?php echo esc_attr( $this->get_field_name('include_name_field') ); ?>" value="1" <?php checked($instance['include_name_field']); ?>>
175
+ <?php echo wp_kses_post( __( 'Include <strong>Name</strong> field', 'wp-subscribe' ) ) ?>
176
+ </label>
177
 
178
  </p>
179
 
180
+ <h4 class="wp_subscribe_labels_header">
181
+ <a class="wp-subscribe-toggle" href="#" rel="wp_subscribe_labels"><?php esc_html_e('Labels', 'wp-subscribe'); ?></a>
182
  </h4>
183
 
184
+ <div class="wp_subscribe_labels" style="display: none;">
185
 
186
  <?php
187
 
247
  'title' => esc_html( 'Footer Text', 'wp-subscribe' ),
248
  'value' => $instance['footer_text']
249
  ));
250
+ ?>
 
 
251
 
252
+ </div><!-- .wp_subscribe_labels -->
 
 
253
 
254
+ </div><!-- .wp_subscribe_options_form -->
255
+ <?php
256
+ }
257
 
258
+ // -------------------------- FIELD HELPERS --------------------------
259
 
260
+ public function field_textarea( $args = array() ) {
261
  extract( $args );
262
  ?>
263
+ <p class="wp-subscribe-label-field wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
264
+ <label for="<?php echo esc_attr( $this->get_field_id($id) ); ?>">
265
+ <?php echo wp_kses_post( $title ); ?>
266
+ </label>
267
 
268
+ <textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id($id) ); ?>" name="<?php echo esc_attr( $this->get_field_name($id) ); ?>"><?php echo esc_textarea( $value ) ?></textarea>
269
+ </p>
270
 
271
+ <?php
272
+ }
273
 
274
  public function field_text( $args = array() ) {
275
 
276
  extract( $args );
277
  ?>
278
+ <div class="wp-subscribe-label-field wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
279
+ <label for="<?php echo esc_attr( $this->get_field_id( $id ) ) ?>">
280
+ <?php echo esc_html( $title ) ?>
281
+ </label>
282
 
283
  <div class="wps-input-wrapper">
284
 
285
  <?php wps_field_text(array(
286
+ 'id' => $this->get_field_id( $id ),
287
+ 'name' => $this->get_field_name( $id ),
288
+ 'value' => $value,
289
  'data_id' => $id
290
+ ) ); ?>
291
 
292
  <?php if( isset( $link ) ) {
293
  printf( ' <a target="_blank" href="%s" class="button">%s</a>', esc_url( $link ), esc_html__( 'Click here', 'wp-subscribe' ) );
299
 
300
  </div>
301
 
302
+ </div>
303
+ <?php
304
+ }
305
 
306
  public function field_hidden( $args = array() ) {
307
 
308
  extract( $args );
309
 
310
  wps_field_hidden(array(
311
+ 'id' => $this->get_field_id( $id ),
312
+ 'name' => $this->get_field_name( $id ),
313
+ 'value' => $value,
314
  'data_id' => $id
315
  ));
316
+ }
317
 
318
  public function field_raw( $args = array() ) {
319
 
320
  call_user_func_array( $args['content'], array( $args['value'] ) );
321
+ }
322
 
323
  public function field_checkbox( $args = array() ) {
324
 
325
  extract( $args );
326
  ?>
327
+ <div class="wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
328
 
329
+ <label for="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>">
330
 
331
+ <input type="hidden" name="<?php echo esc_attr( $this->get_field_name( $id ) ); ?>" value="0" data-id="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>">
332
 
333
+ <input type="checkbox" id="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( $id ) ); ?>" value="1"<?php checked( $value ) ?> data-id="<?php echo esc_attr( $id ); ?>">
334
 
335
+ <?php echo esc_html( $title ); ?>
336
 
337
  </label>
338
 
340
  <?php
341
  }
342
 
343
+ public function field_select( $args = array() ) {
344
 
345
  $options = array();
346
  extract( $args );
347
+ ?>
348
 
349
+ <div class="wp-subscribe-label-field wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
350
+ <label for="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>">
351
+ <?php echo esc_html( $title ) ?>
352
+ </label>
353
 
354
  <div class="wps-input-wrapper">
355
  <?php wps_field_select(array(
356
+ 'id' => $this->get_field_id( $id ),
357
+ 'name' => $this->get_field_name( $id ),
358
+ 'value' => $value,
359
  'options' => $options,
360
+ 'class' => 'widefat list-selectbox'
361
  )) ?>
362
 
363
  <?php if( isset( $is_list ) && $is_list ) {
374
 
375
  </div>
376
 
377
+ </div>
378
 
379
+ <?php
380
+ }
381
  }
382
 
383
  /**
386
  */
387
  add_action( 'widgets_init', 'wps_register_widget' );
388
  function wps_register_widget() {
389
+ register_widget( 'wp_subscribe' );
390
  }
 
 
languages/wp-subscribe.pot CHANGED
@@ -1,77 +1,73 @@
1
- # Copyright (C) 2018 WP Subscribe
2
- # This file is distributed under the same license as the WP Subscribe package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP Subscribe 1.2.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-subscribe\n"
7
- "POT-Creation-Date: 2018-02-17 01:23:40+00:00\n"
 
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
12
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
 
14
 
15
- #: includes/subscription/class-wps-aweber.php:67
16
- msgid "Unable to connect to Aweber. The Authorization Code is empty."
17
  msgstr ""
18
 
19
- #: includes/subscription/class-wps-aweber.php:77
20
- msgid ""
21
- "Unable to connect your Aweber Account. The Authorization Code is incorrect."
22
  msgstr ""
23
 
24
- #: includes/subscription/class-wps-aweber.php:203
25
- msgid "AWeber List"
26
  msgstr ""
27
 
28
- #: includes/subscription/class-wps-aweber.php:204
29
- #: includes/subscription/class-wps-mailchimp.php:73
30
- msgid "Select List"
31
  msgstr ""
32
 
33
- #: includes/subscription/class-wps-aweber.php:217
34
- msgid "To connect your Aweber account:"
35
  msgstr ""
36
 
37
- #: includes/subscription/class-wps-aweber.php:220
38
- msgid ""
39
- "<span>1.</span> <a href=\"%s\" target=\"_blank\">Click here</a> <span>to "
40
- "open the authorization page and log in.</span>"
41
  msgstr ""
42
 
43
- #: includes/subscription/class-wps-aweber.php:221
44
- msgid ""
45
- "<span>2.</span> Copy and paste the authorization code in the field below."
46
  msgstr ""
47
 
48
- #: includes/subscription/class-wps-aweber.php:230
49
- msgid "Your Aweber Account is connected."
50
  msgstr ""
51
 
52
- #: includes/subscription/class-wps-aweber.php:231
53
- msgid ""
54
- "<a href=\"#\" class=\"aweber_disconnect\">Click here</a> <span>to disconnect."
55
- "</span>"
56
  msgstr ""
57
 
58
- #: includes/subscription/class-wps-feedburner.php:39
59
  msgid "Feedburner ID"
60
  msgstr ""
61
 
62
- #: includes/subscription/class-wps-mailchimp.php:63
63
  msgid "MailChimp API URL"
64
  msgstr ""
65
 
66
- #: includes/subscription/class-wps-mailchimp.php:64
67
  msgid "The API key of your MailChimp account."
68
  msgstr ""
69
 
70
- #: includes/subscription/class-wps-mailchimp.php:72
71
  msgid "MailChimp List"
72
  msgstr ""
73
 
74
- #: includes/subscription/class-wps-mailchimp.php:81
75
  msgid "Send double opt-in notification"
76
  msgstr ""
77
 
@@ -99,298 +95,289 @@ msgstr ""
99
  msgid "Adds subscribers to your MailChimp account."
100
  msgstr ""
101
 
102
- #: includes/wps-helpers.php:217
103
  msgid "No Animation"
104
  msgstr ""
105
 
106
- #: includes/wps-helpers.php:218
107
  msgid "Attention Seekers"
108
  msgstr ""
109
 
110
- #: includes/wps-helpers.php:219
111
  msgid "bounce"
112
  msgstr ""
113
 
114
- #: includes/wps-helpers.php:220
115
  msgid "flash"
116
  msgstr ""
117
 
118
- #: includes/wps-helpers.php:221
119
  msgid "pulse"
120
  msgstr ""
121
 
122
- #: includes/wps-helpers.php:222
123
  msgid "rubberBand"
124
  msgstr ""
125
 
126
- #: includes/wps-helpers.php:223
127
  msgid "shake"
128
  msgstr ""
129
 
130
- #: includes/wps-helpers.php:224
131
  msgid "swing"
132
  msgstr ""
133
 
134
- #: includes/wps-helpers.php:225
135
  msgid "tada"
136
  msgstr ""
137
 
138
- #: includes/wps-helpers.php:226
139
  msgid "wobble"
140
  msgstr ""
141
 
142
- #: includes/wps-helpers.php:228
143
  msgid "Bouncing Entrances"
144
  msgstr ""
145
 
146
- #: includes/wps-helpers.php:229
147
  msgid "bounceIn"
148
  msgstr ""
149
 
150
- #: includes/wps-helpers.php:230
151
  msgid "bounceInDown"
152
  msgstr ""
153
 
154
- #: includes/wps-helpers.php:231
155
  msgid "bounceInLeft"
156
  msgstr ""
157
 
158
- #: includes/wps-helpers.php:232
159
  msgid "bounceInRight"
160
  msgstr ""
161
 
162
- #: includes/wps-helpers.php:233
163
  msgid "bounceInUp"
164
  msgstr ""
165
 
166
- #: includes/wps-helpers.php:235
167
  msgid "Fading Entrances"
168
  msgstr ""
169
 
170
- #: includes/wps-helpers.php:236
171
  msgid "fadeIn"
172
  msgstr ""
173
 
174
- #: includes/wps-helpers.php:237
175
  msgid "fadeInDown"
176
  msgstr ""
177
 
178
- #: includes/wps-helpers.php:238
179
  msgid "fadeInDownBig"
180
  msgstr ""
181
 
182
- #: includes/wps-helpers.php:239
183
  msgid "fadeInLeft"
184
  msgstr ""
185
 
186
- #: includes/wps-helpers.php:240
187
  msgid "fadeInLeftBig"
188
  msgstr ""
189
 
190
- #: includes/wps-helpers.php:241
191
  msgid "fadeInRight"
192
  msgstr ""
193
 
194
- #: includes/wps-helpers.php:242
195
  msgid "fadeInRightBig"
196
  msgstr ""
197
 
198
- #: includes/wps-helpers.php:243
199
  msgid "fadeInUp"
200
  msgstr ""
201
 
202
- #: includes/wps-helpers.php:244
203
  msgid "fadeInUpBig"
204
  msgstr ""
205
 
206
- #: includes/wps-helpers.php:246
207
  msgid "Flippers"
208
  msgstr ""
209
 
210
- #: includes/wps-helpers.php:247
211
  msgid "flipInX"
212
  msgstr ""
213
 
214
- #: includes/wps-helpers.php:248
215
  msgid "flipInY"
216
  msgstr ""
217
 
218
- #: includes/wps-helpers.php:250
219
  msgid "Lightspeed"
220
  msgstr ""
221
 
222
- #: includes/wps-helpers.php:251
223
  msgid "lightSpeedIn"
224
  msgstr ""
225
 
226
- #: includes/wps-helpers.php:253
227
  msgid "Rotating Entrances"
228
  msgstr ""
229
 
230
- #: includes/wps-helpers.php:254
231
  msgid "rotateIn"
232
  msgstr ""
233
 
234
- #: includes/wps-helpers.php:255
235
  msgid "rotateInDownLeft"
236
  msgstr ""
237
 
238
- #: includes/wps-helpers.php:256
239
  msgid "rotateInDownRight"
240
  msgstr ""
241
 
242
- #: includes/wps-helpers.php:257
243
  msgid "rotateInUpLeft"
244
  msgstr ""
245
 
246
- #: includes/wps-helpers.php:258
247
  msgid "rotateInUpRight"
248
  msgstr ""
249
 
250
- #: includes/wps-helpers.php:260
251
  msgid "Specials"
252
  msgstr ""
253
 
254
- #: includes/wps-helpers.php:261
255
  msgid "rollIn"
256
  msgstr ""
257
 
258
- #: includes/wps-helpers.php:263
259
  msgid "Zoom Entrances"
260
  msgstr ""
261
 
262
- #: includes/wps-helpers.php:264
263
  msgid "zoomIn"
264
  msgstr ""
265
 
266
- #: includes/wps-helpers.php:265
267
  msgid "zoomInDown"
268
  msgstr ""
269
 
270
- #: includes/wps-helpers.php:266
271
  msgid "zoomInLeft"
272
  msgstr ""
273
 
274
- #: includes/wps-helpers.php:267
275
  msgid "zoomInRight"
276
  msgstr ""
277
 
278
- #: includes/wps-helpers.php:268
279
  msgid "zoomInUp"
280
  msgstr ""
281
 
282
- #: includes/wps-widget.php:23
283
  msgid "Displays subscription form, supports FeedBurner, MailChimp & AWeber."
284
  msgstr ""
285
 
286
- #: includes/wps-widget.php:34
287
  msgid "WP Subscribe Widget"
288
  msgstr ""
289
 
290
- #: includes/wps-widget.php:50
291
  msgid "Get more stuff"
292
  msgstr ""
293
 
294
- #: includes/wps-widget.php:51
295
- msgid ""
296
- "Subscribe to our mailing list and get interesting stuff and updates to your "
297
- "email inbox."
298
  msgstr ""
299
 
300
- #: includes/wps-widget.php:52
301
  msgid "Enter your email here"
302
  msgstr ""
303
 
304
- #: includes/wps-widget.php:53
 
 
 
 
305
  msgid "Enter your name here"
306
  msgstr ""
307
 
308
- #: includes/wps-widget.php:54
309
  msgid "Sign Up Now"
310
  msgstr ""
311
 
312
- #: includes/wps-widget.php:55
313
  msgid "Thank you for subscribing."
314
  msgstr ""
315
 
316
- #: includes/wps-widget.php:56
317
  msgid "Something went wrong."
318
  msgstr ""
319
 
320
- #: includes/wps-widget.php:57
321
  msgid "we respect your privacy and take protecting it seriously"
322
  msgstr ""
323
 
324
- #: includes/wps-widget.php:174
325
  msgid "Include <strong>Name</strong> field"
326
  msgstr ""
327
 
328
- #: includes/wps-widget.php:180
329
  msgid "Labels"
330
  msgstr ""
331
 
332
- #: includes/wps-widget.php:286 includes/wps-widget.php:361
 
333
  msgid "Click here"
334
  msgstr ""
335
 
336
- #: includes/wps-widget.php:357
337
  msgid "Get list"
338
  msgstr ""
339
 
340
- #: wp-subscribe.php:61 wp-subscribe.php:68
 
341
  msgid "Cheatin&#8217; huh?"
342
  msgstr ""
343
 
344
- #: wp-subscribe.php:160
 
 
 
 
 
 
 
 
 
345
  msgid "No aweber authorization code found."
346
  msgstr ""
347
 
348
- #: wp-subscribe.php:192
349
  msgid "No data found."
350
  msgstr ""
351
 
352
- #: wp-subscribe.php:200
353
  msgid "No email address found."
354
  msgstr ""
355
 
356
- #: wp-subscribe.php:207
357
  msgid "Not a valid email address."
358
  msgstr ""
359
 
360
- #: wp-subscribe.php:216
361
  msgid "Unknown mailing service called."
362
  msgstr ""
363
 
364
- #: wp-subscribe.php:251
365
  msgid "Not permitted."
366
  msgstr ""
367
 
368
- #: wp-subscribe.php:260
369
  msgid "Service not defined."
370
  msgstr ""
371
 
372
- #: wp-subscribe.php:278
373
  msgid "No lists found."
374
  msgstr ""
375
-
376
- #. Plugin Name of the plugin/theme
377
- msgid "WP Subscribe"
378
- msgstr ""
379
-
380
- #. Plugin URI of the plugin/theme
381
- msgid "http://mythemeshop.com/plugins/wp-subscribe/"
382
- msgstr ""
383
-
384
- #. Description of the plugin/theme
385
- msgid ""
386
- "WP Subscribe is a simple but powerful subscription plugin which supports "
387
- "MailChimp, Aweber and Feedburner."
388
- msgstr ""
389
-
390
- #. Author of the plugin/theme
391
- msgid "MyThemeShop"
392
- msgstr ""
393
-
394
- #. Author URI of the plugin/theme
395
- msgid "http://mythemeshop.com/"
396
- msgstr ""
1
+ # Copyright (C) 2022 MyThemeShop
2
+ # This file is distributed under the same license as the WP Subscribe plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP Subscribe 1.2.13\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-subscribe\n"
7
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
+ "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-05-03T04:00:05+02:00\n"
13
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
+ "X-Generator: WP-CLI 2.6.0\n"
15
+ "X-Domain: wp-subscribe\n"
16
 
17
+ #. Plugin Name of the plugin
18
+ msgid "WP Subscribe"
19
  msgstr ""
20
 
21
+ #. Plugin URI of the plugin
22
+ msgid "http://mythemeshop.com/plugins/wp-subscribe/"
 
23
  msgstr ""
24
 
25
+ #. Description of the plugin
26
+ msgid "WP Subscribe is a simple but powerful subscription plugin which supports MailChimp, Aweber and Feedburner."
27
  msgstr ""
28
 
29
+ #. Author of the plugin
30
+ msgid "MyThemeShop"
 
31
  msgstr ""
32
 
33
+ #. Author URI of the plugin
34
+ msgid "http://mythemeshop.com/"
35
  msgstr ""
36
 
37
+ #: includes/subscription/class-wps-aweber.php:72
38
+ msgid "Unable to connect to Aweber. The Authorization Code is empty."
 
 
39
  msgstr ""
40
 
41
+ #: includes/subscription/class-wps-aweber.php:82
42
+ msgid "Unable to connect your Aweber Account. The Authorization Code is incorrect."
 
43
  msgstr ""
44
 
45
+ #: includes/subscription/class-wps-aweber.php:208
46
+ msgid "AWeber List"
47
  msgstr ""
48
 
49
+ #: includes/subscription/class-wps-aweber.php:209
50
+ #: includes/subscription/class-wps-mailchimp.php:77
51
+ msgid "Select List"
 
52
  msgstr ""
53
 
54
+ #: includes/subscription/class-wps-feedburner.php:50
55
  msgid "Feedburner ID"
56
  msgstr ""
57
 
58
+ #: includes/subscription/class-wps-mailchimp.php:67
59
  msgid "MailChimp API URL"
60
  msgstr ""
61
 
62
+ #: includes/subscription/class-wps-mailchimp.php:68
63
  msgid "The API key of your MailChimp account."
64
  msgstr ""
65
 
66
+ #: includes/subscription/class-wps-mailchimp.php:76
67
  msgid "MailChimp List"
68
  msgstr ""
69
 
70
+ #: includes/subscription/class-wps-mailchimp.php:85
71
  msgid "Send double opt-in notification"
72
  msgstr ""
73
 
95
  msgid "Adds subscribers to your MailChimp account."
96
  msgstr ""
97
 
98
+ #: includes/wps-helpers.php:224
99
  msgid "No Animation"
100
  msgstr ""
101
 
102
+ #: includes/wps-helpers.php:225
103
  msgid "Attention Seekers"
104
  msgstr ""
105
 
106
+ #: includes/wps-helpers.php:226
107
  msgid "bounce"
108
  msgstr ""
109
 
110
+ #: includes/wps-helpers.php:227
111
  msgid "flash"
112
  msgstr ""
113
 
114
+ #: includes/wps-helpers.php:228
115
  msgid "pulse"
116
  msgstr ""
117
 
118
+ #: includes/wps-helpers.php:229
119
  msgid "rubberBand"
120
  msgstr ""
121
 
122
+ #: includes/wps-helpers.php:230
123
  msgid "shake"
124
  msgstr ""
125
 
126
+ #: includes/wps-helpers.php:231
127
  msgid "swing"
128
  msgstr ""
129
 
130
+ #: includes/wps-helpers.php:232
131
  msgid "tada"
132
  msgstr ""
133
 
134
+ #: includes/wps-helpers.php:233
135
  msgid "wobble"
136
  msgstr ""
137
 
138
+ #: includes/wps-helpers.php:235
139
  msgid "Bouncing Entrances"
140
  msgstr ""
141
 
142
+ #: includes/wps-helpers.php:236
143
  msgid "bounceIn"
144
  msgstr ""
145
 
146
+ #: includes/wps-helpers.php:237
147
  msgid "bounceInDown"
148
  msgstr ""
149
 
150
+ #: includes/wps-helpers.php:238
151
  msgid "bounceInLeft"
152
  msgstr ""
153
 
154
+ #: includes/wps-helpers.php:239
155
  msgid "bounceInRight"
156
  msgstr ""
157
 
158
+ #: includes/wps-helpers.php:240
159
  msgid "bounceInUp"
160
  msgstr ""
161
 
162
+ #: includes/wps-helpers.php:242
163
  msgid "Fading Entrances"
164
  msgstr ""
165
 
166
+ #: includes/wps-helpers.php:243
167
  msgid "fadeIn"
168
  msgstr ""
169
 
170
+ #: includes/wps-helpers.php:244
171
  msgid "fadeInDown"
172
  msgstr ""
173
 
174
+ #: includes/wps-helpers.php:245
175
  msgid "fadeInDownBig"
176
  msgstr ""
177
 
178
+ #: includes/wps-helpers.php:246
179
  msgid "fadeInLeft"
180
  msgstr ""
181
 
182
+ #: includes/wps-helpers.php:247
183
  msgid "fadeInLeftBig"
184
  msgstr ""
185
 
186
+ #: includes/wps-helpers.php:248
187
  msgid "fadeInRight"
188
  msgstr ""
189
 
190
+ #: includes/wps-helpers.php:249
191
  msgid "fadeInRightBig"
192
  msgstr ""
193
 
194
+ #: includes/wps-helpers.php:250
195
  msgid "fadeInUp"
196
  msgstr ""
197
 
198
+ #: includes/wps-helpers.php:251
199
  msgid "fadeInUpBig"
200
  msgstr ""
201
 
202
+ #: includes/wps-helpers.php:253
203
  msgid "Flippers"
204
  msgstr ""
205
 
206
+ #: includes/wps-helpers.php:254
207
  msgid "flipInX"
208
  msgstr ""
209
 
210
+ #: includes/wps-helpers.php:255
211
  msgid "flipInY"
212
  msgstr ""
213
 
214
+ #: includes/wps-helpers.php:257
215
  msgid "Lightspeed"
216
  msgstr ""
217
 
218
+ #: includes/wps-helpers.php:258
219
  msgid "lightSpeedIn"
220
  msgstr ""
221
 
222
+ #: includes/wps-helpers.php:260
223
  msgid "Rotating Entrances"
224
  msgstr ""
225
 
226
+ #: includes/wps-helpers.php:261
227
  msgid "rotateIn"
228
  msgstr ""
229
 
230
+ #: includes/wps-helpers.php:262
231
  msgid "rotateInDownLeft"
232
  msgstr ""
233
 
234
+ #: includes/wps-helpers.php:263
235
  msgid "rotateInDownRight"
236
  msgstr ""
237
 
238
+ #: includes/wps-helpers.php:264
239
  msgid "rotateInUpLeft"
240
  msgstr ""
241
 
242
+ #: includes/wps-helpers.php:265
243
  msgid "rotateInUpRight"
244
  msgstr ""
245
 
246
+ #: includes/wps-helpers.php:267
247
  msgid "Specials"
248
  msgstr ""
249
 
250
+ #: includes/wps-helpers.php:268
251
  msgid "rollIn"
252
  msgstr ""
253
 
254
+ #: includes/wps-helpers.php:270
255
  msgid "Zoom Entrances"
256
  msgstr ""
257
 
258
+ #: includes/wps-helpers.php:271
259
  msgid "zoomIn"
260
  msgstr ""
261
 
262
+ #: includes/wps-helpers.php:272
263
  msgid "zoomInDown"
264
  msgstr ""
265
 
266
+ #: includes/wps-helpers.php:273
267
  msgid "zoomInLeft"
268
  msgstr ""
269
 
270
+ #: includes/wps-helpers.php:274
271
  msgid "zoomInRight"
272
  msgstr ""
273
 
274
+ #: includes/wps-helpers.php:275
275
  msgid "zoomInUp"
276
  msgstr ""
277
 
278
+ #: includes/wps-widget.php:25
279
  msgid "Displays subscription form, supports FeedBurner, MailChimp & AWeber."
280
  msgstr ""
281
 
282
+ #: includes/wps-widget.php:36
283
  msgid "WP Subscribe Widget"
284
  msgstr ""
285
 
286
+ #: includes/wps-widget.php:52
287
  msgid "Get more stuff"
288
  msgstr ""
289
 
290
+ #: includes/wps-widget.php:53
291
+ msgid "Subscribe to our mailing list and get interesting stuff and updates to your email inbox."
 
 
292
  msgstr ""
293
 
294
+ #: includes/wps-widget.php:54
295
  msgid "Enter your email here"
296
  msgstr ""
297
 
298
+ #: includes/wps-widget.php:55
299
+ msgid "I consent to my submitted data being collected via this form*"
300
+ msgstr ""
301
+
302
+ #: includes/wps-widget.php:56
303
  msgid "Enter your name here"
304
  msgstr ""
305
 
306
+ #: includes/wps-widget.php:57
307
  msgid "Sign Up Now"
308
  msgstr ""
309
 
310
+ #: includes/wps-widget.php:58
311
  msgid "Thank you for subscribing."
312
  msgstr ""
313
 
314
+ #: includes/wps-widget.php:59
315
  msgid "Something went wrong."
316
  msgstr ""
317
 
318
+ #: includes/wps-widget.php:60
319
  msgid "we respect your privacy and take protecting it seriously"
320
  msgstr ""
321
 
322
+ #: includes/wps-widget.php:175
323
  msgid "Include <strong>Name</strong> field"
324
  msgstr ""
325
 
326
+ #: includes/wps-widget.php:181
327
  msgid "Labels"
328
  msgstr ""
329
 
330
+ #: includes/wps-widget.php:293
331
+ #: includes/wps-widget.php:368
332
  msgid "Click here"
333
  msgstr ""
334
 
335
+ #: includes/wps-widget.php:364
336
  msgid "Get list"
337
  msgstr ""
338
 
339
+ #: wp-subscribe.php:61
340
+ #: wp-subscribe.php:68
341
  msgid "Cheatin&#8217; huh?"
342
  msgstr ""
343
 
344
+ #. Translators: %s is "WP Subscribe Pro" as a link.
345
+ #: wp-subscribe.php:125
346
+ msgid "Like WP Subscribe plugin? You will LOVE %s!"
347
+ msgstr ""
348
+
349
+ #: wp-subscribe.php:135
350
+ msgid "Thank you for trying WP Subscribe. We hope you will like it."
351
+ msgstr ""
352
+
353
+ #: wp-subscribe.php:206
354
  msgid "No aweber authorization code found."
355
  msgstr ""
356
 
357
+ #: wp-subscribe.php:238
358
  msgid "No data found."
359
  msgstr ""
360
 
361
+ #: wp-subscribe.php:246
362
  msgid "No email address found."
363
  msgstr ""
364
 
365
+ #: wp-subscribe.php:253
366
  msgid "Not a valid email address."
367
  msgstr ""
368
 
369
+ #: wp-subscribe.php:262
370
  msgid "Unknown mailing service called."
371
  msgstr ""
372
 
373
+ #: wp-subscribe.php:297
374
  msgid "Not permitted."
375
  msgstr ""
376
 
377
+ #: wp-subscribe.php:306
378
  msgid "Service not defined."
379
  msgstr ""
380
 
381
+ #: wp-subscribe.php:324
382
  msgid "No lists found."
383
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "name": "WP-Subscribe-Pro",
3
- "version": "0.0.1",
4
- "description": "The subscriber plugin",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "keywords": [
10
- "mythemeshop"
11
- ],
12
- "author": "MyThemeShop",
13
- "license": "ISC",
14
- "devDependencies": {
15
- "grunt": "^1.0.1",
16
- "grunt-checktextdomain": "^1.0.1",
17
- "grunt-wp-i18n": "^0.5.4"
18
- }
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mythemeshop
3
  Creator's website link: http://mythemeshop.com/plugins/wp-subscribe/
4
  Tags: subscribe, subscription, subscription box, newsletter, subscribe widget, mailchimp, aweber, feedburner,
5
  Requires at least: 4.0
6
- Tested up to: 5.0.2
7
- Stable tag: 1.2.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -82,6 +82,9 @@ Please disable all plugins and check if plugin is working properly. Then you can
82
 
83
  == Changelog ==
84
 
 
 
 
85
  = 1.2.12 =
86
  * Improved form accessibility
87
 
3
  Creator's website link: http://mythemeshop.com/plugins/wp-subscribe/
4
  Tags: subscribe, subscription, subscription box, newsletter, subscribe widget, mailchimp, aweber, feedburner,
5
  Requires at least: 4.0
6
+ Tested up to: 5.9.3
7
+ Stable tag: 1.2.13
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
82
 
83
  == Changelog ==
84
 
85
+ = 1.2.13 =
86
+ * Fixed a security issue
87
+
88
  = 1.2.12 =
89
  * Improved form accessibility
90
 
wp-subscribe.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Subscribe
4
  * Plugin URI: http://mythemeshop.com/plugins/wp-subscribe/
5
  * Description: WP Subscribe is a simple but powerful subscription plugin which supports MailChimp, Aweber and Feedburner.
6
- * Version: 1.2.12
7
  * Author: MyThemeShop
8
  * Author URI: http://mythemeshop.com/
9
  * Text Domain: wp-subscribe
@@ -27,7 +27,7 @@ if( ! class_exists('MTS_WP_Subscribe') ) :
27
  * Plugin Version
28
  * @var string
29
  */
30
- private $version = '1.2.11';
31
 
32
  /**
33
  * Hold an instance of MTS_WP_Subscribe class
@@ -121,7 +121,8 @@ if( ! class_exists('MTS_WP_Subscribe') ) :
121
  /* Only show the notice 2 days after plugin activation */
122
  if ( ! get_user_meta($user_id, 'wp_subscribe_ignore_notice') && time() >= (get_option( 'wp_subscribe_activated', 0 ) + (2 * 24 * 60 * 60)) ) {
123
  echo '<div class="updated notice-info wp-subscribe-notice" id="wpsubscribe-notice" style="position:relative;">';
124
- echo __('<p>Like WP Subscribe plugin? You will LOVE <a target="_blank" href="https://mythemeshop.com/plugins/wp-subscribe-pro/?utm_source=WP+Subscribe&utm_medium=Notification+Link&utm_content=WP+Subscribe+Pro+LP&utm_campaign=WordPressOrg"><strong>WP Subscribe Pro!</strong></a></p><a class="notice-dismiss wpsubscribe-dismiss-notice" data-ignore="0" href="#"></a>', 'wp-subscribe');
 
125
  echo "</div>";
126
  }
127
  /* Other notice appears right after activating */
@@ -131,7 +132,7 @@ if( ! class_exists('MTS_WP_Subscribe') ) :
131
  update_option( 'wp_subscribe_notice_views', ($views + 1) );
132
  echo '<div class="updated notice-info wp-subscribe-notice" id="wpsubscribe-notice2" style="position:relative;">';
133
  echo '<p>';
134
- _e('Thank you for trying WP Subscribe. We hope you will like it.', 'wp-subscribe');
135
  echo '</p>';
136
  echo '<a class="notice-dismiss wpsubscribe-dismiss-notice" data-ignore="1" href="#"></a>';
137
  echo "</div>";
3
  * Plugin Name: WP Subscribe
4
  * Plugin URI: http://mythemeshop.com/plugins/wp-subscribe/
5
  * Description: WP Subscribe is a simple but powerful subscription plugin which supports MailChimp, Aweber and Feedburner.
6
+ * Version: 1.2.13
7
  * Author: MyThemeShop
8
  * Author URI: http://mythemeshop.com/
9
  * Text Domain: wp-subscribe
27
  * Plugin Version
28
  * @var string
29
  */
30
+ private $version = '1.2.13';
31
 
32
  /**
33
  * Hold an instance of MTS_WP_Subscribe class
121
  /* Only show the notice 2 days after plugin activation */
122
  if ( ! get_user_meta($user_id, 'wp_subscribe_ignore_notice') && time() >= (get_option( 'wp_subscribe_activated', 0 ) + (2 * 24 * 60 * 60)) ) {
123
  echo '<div class="updated notice-info wp-subscribe-notice" id="wpsubscribe-notice" style="position:relative;">';
124
+ // Translators: %s is "WP Subscribe Pro" as a link.
125
+ echo '<p>' . sprintf( __('Like WP Subscribe plugin? You will LOVE %s!', 'wp-subscribe'), '<a target="_blank" href="https://mythemeshop.com/plugins/wp-subscribe-pro/?utm_source=WP+Subscribe&utm_medium=Notification+Link&utm_content=WP+Subscribe+Pro+LP&utm_campaign=WordPressOrg"><strong>WP Subscribe Pro</strong></a>' ) . '</p><a class="notice-dismiss wpsubscribe-dismiss-notice" data-ignore="0" href="#"></a>';
126
  echo "</div>";
127
  }
128
  /* Other notice appears right after activating */
132
  update_option( 'wp_subscribe_notice_views', ($views + 1) );
133
  echo '<div class="updated notice-info wp-subscribe-notice" id="wpsubscribe-notice2" style="position:relative;">';
134
  echo '<p>';
135
+ esc_html_e('Thank you for trying WP Subscribe. We hope you will like it.', 'wp-subscribe');
136
  echo '</p>';
137
  echo '<a class="notice-dismiss wpsubscribe-dismiss-notice" data-ignore="1" href="#"></a>';
138
  echo "</div>";