Version Description
- April 29, 2014 =
Improvements
- CSS is now served as static CSS instead of being served through PHP.
- The anti-spam honeypot is now added to the sign-up checkbox as well.
- Improved object-oriented code architecture and better class documentation
- Better CSS reset for the various form themes to increase theme compatibility
- Added class autoloading to the plugin
- Various minor code improvements
Additions
- You can now add a captcha field to your sign-up forms by installing the BWS Captcha plugin and using
[captcha]
inside your form mark-up. - All settings pages are now fully translatable. The plugin has just 2 translations available yet (
en_US
andnl_NL
) so if you're good at translating, please send me your language pack for the plugin. - You can now use tab indentation in the form markup textarea
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 1.5.8 to 2.0
- README.md +35 -0
- assets/css/checkbox.css +1 -24
- assets/css/css.php +0 -32
- assets/css/form-reset.css +0 -108
- assets/css/form-theme-blue.css +1 -27
- assets/css/form-theme-dark.css +1 -23
- assets/css/form-theme-green.css +1 -23
- assets/css/form-theme-light.css +1 -13
- assets/css/form-theme-red.css +1 -23
- assets/css/form.css +1 -0
- assets/js/admin.js +27 -1
- assets/sass/checkbox.scss +26 -0
- assets/sass/form-theme-blue.scss +30 -0
- assets/sass/form-theme-dark.scss +30 -0
- assets/sass/form-theme-green.scss +30 -0
- assets/sass/form-theme-light.scss +20 -0
- assets/sass/form-theme-red.scss +32 -0
- assets/sass/form.scss +2 -0
- assets/sass/index.php +6 -0
- assets/sass/partials/_form-reset.scss +108 -0
- assets/{css/form-theme-base.css → sass/partials/_form-theme-base.scss} +119 -119
- assets/sass/partials/index.php +6 -0
- includes/class-admin.php +115 -84
- includes/class-api.php +25 -9
- includes/class-checkbox-manager.php +74 -0
- includes/class-checkbox.php +0 -523
- includes/{class-form.php → class-form-manager.php} +33 -21
- includes/class-plugin.php +48 -22
- includes/class-widget.php +1 -1
- includes/{functions.php → functions/general.php} +14 -6
- includes/{template-functions.php → functions/template.php} +5 -5
- includes/integrations/class-bbpress.php +67 -0
- includes/integrations/class-buddypress.php +49 -0
- includes/integrations/class-cf7.php +64 -0
- includes/integrations/class-comment-form.php +55 -0
- includes/integrations/class-general.php +139 -0
- includes/integrations/class-integration.php +167 -0
- includes/integrations/class-multisite.php +102 -0
- includes/integrations/class-registration-form.php +61 -0
- includes/views/api-settings.php +35 -24
- includes/views/checkbox-settings.php +32 -31
- includes/views/form-settings.php +56 -48
- includes/views/parts/admin-field-wizard.php +14 -12
- languages/mailchimp-for-wp-nl_NL.mo +0 -0
- languages/mailchimp-for-wp-nl_NL.po +440 -0
- languages/mailchimp-for-wp.mo +0 -0
- languages/mailchimp-for-wp.po +401 -0
- mailchimp-for-wp.php +7 -4
- readme.txt +31 -181
README.md
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MailChimp for WordPress
|
2 |
+
======================
|
3 |
+
|
4 |
+
Here you can browse the source of the [MailChimp for WordPress Plugin](http://wordpress.org/plugins/mailchimp-for-wp/) project, find and discuss open issues or contribute yourself.
|
5 |
+
|
6 |
+
Installation
|
7 |
+
------------
|
8 |
+
|
9 |
+
Here's a [guide on how to install the plugin in your WordPress site](http://wordpress.org/plugins/mailchimp-for-wp/installation/).
|
10 |
+
If you want to run the Git version, you have two options:
|
11 |
+
|
12 |
+
* You can clone the GitHub repository: `https://github.com/dannyvankooten/mailchimp-for-wordpress.git`
|
13 |
+
* You can download the repository .zip file: [mailchimp-for-wordpress.zip](https://github.com/dannyvankooten/mailchimp-for-wordpress/archive/master.zip)
|
14 |
+
|
15 |
+
This will download the latest development version of the MailChimp for WordPress plugin. While this version is usually stable,
|
16 |
+
it is not recommended for use in a production environment.
|
17 |
+
|
18 |
+
Bugs
|
19 |
+
----
|
20 |
+
If you find an issue, [let us know here](https://github.com/dannyvankooten/mailchimp-for-wordpress/issues?state=open)!
|
21 |
+
|
22 |
+
Support
|
23 |
+
-------
|
24 |
+
This is a developer's portal for the MailChimp for WordPress plugin and should not be used for support. Please visit the
|
25 |
+
[plugin support forums on WordPress.org](http://wordpress.org/support/plugin/mailchimp-for-wp).
|
26 |
+
|
27 |
+
If you need priority support, please consider upgrading to [MailChimp for WordPress Pro](http://dannyvankooten.com/mailchimp-for-wordpress/).
|
28 |
+
|
29 |
+
Contributions
|
30 |
+
-------------
|
31 |
+
Anyone is welcome to contribute to the plugin. There are various ways you can contribute:
|
32 |
+
|
33 |
+
* [Raise an issue](https://github.com/dannyvankooten/mailchimp-for-wordpress/issues) on GitHub.
|
34 |
+
* Send us a Pull Request with your bug fixes and/or new features.
|
35 |
+
* Provide feedback and [suggestions on enhancements](https://github.com/dannyvankooten/mailchimp-for-wordpress/issues?direction=desc&labels=Enhancement&page=1&sort=created&state=open).
|
assets/css/checkbox.css
CHANGED
@@ -1,24 +1 @@
|
|
1 |
-
|
2 |
-
#mc4wp-checkbox{
|
3 |
-
clear: both;
|
4 |
-
display: block;
|
5 |
-
}
|
6 |
-
|
7 |
-
#mc4wp-checkbox input{
|
8 |
-
position: relative;
|
9 |
-
margin: 0 6px 0 0;
|
10 |
-
padding: 0;
|
11 |
-
vertical-align: middle;
|
12 |
-
display: inline-block !important;
|
13 |
-
max-width: 20px;
|
14 |
-
}
|
15 |
-
|
16 |
-
#mc4wp-checkbox label{
|
17 |
-
display: block;
|
18 |
-
cursor: pointer;
|
19 |
-
width: auto;
|
20 |
-
}
|
21 |
-
|
22 |
-
#registerform #mc4wp-checkbox{
|
23 |
-
margin-bottom: 10px;
|
24 |
-
}
|
1 |
+
#mc4wp-checkbox{clear:both;display:block}#mc4wp-checkbox input{position:relative;margin:0 6px 0 0;padding:0;vertical-align:middle;display:inline-block !important;max-width:21px}#mc4wp-checkbox label{display:block;cursor:pointer;width:auto}#registerform #mc4wp-checkbox{margin-bottom:10px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/css.php
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Set headers to serve CSS and encourage browser caching
|
3 |
-
$expires = 31536000; // cache time: 1 year
|
4 |
-
header( 'Content-Type: text/css' );
|
5 |
-
header( "Cache-Control: max-age=" . $expires );
|
6 |
-
header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires ) . ' GMT' );
|
7 |
-
|
8 |
-
if( isset( $_GET['checkbox'] ) ) {
|
9 |
-
readfile( dirname( __FILE__ ) . '/checkbox.css' );
|
10 |
-
}
|
11 |
-
|
12 |
-
// load form reset
|
13 |
-
if( isset( $_GET['form'] ) ) {
|
14 |
-
readfile( dirname( __FILE__ ) . '/form-reset.css' );
|
15 |
-
}
|
16 |
-
|
17 |
-
// should we load a form theme?
|
18 |
-
if( isset( $_GET['form-theme'] ) ) {
|
19 |
-
$form_theme = strtolower( trim( $_GET['form-theme'] ) );
|
20 |
-
|
21 |
-
// only load themes we actually have
|
22 |
-
if( in_array( $form_theme, array( 'blue', 'green', 'dark', 'light', 'red' ) ) ) {
|
23 |
-
// load theme base file
|
24 |
-
readfile( dirname( __FILE__ ) . '/form-theme-base.css' );
|
25 |
-
|
26 |
-
// load theme file
|
27 |
-
readfile( dirname( __FILE__ ) . '/form-theme-'. $form_theme .'.css' );
|
28 |
-
}
|
29 |
-
|
30 |
-
}
|
31 |
-
|
32 |
-
exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/form-reset.css
DELETED
@@ -1,108 +0,0 @@
|
|
1 |
-
|
2 |
-
/* MailChimp for WP - Default Form Styles */
|
3 |
-
.mc4wp-form{
|
4 |
-
margin: 1em 0;
|
5 |
-
}
|
6 |
-
|
7 |
-
.mc4wp-form label{
|
8 |
-
display: block;
|
9 |
-
font-weight: bold;
|
10 |
-
margin-bottom: 5px;
|
11 |
-
}
|
12 |
-
|
13 |
-
.mc4wp-form ul,
|
14 |
-
.mc4wp-form li {
|
15 |
-
list-style: none;
|
16 |
-
margin: 0;
|
17 |
-
padding: 0;
|
18 |
-
}
|
19 |
-
|
20 |
-
.mc4wp-form label > span,
|
21 |
-
.mc4wp-form li > label {
|
22 |
-
font-weight: normal;
|
23 |
-
}
|
24 |
-
|
25 |
-
.mc4wp-form p > label:nth-child(2) {
|
26 |
-
margin-top: 10px;
|
27 |
-
}
|
28 |
-
|
29 |
-
.mc4wp-form input {
|
30 |
-
vertical-align: baseline;
|
31 |
-
}
|
32 |
-
|
33 |
-
.mc4wp-form input.placeholdersjs {
|
34 |
-
color: #aaa !important;
|
35 |
-
}
|
36 |
-
|
37 |
-
.mc4wp-form input[type="text"],
|
38 |
-
.mc4wp-form input[type="email"],
|
39 |
-
.mc4wp-form input[type="tel"],
|
40 |
-
.mc4wp-form input[type="url"],
|
41 |
-
.mc4wp-form input[type="date"],
|
42 |
-
.mc4wp-form textarea,
|
43 |
-
.mc4wp-form select {
|
44 |
-
cursor: auto;
|
45 |
-
display: block;
|
46 |
-
width: 100%;
|
47 |
-
height: auto;
|
48 |
-
box-sizing: border-box;
|
49 |
-
-webkit-box-sizing: border-box;
|
50 |
-
-moz-box-sizing: border-box;
|
51 |
-
}
|
52 |
-
|
53 |
-
.mc4wp-form input[type="checkbox"],
|
54 |
-
.mc4wp-form input[type="radio"] {
|
55 |
-
position: relative;
|
56 |
-
margin: 0 6px 0 0;
|
57 |
-
padding: 0;
|
58 |
-
height: 13px;
|
59 |
-
width: 13px;
|
60 |
-
display: inline-block;
|
61 |
-
border: 0;
|
62 |
-
}
|
63 |
-
|
64 |
-
.mc4wp-form input[type="checkbox"] {
|
65 |
-
-webkit-appearance: checkbox;
|
66 |
-
}
|
67 |
-
|
68 |
-
.mc4wp-form input[type="radio"] {
|
69 |
-
-webkit-appearance: radio;
|
70 |
-
}
|
71 |
-
|
72 |
-
.mc4wp-form input[type="submit"],
|
73 |
-
.mc4wp-form button,
|
74 |
-
.mc4wp-form input[type="button"] {
|
75 |
-
cursor: pointer;
|
76 |
-
display: inline-block;
|
77 |
-
}
|
78 |
-
|
79 |
-
.mc4wp-alert{
|
80 |
-
margin: 1em 0;
|
81 |
-
padding: 10px 15px;
|
82 |
-
color: #c09853;
|
83 |
-
background-color: #fcf8e3;
|
84 |
-
border: 1px solid #fbeed5;
|
85 |
-
border-radius: 2px;
|
86 |
-
-moz-border-radius: 2px;
|
87 |
-
-webkit-border-radius: 2px;
|
88 |
-
display: block;
|
89 |
-
position: relative;
|
90 |
-
}
|
91 |
-
|
92 |
-
.mc4wp-success {
|
93 |
-
color: #468847;
|
94 |
-
background-color: #dff0d8;
|
95 |
-
border-color: #d6e9c6;
|
96 |
-
}
|
97 |
-
|
98 |
-
.mc4wp-notice {
|
99 |
-
color: #3a87ad;
|
100 |
-
background-color: #d9edf7;
|
101 |
-
border-color: #bce8f1;
|
102 |
-
}
|
103 |
-
|
104 |
-
.mc4wp-error {
|
105 |
-
color: #b94a48;
|
106 |
-
background-color: #f2dede;
|
107 |
-
border-color: #eed3d7;
|
108 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/form-theme-blue.css
CHANGED
@@ -1,27 +1 @@
|
|
1 |
-
.mc4wp-form input[type="submit"],
|
2 |
-
.mc4wp-form button {
|
3 |
-
color: #ffffff !important;
|
4 |
-
background-color: #428bca;
|
5 |
-
border-color: #357ebd;
|
6 |
-
}
|
7 |
-
|
8 |
-
.mc4wp-form input[type="submit"]:hover,
|
9 |
-
.mc4wp-form button:hover,
|
10 |
-
.mc4wp-form input[type="submit"]:active,
|
11 |
-
.mc4wp-form button:active,
|
12 |
-
.mc4wp-form input[type="submit"]:focus,
|
13 |
-
.mc4wp-form button:focus {
|
14 |
-
color: #ffffff;
|
15 |
-
background-color: #3276b1;
|
16 |
-
border-color: #285e8e;
|
17 |
-
}
|
18 |
-
|
19 |
-
.mc4wp-form input[type="text"]:focus,
|
20 |
-
.mc4wp-form input[type="email"]:focus,
|
21 |
-
.mc4wp-form input[type="tel"]:focus,
|
22 |
-
.mc4wp-form input[type="url"]:focus,
|
23 |
-
.mc4wp-form input[type="date"]:focus,
|
24 |
-
.mc4wp-form textarea:focus,
|
25 |
-
.mc4wp-form select:focus {
|
26 |
-
border-color: #428bca;
|
27 |
-
}
|
1 |
+
.mc4wp-form{margin:1em 0}.mc4wp-form label{display:block;font-weight:bold;margin-bottom:5px}.mc4wp-form ul,.mc4wp-form li{list-style:none;margin:0;padding:0}.mc4wp-form label>span,.mc4wp-form li>label{font-weight:normal}.mc4wp-form p>label:nth-child(2){margin-top:10px}.mc4wp-form input{vertical-align:baseline}.mc4wp-form input.placeholdersjs{color:#aaa !important}.mc4wp-form input[type="text"],.mc4wp-form input[type="email"],.mc4wp-form input[type="tel"],.mc4wp-form input[type="url"],.mc4wp-form input[type="date"],.mc4wp-form textarea,.mc4wp-form select{cursor:auto;display:block;width:100%;height:auto;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.mc4wp-form input[type="checkbox"],.mc4wp-form input[type="radio"]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form input[type="checkbox"]{-webkit-appearance:checkbox}.mc4wp-form input[type="radio"]{-webkit-appearance:radio}.mc4wp-form input[type="submit"],.mc4wp-form button,.mc4wp-form input[type="button"]{cursor:pointer;display:inline-block}.mc4wp-alert{margin:1em 0;padding:10px 15px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;display:block;position:relative}.mc4wp-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.mc4wp-notice{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.mc4wp-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.mc4wp-form{box-shadow:none !important;-webkit-box-shadow:none;-moz-box-shadow:none}.mc4wp-form p{margin:0 0 15px !important;padding:0}.mc4wp-form label{font-size:1em;margin:6px 0}.mc4wp-form input[type="text"],.mc4wp-form input[type="email"],.mc4wp-form input[type="tel"],.mc4wp-form input[type="url"],.mc4wp-form input[type="date"],.mc4wp-form textarea,.mc4wp-form select{width:100%;height:34px;margin:0;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555555;vertical-align:middle;background-color:#ffffff;border:1px solid #cccccc;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;-webkit-transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;background-image:none;text-shadow:none}.mc4wp-form input[type="text"]:focus,.mc4wp-form input[type="email"]:focus,.mc4wp-form input[type="tel"]:focus,.mc4wp-form input[type="url"]:focus,.mc4wp-form textarea:focus,.mc4wp-form select:focus{border-color:#66afe9;outline:0;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.mc4wp-form textarea{height:auto}.mc4wp-form input[readonly],.mc4wp-form input[disabled]{background-color:#eeeeee}.mc4wp-form input[type="submit"],.mc4wp-form button{display:inline-block;padding:6px 12px;margin:0;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;box-shadow:none;background:none;text-shadow:none;filter:none;height:auto;width:auto}.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.mc4wp-form input[type="submit"]:hover,.mc4wp-form button:hover,.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{color:#333333;text-decoration:none;background:none}.mc4wp-form input[type="submit"]:active,.mc4wp-form button:active{background-image:none;outline:0;-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.mc4wp-form input[type="submit"],.mc4wp-form button{color:#ffffff !important;background-color:#428bca;border-color:#357ebd}.mc4wp-form input[type="submit"]:hover,.mc4wp-form button:hover,.mc4wp-form input[type="submit"]:active,.mc4wp-form button:active,.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{color:#ffffff;background-color:#3276b1;border-color:#285e8e}.mc4wp-form input[type="text"]:focus,.mc4wp-form input[type="email"]:focus,.mc4wp-form input[type="tel"]:focus,.mc4wp-form input[type="url"]:focus,.mc4wp-form input[type="date"]:focus,.mc4wp-form textarea:focus,.mc4wp-form select:focus{border-color:#428bca}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/form-theme-dark.css
CHANGED
@@ -1,23 +1 @@
|
|
1 |
-
.mc4wp-form input[type="submit"], .mc4wp-form button {
|
2 |
-
color: #ffffff !important;
|
3 |
-
background-color: #333333;
|
4 |
-
border-color: #2E2E2E;
|
5 |
-
}
|
6 |
-
|
7 |
-
.mc4wp-form input[type="submit"]:hover, .mc4wp-form button:hover,
|
8 |
-
.mc4wp-form input[type="submit"]:active, .mc4wp-form button:active,
|
9 |
-
.mc4wp-form input[type="submit"]:focus, .mc4wp-form button:focus {
|
10 |
-
color: #ffffff;
|
11 |
-
background-color: #2E2E2E;
|
12 |
-
border-color: #292929;
|
13 |
-
}
|
14 |
-
|
15 |
-
.mc4wp-form input[type="text"]:focus,
|
16 |
-
.mc4wp-form input[type="email"]:focus,
|
17 |
-
.mc4wp-form input[type="tel"]:focus,
|
18 |
-
.mc4wp-form input[type="url"]:focus,
|
19 |
-
.mc4wp-form input[type="date"]:focus,
|
20 |
-
.mc4wp-form textarea:focus,
|
21 |
-
.mc4wp-form select:focus {
|
22 |
-
border-color: #333333;
|
23 |
-
}
|
1 |
+
.mc4wp-form{margin:1em 0}.mc4wp-form label{display:block;font-weight:bold;margin-bottom:5px}.mc4wp-form ul,.mc4wp-form li{list-style:none;margin:0;padding:0}.mc4wp-form label>span,.mc4wp-form li>label{font-weight:normal}.mc4wp-form p>label:nth-child(2){margin-top:10px}.mc4wp-form input{vertical-align:baseline}.mc4wp-form input.placeholdersjs{color:#aaa !important}.mc4wp-form input[type="text"],.mc4wp-form input[type="email"],.mc4wp-form input[type="tel"],.mc4wp-form input[type="url"],.mc4wp-form input[type="date"],.mc4wp-form textarea,.mc4wp-form select{cursor:auto;display:block;width:100%;height:auto;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.mc4wp-form input[type="checkbox"],.mc4wp-form input[type="radio"]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form input[type="checkbox"]{-webkit-appearance:checkbox}.mc4wp-form input[type="radio"]{-webkit-appearance:radio}.mc4wp-form input[type="submit"],.mc4wp-form button,.mc4wp-form input[type="button"]{cursor:pointer;display:inline-block}.mc4wp-alert{margin:1em 0;padding:10px 15px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;display:block;position:relative}.mc4wp-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.mc4wp-notice{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.mc4wp-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.mc4wp-form{box-shadow:none !important;-webkit-box-shadow:none;-moz-box-shadow:none}.mc4wp-form p{margin:0 0 15px !important;padding:0}.mc4wp-form label{font-size:1em;margin:6px 0}.mc4wp-form input[type="text"],.mc4wp-form input[type="email"],.mc4wp-form input[type="tel"],.mc4wp-form input[type="url"],.mc4wp-form input[type="date"],.mc4wp-form textarea,.mc4wp-form select{width:100%;height:34px;margin:0;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555555;vertical-align:middle;background-color:#ffffff;border:1px solid #cccccc;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;-webkit-transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;background-image:none;text-shadow:none}.mc4wp-form input[type="text"]:focus,.mc4wp-form input[type="email"]:focus,.mc4wp-form input[type="tel"]:focus,.mc4wp-form input[type="url"]:focus,.mc4wp-form textarea:focus,.mc4wp-form select:focus{border-color:#66afe9;outline:0;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.mc4wp-form textarea{height:auto}.mc4wp-form input[readonly],.mc4wp-form input[disabled]{background-color:#eeeeee}.mc4wp-form input[type="submit"],.mc4wp-form button{display:inline-block;padding:6px 12px;margin:0;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;box-shadow:none;background:none;text-shadow:none;filter:none;height:auto;width:auto}.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.mc4wp-form input[type="submit"]:hover,.mc4wp-form button:hover,.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{color:#333333;text-decoration:none;background:none}.mc4wp-form input[type="submit"]:active,.mc4wp-form button:active{background-image:none;outline:0;-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.mc4wp-form input[type="submit"],.mc4wp-form button{color:#ffffff !important;background-color:#444444;border-color:#282828}.mc4wp-form input[type="submit"]:hover,.mc4wp-form button:hover,.mc4wp-form input[type="submit"]:active,.mc4wp-form button:active,.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{color:#ffffff;background-color:#282828;border-color:#111111}.mc4wp-form input[type="text"]:focus,.mc4wp-form input[type="email"]:focus,.mc4wp-form input[type="tel"]:focus,.mc4wp-form input[type="url"]:focus,.mc4wp-form input[type="date"]:focus,.mc4wp-form textarea:focus,.mc4wp-form select:focus{border-color:#444444}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/form-theme-green.css
CHANGED
@@ -1,23 +1 @@
|
|
1 |
-
.mc4wp-form input[type="submit"], .mc4wp-form button {
|
2 |
-
color: #ffffff !important;
|
3 |
-
background-color: #5cb85c;
|
4 |
-
border-color: #4cae4c;
|
5 |
-
}
|
6 |
-
|
7 |
-
.mc4wp-form input[type="submit"]:hover, .mc4wp-form button:hover,
|
8 |
-
.mc4wp-form input[type="submit"]:active, .mc4wp-form button:active,
|
9 |
-
.mc4wp-form input[type="submit"]:focus, .mc4wp-form button:focus {
|
10 |
-
color: #ffffff;
|
11 |
-
background-color: #47a447;
|
12 |
-
border-color: #398439;
|
13 |
-
}
|
14 |
-
|
15 |
-
.mc4wp-form input[type="text"]:focus,
|
16 |
-
.mc4wp-form input[type="email"]:focus,
|
17 |
-
.mc4wp-form input[type="tel"]:focus,
|
18 |
-
.mc4wp-form input[type="url"]:focus,
|
19 |
-
.mc4wp-form input[type="date"]:focus,
|
20 |
-
.mc4wp-form textarea:focus,
|
21 |
-
.mc4wp-form select:focus {
|
22 |
-
border-color: #5cb85c;
|
23 |
-
}
|
1 |
+
.mc4wp-form{margin:1em 0}.mc4wp-form label{display:block;font-weight:bold;margin-bottom:5px}.mc4wp-form ul,.mc4wp-form li{list-style:none;margin:0;padding:0}.mc4wp-form label>span,.mc4wp-form li>label{font-weight:normal}.mc4wp-form p>label:nth-child(2){margin-top:10px}.mc4wp-form input{vertical-align:baseline}.mc4wp-form input.placeholdersjs{color:#aaa !important}.mc4wp-form input[type="text"],.mc4wp-form input[type="email"],.mc4wp-form input[type="tel"],.mc4wp-form input[type="url"],.mc4wp-form input[type="date"],.mc4wp-form textarea,.mc4wp-form select{cursor:auto;display:block;width:100%;height:auto;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.mc4wp-form input[type="checkbox"],.mc4wp-form input[type="radio"]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form input[type="checkbox"]{-webkit-appearance:checkbox}.mc4wp-form input[type="radio"]{-webkit-appearance:radio}.mc4wp-form input[type="submit"],.mc4wp-form button,.mc4wp-form input[type="button"]{cursor:pointer;display:inline-block}.mc4wp-alert{margin:1em 0;padding:10px 15px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;display:block;position:relative}.mc4wp-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.mc4wp-notice{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.mc4wp-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.mc4wp-form{box-shadow:none !important;-webkit-box-shadow:none;-moz-box-shadow:none}.mc4wp-form p{margin:0 0 15px !important;padding:0}.mc4wp-form label{font-size:1em;margin:6px 0}.mc4wp-form input[type="text"],.mc4wp-form input[type="email"],.mc4wp-form input[type="tel"],.mc4wp-form input[type="url"],.mc4wp-form input[type="date"],.mc4wp-form textarea,.mc4wp-form select{width:100%;height:34px;margin:0;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555555;vertical-align:middle;background-color:#ffffff;border:1px solid #cccccc;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;-webkit-transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;background-image:none;text-shadow:none}.mc4wp-form input[type="text"]:focus,.mc4wp-form input[type="email"]:focus,.mc4wp-form input[type="tel"]:focus,.mc4wp-form input[type="url"]:focus,.mc4wp-form textarea:focus,.mc4wp-form select:focus{border-color:#66afe9;outline:0;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.mc4wp-form textarea{height:auto}.mc4wp-form input[readonly],.mc4wp-form input[disabled]{background-color:#eeeeee}.mc4wp-form input[type="submit"],.mc4wp-form button{display:inline-block;padding:6px 12px;margin:0;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;box-shadow:none;background:none;text-shadow:none;filter:none;height:auto;width:auto}.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.mc4wp-form input[type="submit"]:hover,.mc4wp-form button:hover,.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{color:#333333;text-decoration:none;background:none}.mc4wp-form input[type="submit"]:active,.mc4wp-form button:active{background-image:none;outline:0;-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.mc4wp-form input[type="submit"],.mc4wp-form button{color:#ffffff !important;background-color:#5cb85c;border-color:#4cae4c}.mc4wp-form input[type="submit"]:hover,.mc4wp-form button:hover,.mc4wp-form input[type="submit"]:active,.mc4wp-form button:active,.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{color:#ffffff;background-color:#47a447;border-color:#398439}.mc4wp-form input[type="text"]:focus,.mc4wp-form input[type="email"]:focus,.mc4wp-form input[type="tel"]:focus,.mc4wp-form input[type="url"]:focus,.mc4wp-form input[type="date"]:focus,.mc4wp-form textarea:focus,.mc4wp-form select:focus{border-color:#5cb85c}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/form-theme-light.css
CHANGED
@@ -1,13 +1 @@
|
|
1 |
-
.mc4wp-form input[type="submit"], .mc4wp-form button {
|
2 |
-
color: #333333 !important;
|
3 |
-
background-color: #ffffff;
|
4 |
-
border-color: #E6E6E6;
|
5 |
-
}
|
6 |
-
|
7 |
-
.mc4wp-form input[type="submit"]:hover, .mc4wp-form button:hover,
|
8 |
-
.mc4wp-form input[type="submit"]:active, .mc4wp-form button:active,
|
9 |
-
.mc4wp-form input[type="submit"]:focus, .mc4wp-form button:focus {
|
10 |
-
color: #E6E6E6;
|
11 |
-
background-color: #ebebeb;
|
12 |
-
border-color: #CCCCCC;
|
13 |
-
}
|
1 |
+
.mc4wp-form{margin:1em 0}.mc4wp-form label{display:block;font-weight:bold;margin-bottom:5px}.mc4wp-form ul,.mc4wp-form li{list-style:none;margin:0;padding:0}.mc4wp-form label>span,.mc4wp-form li>label{font-weight:normal}.mc4wp-form p>label:nth-child(2){margin-top:10px}.mc4wp-form input{vertical-align:baseline}.mc4wp-form input.placeholdersjs{color:#aaa !important}.mc4wp-form input[type="text"],.mc4wp-form input[type="email"],.mc4wp-form input[type="tel"],.mc4wp-form input[type="url"],.mc4wp-form input[type="date"],.mc4wp-form textarea,.mc4wp-form select{cursor:auto;display:block;width:100%;height:auto;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.mc4wp-form input[type="checkbox"],.mc4wp-form input[type="radio"]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form input[type="checkbox"]{-webkit-appearance:checkbox}.mc4wp-form input[type="radio"]{-webkit-appearance:radio}.mc4wp-form input[type="submit"],.mc4wp-form button,.mc4wp-form input[type="button"]{cursor:pointer;display:inline-block}.mc4wp-alert{margin:1em 0;padding:10px 15px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;display:block;position:relative}.mc4wp-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.mc4wp-notice{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.mc4wp-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.mc4wp-form{box-shadow:none !important;-webkit-box-shadow:none;-moz-box-shadow:none}.mc4wp-form p{margin:0 0 15px !important;padding:0}.mc4wp-form label{font-size:1em;margin:6px 0}.mc4wp-form input[type="text"],.mc4wp-form input[type="email"],.mc4wp-form input[type="tel"],.mc4wp-form input[type="url"],.mc4wp-form input[type="date"],.mc4wp-form textarea,.mc4wp-form select{width:100%;height:34px;margin:0;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555555;vertical-align:middle;background-color:#ffffff;border:1px solid #cccccc;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;-webkit-transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;background-image:none;text-shadow:none}.mc4wp-form input[type="text"]:focus,.mc4wp-form input[type="email"]:focus,.mc4wp-form input[type="tel"]:focus,.mc4wp-form input[type="url"]:focus,.mc4wp-form textarea:focus,.mc4wp-form select:focus{border-color:#66afe9;outline:0;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.mc4wp-form textarea{height:auto}.mc4wp-form input[readonly],.mc4wp-form input[disabled]{background-color:#eeeeee}.mc4wp-form input[type="submit"],.mc4wp-form button{display:inline-block;padding:6px 12px;margin:0;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;box-shadow:none;background:none;text-shadow:none;filter:none;height:auto;width:auto}.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.mc4wp-form input[type="submit"]:hover,.mc4wp-form button:hover,.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{color:#333333;text-decoration:none;background:none}.mc4wp-form input[type="submit"]:active,.mc4wp-form button:active{background-image:none;outline:0;-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.mc4wp-form input[type="submit"],.mc4wp-form button{color:#333333 !important;background-color:#ffffff;border-color:#E6E6E6}.mc4wp-form input[type="submit"]:hover,.mc4wp-form button:hover,.mc4wp-form input[type="submit"]:active,.mc4wp-form button:active,.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{color:#E6E6E6;background-color:#ebebeb;border-color:#CCCCCC}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/form-theme-red.css
CHANGED
@@ -1,23 +1 @@
|
|
1 |
-
.mc4wp-form input[type="submit"], .mc4wp-form button {
|
2 |
-
color: #ffffff !important;
|
3 |
-
background-color: #d9534f;
|
4 |
-
border-color: #d43f3a;
|
5 |
-
}
|
6 |
-
|
7 |
-
.mc4wp-form input[type="submit"]:hover, .mc4wp-form button:hover,
|
8 |
-
.mc4wp-form input[type="submit"]:active, .mc4wp-form button:active,
|
9 |
-
.mc4wp-form input[type="submit"]:focus, .mc4wp-form button:focus {
|
10 |
-
color: #ffffff;
|
11 |
-
background-color: #d2322d;
|
12 |
-
border-color: #ac2925;
|
13 |
-
}
|
14 |
-
|
15 |
-
.mc4wp-form input[type="text"]:focus,
|
16 |
-
.mc4wp-form input[type="email"]:focus,
|
17 |
-
.mc4wp-form input[type="tel"]:focus,
|
18 |
-
.mc4wp-form input[type="url"]:focus,
|
19 |
-
.mc4wp-form input[type="date"]:focus,
|
20 |
-
.mc4wp-form textarea:focus,
|
21 |
-
.mc4wp-form select:focus {
|
22 |
-
border-color: #d9534f;
|
23 |
-
}
|
1 |
+
.mc4wp-form{margin:1em 0}.mc4wp-form label{display:block;font-weight:bold;margin-bottom:5px}.mc4wp-form ul,.mc4wp-form li{list-style:none;margin:0;padding:0}.mc4wp-form label>span,.mc4wp-form li>label{font-weight:normal}.mc4wp-form p>label:nth-child(2){margin-top:10px}.mc4wp-form input{vertical-align:baseline}.mc4wp-form input.placeholdersjs{color:#aaa !important}.mc4wp-form input[type="text"],.mc4wp-form input[type="email"],.mc4wp-form input[type="tel"],.mc4wp-form input[type="url"],.mc4wp-form input[type="date"],.mc4wp-form textarea,.mc4wp-form select{cursor:auto;display:block;width:100%;height:auto;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.mc4wp-form input[type="checkbox"],.mc4wp-form input[type="radio"]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form input[type="checkbox"]{-webkit-appearance:checkbox}.mc4wp-form input[type="radio"]{-webkit-appearance:radio}.mc4wp-form input[type="submit"],.mc4wp-form button,.mc4wp-form input[type="button"]{cursor:pointer;display:inline-block}.mc4wp-alert{margin:1em 0;padding:10px 15px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;display:block;position:relative}.mc4wp-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.mc4wp-notice{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.mc4wp-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.mc4wp-form{box-shadow:none !important;-webkit-box-shadow:none;-moz-box-shadow:none}.mc4wp-form p{margin:0 0 15px !important;padding:0}.mc4wp-form label{font-size:1em;margin:6px 0}.mc4wp-form input[type="text"],.mc4wp-form input[type="email"],.mc4wp-form input[type="tel"],.mc4wp-form input[type="url"],.mc4wp-form input[type="date"],.mc4wp-form textarea,.mc4wp-form select{width:100%;height:34px;margin:0;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555555;vertical-align:middle;background-color:#ffffff;border:1px solid #cccccc;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;-webkit-transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;background-image:none;text-shadow:none}.mc4wp-form input[type="text"]:focus,.mc4wp-form input[type="email"]:focus,.mc4wp-form input[type="tel"]:focus,.mc4wp-form input[type="url"]:focus,.mc4wp-form textarea:focus,.mc4wp-form select:focus{border-color:#66afe9;outline:0;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.mc4wp-form textarea{height:auto}.mc4wp-form input[readonly],.mc4wp-form input[disabled]{background-color:#eeeeee}.mc4wp-form input[type="submit"],.mc4wp-form button{display:inline-block;padding:6px 12px;margin:0;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;box-shadow:none;background:none;text-shadow:none;filter:none;height:auto;width:auto}.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.mc4wp-form input[type="submit"]:hover,.mc4wp-form button:hover,.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{color:#333333;text-decoration:none}.mc4wp-form input[type="submit"]:active,.mc4wp-form button:active{background-image:none;outline:0;-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.mc4wp-form input[type="submit"],.mc4wp-form button{color:#ffffff !important;background-color:#d9534f;border-color:#d43f3a}.mc4wp-form input[type="submit"]:hover,.mc4wp-form button:hover,.mc4wp-form input[type="submit"]:active,.mc4wp-form button:active,.mc4wp-form input[type="submit"]:focus,.mc4wp-form button:focus{color:#ffffff;background-color:#d2322d;border-color:#ac2925}.mc4wp-form input[type="text"]:focus,.mc4wp-form input[type="email"]:focus,.mc4wp-form input[type="tel"]:focus,.mc4wp-form input[type="url"]:focus,.mc4wp-form input[type="date"]:focus,.mc4wp-form textarea:focus,.mc4wp-form select:focus{border-color:#d9534f}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/form.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.mc4wp-form{margin:1em 0}.mc4wp-form label{display:block;font-weight:bold;margin-bottom:5px}.mc4wp-form ul,.mc4wp-form li{list-style:none;margin:0;padding:0}.mc4wp-form label>span,.mc4wp-form li>label{font-weight:normal}.mc4wp-form p>label:nth-child(2){margin-top:10px}.mc4wp-form input{vertical-align:baseline}.mc4wp-form input.placeholdersjs{color:#aaa !important}.mc4wp-form input[type="text"],.mc4wp-form input[type="email"],.mc4wp-form input[type="tel"],.mc4wp-form input[type="url"],.mc4wp-form input[type="date"],.mc4wp-form textarea,.mc4wp-form select{cursor:auto;display:block;width:100%;height:auto;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.mc4wp-form input[type="checkbox"],.mc4wp-form input[type="radio"]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form input[type="checkbox"]{-webkit-appearance:checkbox}.mc4wp-form input[type="radio"]{-webkit-appearance:radio}.mc4wp-form input[type="submit"],.mc4wp-form button,.mc4wp-form input[type="button"]{cursor:pointer;display:inline-block}.mc4wp-alert{margin:1em 0;padding:10px 15px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;display:block;position:relative}.mc4wp-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.mc4wp-notice{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.mc4wp-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}
|
assets/js/admin.js
CHANGED
@@ -11,14 +11,40 @@
|
|
11 |
event.stopPropagation();
|
12 |
});
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
// Add buttons to QTags editor
|
16 |
(function() {
|
17 |
-
|
|
|
|
|
|
|
18 |
|
19 |
QTags.addButton( 'mc4wp_paragraph', '<p>', '<p>', '</p>', 'p', 'Paragraph tag', 1 );
|
20 |
QTags.addButton( 'mc4wp_label', 'label', '<label>', '</label>', 'l', 'Label tag', 2 );
|
21 |
QTags.addButton( 'mc4wp_subscriber_count', '# of subscribers', '{subscriber_count}', '', 's', 'Shows number of subscribers of selected list(s)' );
|
|
|
|
|
|
|
|
|
22 |
})();
|
23 |
|
24 |
|
11 |
event.stopPropagation();
|
12 |
});
|
13 |
|
14 |
+
$(document).delegate('#mc4wpformmarkup', 'keydown', function(e) {
|
15 |
+
var keyCode = e.keyCode || e.which;
|
16 |
+
|
17 |
+
if (keyCode == 9) {
|
18 |
+
e.preventDefault();
|
19 |
+
var start = this.selectionStart;
|
20 |
+
var end = this.selectionEnd;
|
21 |
+
|
22 |
+
// set textarea value to: text before caret + tab + text after caret
|
23 |
+
$(this).val($(this).val().substring(0, start)
|
24 |
+
+ "\t"
|
25 |
+
+ $(this).val().substring(end));
|
26 |
+
|
27 |
+
// put caret at right position again
|
28 |
+
this.selectionStart =
|
29 |
+
this.selectionEnd = start + 1;
|
30 |
+
}
|
31 |
+
});
|
32 |
+
|
33 |
|
34 |
// Add buttons to QTags editor
|
35 |
(function() {
|
36 |
+
|
37 |
+
if( window.QTags == undefined ) {
|
38 |
+
return;
|
39 |
+
}
|
40 |
|
41 |
QTags.addButton( 'mc4wp_paragraph', '<p>', '<p>', '</p>', 'p', 'Paragraph tag', 1 );
|
42 |
QTags.addButton( 'mc4wp_label', 'label', '<label>', '</label>', 'l', 'Label tag', 2 );
|
43 |
QTags.addButton( 'mc4wp_subscriber_count', '# of subscribers', '{subscriber_count}', '', 's', 'Shows number of subscribers of selected list(s)' );
|
44 |
+
if( window.mc4wp.has_captcha_plugin == true ) {
|
45 |
+
QTags.addButton( 'mc4wp_captcha', 'CAPTCHA', '[captcha]', '', 'c', 'Display a CAPTCHA field' );
|
46 |
+
}
|
47 |
+
|
48 |
})();
|
49 |
|
50 |
|
assets/sass/checkbox.scss
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* MailChimp for WP - Checkbox Styles */
|
2 |
+
#mc4wp-checkbox{
|
3 |
+
|
4 |
+
clear: both;
|
5 |
+
display: block;
|
6 |
+
|
7 |
+
input {
|
8 |
+
position: relative;
|
9 |
+
margin: 0 6px 0 0;
|
10 |
+
padding: 0;
|
11 |
+
vertical-align: middle;
|
12 |
+
display: inline-block !important;
|
13 |
+
max-width: 21px;
|
14 |
+
}
|
15 |
+
|
16 |
+
label {
|
17 |
+
display: block;
|
18 |
+
cursor: pointer;
|
19 |
+
width: auto;
|
20 |
+
}
|
21 |
+
|
22 |
+
}
|
23 |
+
|
24 |
+
#registerform #mc4wp-checkbox{
|
25 |
+
margin-bottom: 10px;
|
26 |
+
}
|
assets/sass/form-theme-blue.scss
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import "form-reset";
|
2 |
+
@import "form-theme-base";
|
3 |
+
|
4 |
+
.mc4wp-form input[type="submit"],
|
5 |
+
.mc4wp-form button {
|
6 |
+
color: #ffffff !important;
|
7 |
+
background-color: #428bca;
|
8 |
+
border-color: #357ebd;
|
9 |
+
}
|
10 |
+
|
11 |
+
.mc4wp-form input[type="submit"]:hover,
|
12 |
+
.mc4wp-form button:hover,
|
13 |
+
.mc4wp-form input[type="submit"]:active,
|
14 |
+
.mc4wp-form button:active,
|
15 |
+
.mc4wp-form input[type="submit"]:focus,
|
16 |
+
.mc4wp-form button:focus {
|
17 |
+
color: #ffffff;
|
18 |
+
background-color: #3276b1;
|
19 |
+
border-color: #285e8e;
|
20 |
+
}
|
21 |
+
|
22 |
+
.mc4wp-form input[type="text"]:focus,
|
23 |
+
.mc4wp-form input[type="email"]:focus,
|
24 |
+
.mc4wp-form input[type="tel"]:focus,
|
25 |
+
.mc4wp-form input[type="url"]:focus,
|
26 |
+
.mc4wp-form input[type="date"]:focus,
|
27 |
+
.mc4wp-form textarea:focus,
|
28 |
+
.mc4wp-form select:focus {
|
29 |
+
border-color: #428bca;
|
30 |
+
}
|
assets/sass/form-theme-dark.scss
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import "form-reset";
|
2 |
+
@import "form-theme-base";
|
3 |
+
|
4 |
+
.mc4wp-form input[type="submit"],
|
5 |
+
.mc4wp-form button {
|
6 |
+
color: #ffffff !important;
|
7 |
+
background-color: #444444;
|
8 |
+
border-color: #282828;
|
9 |
+
}
|
10 |
+
|
11 |
+
.mc4wp-form input[type="submit"]:hover,
|
12 |
+
.mc4wp-form button:hover,
|
13 |
+
.mc4wp-form input[type="submit"]:active,
|
14 |
+
.mc4wp-form button:active,
|
15 |
+
.mc4wp-form input[type="submit"]:focus,
|
16 |
+
.mc4wp-form button:focus {
|
17 |
+
color: #ffffff;
|
18 |
+
background-color: #282828;
|
19 |
+
border-color: #111111;
|
20 |
+
}
|
21 |
+
|
22 |
+
.mc4wp-form input[type="text"]:focus,
|
23 |
+
.mc4wp-form input[type="email"]:focus,
|
24 |
+
.mc4wp-form input[type="tel"]:focus,
|
25 |
+
.mc4wp-form input[type="url"]:focus,
|
26 |
+
.mc4wp-form input[type="date"]:focus,
|
27 |
+
.mc4wp-form textarea:focus,
|
28 |
+
.mc4wp-form select:focus {
|
29 |
+
border-color: #444444;
|
30 |
+
}
|
assets/sass/form-theme-green.scss
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import "form-reset";
|
2 |
+
@import "form-theme-base";
|
3 |
+
|
4 |
+
.mc4wp-form input[type="submit"],
|
5 |
+
.mc4wp-form button {
|
6 |
+
color: #ffffff !important;
|
7 |
+
background-color: #5cb85c;
|
8 |
+
border-color: #4cae4c;
|
9 |
+
}
|
10 |
+
|
11 |
+
.mc4wp-form input[type="submit"]:hover,
|
12 |
+
.mc4wp-form button:hover,
|
13 |
+
.mc4wp-form input[type="submit"]:active,
|
14 |
+
.mc4wp-form button:active,
|
15 |
+
.mc4wp-form input[type="submit"]:focus,
|
16 |
+
.mc4wp-form button:focus {
|
17 |
+
color: #ffffff;
|
18 |
+
background-color: #47a447;
|
19 |
+
border-color: #398439;
|
20 |
+
}
|
21 |
+
|
22 |
+
.mc4wp-form input[type="text"]:focus,
|
23 |
+
.mc4wp-form input[type="email"]:focus,
|
24 |
+
.mc4wp-form input[type="tel"]:focus,
|
25 |
+
.mc4wp-form input[type="url"]:focus,
|
26 |
+
.mc4wp-form input[type="date"]:focus,
|
27 |
+
.mc4wp-form textarea:focus,
|
28 |
+
.mc4wp-form select:focus {
|
29 |
+
border-color: #5cb85c;
|
30 |
+
}
|
assets/sass/form-theme-light.scss
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import "form-reset";
|
2 |
+
@import "form-theme-base";
|
3 |
+
|
4 |
+
.mc4wp-form input[type="submit"],
|
5 |
+
.mc4wp-form button {
|
6 |
+
color: #333333 !important;
|
7 |
+
background-color: #ffffff;
|
8 |
+
border-color: #E6E6E6;
|
9 |
+
}
|
10 |
+
|
11 |
+
.mc4wp-form input[type="submit"]:hover,
|
12 |
+
.mc4wp-form button:hover,
|
13 |
+
.mc4wp-form input[type="submit"]:active,
|
14 |
+
.mc4wp-form button:active,
|
15 |
+
.mc4wp-form input[type="submit"]:focus,
|
16 |
+
.mc4wp-form button:focus {
|
17 |
+
color: #E6E6E6;
|
18 |
+
background-color: #ebebeb;
|
19 |
+
border-color: #CCCCCC;
|
20 |
+
}
|
assets/sass/form-theme-red.scss
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import "form-reset";
|
2 |
+
@import "form-theme-base";
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
.mc4wp-form input[type="submit"],
|
7 |
+
.mc4wp-form button {
|
8 |
+
color: #ffffff !important;
|
9 |
+
background-color: #d9534f;
|
10 |
+
border-color: #d43f3a;
|
11 |
+
}
|
12 |
+
|
13 |
+
.mc4wp-form input[type="submit"]:hover,
|
14 |
+
.mc4wp-form button:hover,
|
15 |
+
.mc4wp-form input[type="submit"]:active,
|
16 |
+
.mc4wp-form button:active,
|
17 |
+
.mc4wp-form input[type="submit"]:focus,
|
18 |
+
.mc4wp-form button:focus {
|
19 |
+
color: #ffffff;
|
20 |
+
background-color: #d2322d;
|
21 |
+
border-color: #ac2925;
|
22 |
+
}
|
23 |
+
|
24 |
+
.mc4wp-form input[type="text"]:focus,
|
25 |
+
.mc4wp-form input[type="email"]:focus,
|
26 |
+
.mc4wp-form input[type="tel"]:focus,
|
27 |
+
.mc4wp-form input[type="url"]:focus,
|
28 |
+
.mc4wp-form input[type="date"]:focus,
|
29 |
+
.mc4wp-form textarea:focus,
|
30 |
+
.mc4wp-form select:focus {
|
31 |
+
border-color: #d9534f;
|
32 |
+
}
|
assets/sass/form.scss
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
@import "form-reset";
|
2 |
+
|
assets/sass/index.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if( ! defined("MC4WP_LITE_VERSION") ) {
|
3 |
+
header( 'Status: 403 Forbidden' );
|
4 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
5 |
+
exit;
|
6 |
+
}
|
assets/sass/partials/_form-reset.scss
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
/* MailChimp for WP - Default Form Styles */
|
3 |
+
.mc4wp-form{
|
4 |
+
margin: 1em 0;
|
5 |
+
}
|
6 |
+
|
7 |
+
.mc4wp-form label{
|
8 |
+
display: block;
|
9 |
+
font-weight: bold;
|
10 |
+
margin-bottom: 5px;
|
11 |
+
}
|
12 |
+
|
13 |
+
.mc4wp-form ul,
|
14 |
+
.mc4wp-form li {
|
15 |
+
list-style: none;
|
16 |
+
margin: 0;
|
17 |
+
padding: 0;
|
18 |
+
}
|
19 |
+
|
20 |
+
.mc4wp-form label > span,
|
21 |
+
.mc4wp-form li > label {
|
22 |
+
font-weight: normal;
|
23 |
+
}
|
24 |
+
|
25 |
+
.mc4wp-form p > label:nth-child(2) {
|
26 |
+
margin-top: 10px;
|
27 |
+
}
|
28 |
+
|
29 |
+
.mc4wp-form input {
|
30 |
+
vertical-align: baseline;
|
31 |
+
}
|
32 |
+
|
33 |
+
.mc4wp-form input.placeholdersjs {
|
34 |
+
color: #aaa !important;
|
35 |
+
}
|
36 |
+
|
37 |
+
.mc4wp-form input[type="text"],
|
38 |
+
.mc4wp-form input[type="email"],
|
39 |
+
.mc4wp-form input[type="tel"],
|
40 |
+
.mc4wp-form input[type="url"],
|
41 |
+
.mc4wp-form input[type="date"],
|
42 |
+
.mc4wp-form textarea,
|
43 |
+
.mc4wp-form select {
|
44 |
+
cursor: auto;
|
45 |
+
display: block;
|
46 |
+
width: 100%;
|
47 |
+
height: auto;
|
48 |
+
box-sizing: border-box;
|
49 |
+
-webkit-box-sizing: border-box;
|
50 |
+
-moz-box-sizing: border-box;
|
51 |
+
}
|
52 |
+
|
53 |
+
.mc4wp-form input[type="checkbox"],
|
54 |
+
.mc4wp-form input[type="radio"] {
|
55 |
+
position: relative;
|
56 |
+
margin: 0 6px 0 0;
|
57 |
+
padding: 0;
|
58 |
+
height: 13px;
|
59 |
+
width: 13px;
|
60 |
+
display: inline-block;
|
61 |
+
border: 0;
|
62 |
+
}
|
63 |
+
|
64 |
+
.mc4wp-form input[type="checkbox"] {
|
65 |
+
-webkit-appearance: checkbox;
|
66 |
+
}
|
67 |
+
|
68 |
+
.mc4wp-form input[type="radio"] {
|
69 |
+
-webkit-appearance: radio;
|
70 |
+
}
|
71 |
+
|
72 |
+
.mc4wp-form input[type="submit"],
|
73 |
+
.mc4wp-form button,
|
74 |
+
.mc4wp-form input[type="button"] {
|
75 |
+
cursor: pointer;
|
76 |
+
display: inline-block;
|
77 |
+
}
|
78 |
+
|
79 |
+
.mc4wp-alert{
|
80 |
+
margin: 1em 0;
|
81 |
+
padding: 10px 15px;
|
82 |
+
color: #c09853;
|
83 |
+
background-color: #fcf8e3;
|
84 |
+
border: 1px solid #fbeed5;
|
85 |
+
border-radius: 2px;
|
86 |
+
-moz-border-radius: 2px;
|
87 |
+
-webkit-border-radius: 2px;
|
88 |
+
display: block;
|
89 |
+
position: relative;
|
90 |
+
}
|
91 |
+
|
92 |
+
.mc4wp-success {
|
93 |
+
color: #468847;
|
94 |
+
background-color: #dff0d8;
|
95 |
+
border-color: #d6e9c6;
|
96 |
+
}
|
97 |
+
|
98 |
+
.mc4wp-notice {
|
99 |
+
color: #3a87ad;
|
100 |
+
background-color: #d9edf7;
|
101 |
+
border-color: #bce8f1;
|
102 |
+
}
|
103 |
+
|
104 |
+
.mc4wp-error {
|
105 |
+
color: #b94a48;
|
106 |
+
background-color: #f2dede;
|
107 |
+
border-color: #eed3d7;
|
108 |
+
}
|
assets/{css/form-theme-base.css → sass/partials/_form-theme-base.scss}
RENAMED
@@ -1,120 +1,120 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
box-shadow: none
|
5 |
-
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
.mc4wp-form input[type="
|
20 |
-
.mc4wp-form input[type="
|
21 |
-
.mc4wp-form input[type="
|
22 |
-
.mc4wp-form input[type="
|
23 |
-
.mc4wp-form
|
24 |
-
.mc4wp-form
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
border:
|
36 |
-
-
|
37 |
-
|
38 |
-
|
39 |
-
-
|
40 |
-
|
41 |
-
|
42 |
-
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
.mc4wp-form input[type="
|
50 |
-
.mc4wp-form input[type="
|
51 |
-
.mc4wp-form input[type="
|
52 |
-
.mc4wp-form
|
53 |
-
.mc4wp-form
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
.mc4wp-form input[
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
.mc4wp-form
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
font-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
border:
|
84 |
-
|
85 |
-
-
|
86 |
-
-
|
87 |
-
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
.mc4wp-form
|
99 |
-
|
100 |
-
outline:
|
101 |
-
outline:
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
.mc4wp-form
|
106 |
-
.mc4wp-form
|
107 |
-
.mc4wp-form
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
}
|
112 |
-
|
113 |
-
.mc4wp-form input[type="submit"]:active,
|
114 |
-
.mc4wp-form button:active {
|
115 |
-
background-image: none;
|
116 |
-
outline: 0;
|
117 |
-
-moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
118 |
-
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
119 |
-
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
120 |
}
|
1 |
+
/* Form base theme */
|
2 |
+
.mc4wp-form {
|
3 |
+
box-shadow: none !important;
|
4 |
+
-webkit-box-shadow: none;
|
5 |
+
-moz-box-shadow: none;
|
6 |
+
}
|
7 |
+
|
8 |
+
.mc4wp-form p {
|
9 |
+
margin: 0 0 15px !important;
|
10 |
+
padding: 0;
|
11 |
+
}
|
12 |
+
|
13 |
+
.mc4wp-form label{
|
14 |
+
font-size:1em;
|
15 |
+
margin:6px 0;
|
16 |
+
}
|
17 |
+
|
18 |
+
.mc4wp-form input[type="text"],
|
19 |
+
.mc4wp-form input[type="email"],
|
20 |
+
.mc4wp-form input[type="tel"],
|
21 |
+
.mc4wp-form input[type="url"],
|
22 |
+
.mc4wp-form input[type="date"],
|
23 |
+
.mc4wp-form textarea,
|
24 |
+
.mc4wp-form select {
|
25 |
+
width: 100%;
|
26 |
+
height: 34px;
|
27 |
+
margin: 0;
|
28 |
+
padding: 6px 12px;
|
29 |
+
font-size: 14px;
|
30 |
+
line-height: 1.428571429;
|
31 |
+
color: #555555;
|
32 |
+
vertical-align: middle;
|
33 |
+
background-color: #ffffff;
|
34 |
+
border: 1px solid #cccccc;
|
35 |
+
-moz-border-radius: 2px;
|
36 |
+
-webkit-border-radius: 2px;
|
37 |
+
border-radius: 2px;
|
38 |
+
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
39 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
40 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
41 |
+
-moz-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
42 |
+
-webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
43 |
+
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
44 |
+
background-image: none;
|
45 |
+
text-shadow: none;
|
46 |
+
}
|
47 |
+
|
48 |
+
.mc4wp-form input[type="text"]:focus,
|
49 |
+
.mc4wp-form input[type="email"]:focus,
|
50 |
+
.mc4wp-form input[type="tel"]:focus,
|
51 |
+
.mc4wp-form input[type="url"]:focus,
|
52 |
+
.mc4wp-form textarea:focus,
|
53 |
+
.mc4wp-form select:focus {
|
54 |
+
border-color: #66afe9;
|
55 |
+
outline: 0;
|
56 |
+
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
57 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
58 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
59 |
+
}
|
60 |
+
|
61 |
+
.mc4wp-form textarea{
|
62 |
+
height: auto;
|
63 |
+
}
|
64 |
+
|
65 |
+
.mc4wp-form input[readonly],
|
66 |
+
.mc4wp-form input[disabled] {
|
67 |
+
background-color: #eeeeee;
|
68 |
+
}
|
69 |
+
|
70 |
+
.mc4wp-form input[type="submit"],
|
71 |
+
.mc4wp-form button {
|
72 |
+
display: inline-block;
|
73 |
+
padding: 6px 12px;
|
74 |
+
margin: 0;
|
75 |
+
font-size: 14px;
|
76 |
+
font-weight: normal;
|
77 |
+
line-height: 1.428571429;
|
78 |
+
text-align: center;
|
79 |
+
white-space: nowrap;
|
80 |
+
vertical-align: middle;
|
81 |
+
cursor: pointer;
|
82 |
+
border: 1px solid transparent;
|
83 |
+
border-radius: 2px;
|
84 |
+
-webkit-user-select: none;
|
85 |
+
-moz-user-select: none;
|
86 |
+
-ms-user-select: none;
|
87 |
+
-o-user-select: none;
|
88 |
+
user-select: none;
|
89 |
+
box-shadow: none;
|
90 |
+
background: none;
|
91 |
+
text-shadow: none;
|
92 |
+
filter: none;
|
93 |
+
height: auto;
|
94 |
+
width: auto;
|
95 |
+
}
|
96 |
+
|
97 |
+
.mc4wp-form input[type="submit"]:focus,
|
98 |
+
.mc4wp-form button:focus {
|
99 |
+
outline: thin dotted #333;
|
100 |
+
outline: 5px auto -webkit-focus-ring-color;
|
101 |
+
outline-offset: -2px;
|
102 |
+
}
|
103 |
+
|
104 |
+
.mc4wp-form input[type="submit"]:hover,
|
105 |
+
.mc4wp-form button:hover,
|
106 |
+
.mc4wp-form input[type="submit"]:focus,
|
107 |
+
.mc4wp-form button:focus {
|
108 |
+
color: #333333;
|
109 |
+
text-decoration: none;
|
110 |
+
background: none;
|
111 |
+
}
|
112 |
+
|
113 |
+
.mc4wp-form input[type="submit"]:active,
|
114 |
+
.mc4wp-form button:active {
|
115 |
+
background-image: none;
|
116 |
+
outline: 0;
|
117 |
+
-moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
118 |
+
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
119 |
+
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
120 |
}
|
assets/sass/partials/index.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if( ! defined("MC4WP_LITE_VERSION") ) {
|
3 |
+
header( 'Status: 403 Forbidden' );
|
4 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
5 |
+
exit;
|
6 |
+
}
|
includes/class-admin.php
CHANGED
@@ -8,54 +8,72 @@ if( ! defined( "MC4WP_LITE_VERSION" ) ) {
|
|
8 |
|
9 |
class MC4WP_Lite_Admin
|
10 |
{
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
public function __construct()
|
13 |
{
|
14 |
-
|
15 |
-
add_action('admin_menu', array($this, 'build_menu'));
|
16 |
-
add_action( 'admin_enqueue_scripts', array($this, 'load_css_and_js') );
|
17 |
-
|
18 |
-
register_activation_hook( 'mailchimp-for-wp/mailchimp-for-wp.php', array( $this, 'delete_transients' ) );
|
19 |
-
register_deactivation_hook( 'mailchimp-for-wp/mailchimp-for-wp.php', array( $this, 'delete_transients' ) );
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
if( isset( $_GET['page'] ) ) {
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
}
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
34 |
}
|
|
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
|
46 |
/**
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
53 |
{
|
54 |
if( $editor_id !== 'mc4wpformmarkup' ) {
|
55 |
return $settings;
|
56 |
}
|
57 |
|
58 |
-
$settings['buttons'] = 'strong,em,link,
|
59 |
|
60 |
return $settings;
|
61 |
}
|
@@ -65,22 +83,33 @@ class MC4WP_Lite_Admin
|
|
65 |
* @param array $links
|
66 |
* @return array
|
67 |
*/
|
68 |
-
public function
|
69 |
{
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
73 |
return $links;
|
74 |
}
|
75 |
|
76 |
/**
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
/**
|
@@ -121,10 +150,8 @@ class MC4WP_Lite_Admin
|
|
121 |
public function validate_form_settings( $settings ) {
|
122 |
|
123 |
if( isset( $settings['markup'] ) ) {
|
124 |
-
|
125 |
// strip form tags (to prevent people from adding them)
|
126 |
$settings['markup'] = preg_replace( '/<\/?form(.|\s)*?>/i', '', $settings['markup'] );
|
127 |
-
|
128 |
}
|
129 |
|
130 |
return $settings;
|
@@ -135,8 +162,8 @@ class MC4WP_Lite_Admin
|
|
135 |
*/
|
136 |
public function load_css_and_js( $hook )
|
137 |
{
|
138 |
-
// only load files on the MailChimp for WordPress
|
139 |
-
if(
|
140 |
return;
|
141 |
}
|
142 |
|
@@ -145,27 +172,46 @@ class MC4WP_Lite_Admin
|
|
145 |
|
146 |
// js
|
147 |
wp_register_script( 'mc4wp-beautifyhtml', MC4WP_LITE_PLUGIN_URL . 'assets/js/beautify-html.js', array( 'jquery' ), MC4WP_LITE_VERSION, true );
|
148 |
-
wp_register_script( 'mc4wp-admin
|
149 |
-
wp_enqueue_script( array( 'jquery', 'mc4wp-beautifyhtml', 'mc4wp-admin
|
|
|
|
|
|
|
|
|
|
|
150 |
}
|
151 |
|
152 |
/**
|
153 |
-
|
154 |
-
|
155 |
-
|
|
|
156 |
public function get_checkbox_compatible_plugins()
|
157 |
{
|
158 |
$checkbox_plugins = array(
|
159 |
-
'comment_form' => "Comment form",
|
160 |
-
"registration_form" => "Registration form"
|
161 |
);
|
162 |
|
163 |
-
if(is_multisite())
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
166 |
|
167 |
-
if
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
return $checkbox_plugins;
|
171 |
}
|
@@ -175,7 +221,7 @@ class MC4WP_Lite_Admin
|
|
175 |
*/
|
176 |
public function redirect_to_pro()
|
177 |
{
|
178 |
-
?><script>window.location.replace('http://dannyvankooten.com/mailchimp-for-wordpress
|
179 |
}
|
180 |
|
181 |
/**
|
@@ -185,15 +231,10 @@ class MC4WP_Lite_Admin
|
|
185 |
{
|
186 |
$opts = mc4wp_get_options( 'general' );
|
187 |
$tab = 'api-settings';
|
188 |
-
|
189 |
-
if( empty( $opts['api_key'] ) ) {
|
190 |
-
$connected = false;
|
191 |
-
} else {
|
192 |
-
$connected = ( mc4wp_get_api()->is_connected() );
|
193 |
-
}
|
194 |
|
195 |
$lists = $this->get_mailchimp_lists();
|
196 |
-
|
197 |
}
|
198 |
|
199 |
/**
|
@@ -205,7 +246,7 @@ class MC4WP_Lite_Admin
|
|
205 |
$lists = $this->get_mailchimp_lists();
|
206 |
|
207 |
$tab = 'checkbox-settings';
|
208 |
-
|
209 |
}
|
210 |
|
211 |
/**
|
@@ -216,7 +257,7 @@ class MC4WP_Lite_Admin
|
|
216 |
$opts = mc4wp_get_options( 'form' );
|
217 |
$lists = $this->get_mailchimp_lists();
|
218 |
$tab = 'form-settings';
|
219 |
-
|
220 |
}
|
221 |
|
222 |
/**
|
@@ -228,19 +269,9 @@ class MC4WP_Lite_Admin
|
|
228 |
private function get_mailchimp_lists()
|
229 |
{
|
230 |
$cached_lists = get_transient( 'mc4wp_mailchimp_lists' );
|
231 |
-
$refresh_cache = ( isset( $
|
232 |
-
|
233 |
-
// force cache refresh if merge_vars are not set (deprecated)
|
234 |
-
if( ! $refresh_cache && $cached_lists ) {
|
235 |
-
if( ! is_array( $cached_lists ) ) {
|
236 |
-
$refresh_cache = true;
|
237 |
-
} else {
|
238 |
-
$first_list = reset( $cached_lists );
|
239 |
-
$refresh_cache = ! isset( $first_list->merge_vars );
|
240 |
-
}
|
241 |
-
}
|
242 |
|
243 |
-
if( $refresh_cache ||
|
244 |
// make api request for lists
|
245 |
$api = mc4wp_get_api();
|
246 |
$lists = array();
|
@@ -277,11 +308,11 @@ class MC4WP_Lite_Admin
|
|
277 |
}
|
278 |
|
279 |
// cache renewal triggered manually?
|
280 |
-
if(
|
281 |
-
if( $lists ) {
|
282 |
-
add_settings_error( "mc4wp", "cache-renewed", '
|
283 |
} else {
|
284 |
-
add_settings_error( "mc4wp", "cache-renew-failed", 'Failed to renew MailChimp cache - please try again later.' );
|
285 |
}
|
286 |
}
|
287 |
|
8 |
|
9 |
class MC4WP_Lite_Admin
|
10 |
{
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @var bool True if the BWS Captcha plugin is activated.
|
14 |
+
*/
|
15 |
+
private $has_captcha_plugin = false;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var string The relative path to the main plugin file from the plugins dir
|
19 |
+
*/
|
20 |
+
private $plugin_file = '';
|
21 |
+
|
22 |
public function __construct()
|
23 |
{
|
24 |
+
$this->plugin_file = plugin_basename( MC4WP_LITE_PLUGIN_FILE );
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
add_action( 'admin_init', array( $this, 'initialize' ) );
|
27 |
+
add_action( 'admin_menu', array( $this, 'build_menu' ) );
|
28 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'load_css_and_js' ) );
|
|
|
29 |
|
30 |
+
add_filter( 'plugin_action_links', array( $this, 'add_plugin_settings_link' ), 10, 2 );
|
31 |
+
add_filter( 'plugin_row_meta', array( $this, 'add_plugin_meta_links'), 10, 2 );
|
32 |
+
add_filter( 'quicktags_settings', array( $this, 'set_quicktags_buttons' ), 10, 2 );
|
|
|
33 |
|
34 |
+
// did the user click on upgrade to pro link?
|
35 |
+
if( isset( $_GET['page'] ) && $_GET['page'] == 'mc4wp-lite-upgrade' && false == headers_sent() ) {
|
36 |
+
header("Location: http://dannyvankooten.com/mailchimp-for-wordpress/#utm_source=lite-plugin&utm_medium=link&utm_campaign=menu-upgrade-link");
|
37 |
+
exit;
|
38 |
}
|
39 |
+
|
40 |
}
|
41 |
|
42 |
/**
|
43 |
+
* Initializes various stuff used in WP Admin
|
44 |
+
*
|
45 |
+
* - Registers settings
|
46 |
+
* - Checks if the Captcha plugin is activated
|
47 |
+
* - Loads the plugin text domain
|
48 |
+
*/
|
49 |
+
public function initialize() {
|
50 |
+
|
51 |
+
// register settings
|
52 |
+
register_setting( 'mc4wp_lite_settings', 'mc4wp_lite', array( $this, 'validate_settings' ) );
|
53 |
+
register_setting( 'mc4wp_lite_checkbox_settings', 'mc4wp_lite_checkbox');
|
54 |
+
register_setting( 'mc4wp_lite_form_settings', 'mc4wp_lite_form', array( $this, 'validate_form_settings' ) );
|
55 |
+
|
56 |
+
// load the plugin text domain
|
57 |
+
load_plugin_textdomain( 'mailchimp-for-wp', false, dirname( $this->plugin_file ) . '/languages/' );
|
58 |
+
|
59 |
+
// store whether this plugin has the BWS captcha plugin running (http://wordpress.org/plugins/captcha/)
|
60 |
+
$this->has_captcha_plugin = function_exists( 'cptch_display_captcha_custom' );
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
+
* Set which Quicktag buttons should appear in the form mark-up editor
|
65 |
+
*
|
66 |
+
* @param array $settings
|
67 |
+
* @param string $editor_id
|
68 |
+
* @return array
|
69 |
+
*/
|
70 |
+
public function set_quicktags_buttons( $settings, $editor_id = '' )
|
71 |
{
|
72 |
if( $editor_id !== 'mc4wpformmarkup' ) {
|
73 |
return $settings;
|
74 |
}
|
75 |
|
76 |
+
$settings['buttons'] = 'strong,em,link,img,ul,li,close';
|
77 |
|
78 |
return $settings;
|
79 |
}
|
83 |
* @param array $links
|
84 |
* @return array
|
85 |
*/
|
86 |
+
public function add_plugin_settings_link( $links, $file )
|
87 |
{
|
88 |
+
if( $file !== $this->plugin_file ) {
|
89 |
+
return $links;
|
90 |
+
}
|
91 |
+
|
92 |
+
$settings_link = '<a href="admin.php?page=mc4wp-lite">'. __( 'Settings' ) . '</a>';
|
93 |
+
array_unshift( $links, $settings_link );
|
94 |
return $links;
|
95 |
}
|
96 |
|
97 |
/**
|
98 |
+
* Adds meta links to the plugin in the WP Admin > Plugins screen
|
99 |
+
*
|
100 |
+
* @param array $links
|
101 |
+
* @param string $file
|
102 |
+
*
|
103 |
+
* @return array
|
104 |
+
*/
|
105 |
+
public function add_plugin_meta_links( $links, $file ) {
|
106 |
+
if( $file !== $this->plugin_file ) {
|
107 |
+
return $links;
|
108 |
+
}
|
109 |
+
|
110 |
+
$links[] = '<a href="http://wordpress.org/plugins/mailchimp-for-wp/faq/">FAQ</a>';
|
111 |
+
$links[] = '<a href="http://dannyvankooten.com/mailchimp-for-wordpress/#utm_source=lite-plugin&utm_medium=link&utm_campaign=plugins-upgrade-link">' . __( 'Upgrade to Pro', 'mailchimp-for-wp' ) . '</a>';
|
112 |
+
return $links;
|
113 |
}
|
114 |
|
115 |
/**
|
150 |
public function validate_form_settings( $settings ) {
|
151 |
|
152 |
if( isset( $settings['markup'] ) ) {
|
|
|
153 |
// strip form tags (to prevent people from adding them)
|
154 |
$settings['markup'] = preg_replace( '/<\/?form(.|\s)*?>/i', '', $settings['markup'] );
|
|
|
155 |
}
|
156 |
|
157 |
return $settings;
|
162 |
*/
|
163 |
public function load_css_and_js( $hook )
|
164 |
{
|
165 |
+
// only load asset files on the MailChimp for WordPress settings pages
|
166 |
+
if( false === isset( $_GET['page'] ) || false === stristr( $_GET['page'], 'mc4wp-lite' ) ) {
|
167 |
return;
|
168 |
}
|
169 |
|
172 |
|
173 |
// js
|
174 |
wp_register_script( 'mc4wp-beautifyhtml', MC4WP_LITE_PLUGIN_URL . 'assets/js/beautify-html.js', array( 'jquery' ), MC4WP_LITE_VERSION, true );
|
175 |
+
wp_register_script( 'mc4wp-admin', MC4WP_LITE_PLUGIN_URL . 'assets/js/admin.js', array( 'jquery' ), MC4WP_LITE_VERSION, true );
|
176 |
+
wp_enqueue_script( array( 'jquery', 'mc4wp-beautifyhtml', 'mc4wp-admin' ) );
|
177 |
+
wp_localize_script( 'mc4wp-admin', 'mc4wp',
|
178 |
+
array(
|
179 |
+
'has_captcha_plugin' => $this->has_captcha_plugin
|
180 |
+
)
|
181 |
+
);
|
182 |
}
|
183 |
|
184 |
/**
|
185 |
+
* Returns available checkbox integrations
|
186 |
+
*
|
187 |
+
* @return array
|
188 |
+
*/
|
189 |
public function get_checkbox_compatible_plugins()
|
190 |
{
|
191 |
$checkbox_plugins = array(
|
192 |
+
'comment_form' => __( "Comment form", 'mailchimp-for-wp' ),
|
193 |
+
"registration_form" => __( "Registration form", 'mailchimp-for-wp' )
|
194 |
);
|
195 |
|
196 |
+
if( is_multisite() ) {
|
197 |
+
$checkbox_plugins['multisite_form'] = __( "MultiSite forms", 'mailchimp-for-wp' );
|
198 |
+
}
|
199 |
+
|
200 |
+
if( class_exists("BuddyPress") ) {
|
201 |
+
$checkbox_plugins['buddypress_form'] = __( "BuddyPress registration", 'mailchimp-for-wp' );
|
202 |
+
}
|
203 |
|
204 |
+
if( class_exists('bbPress') ) {
|
205 |
+
$checkbox_plugins['bbpress_forms'] = "bbPress";
|
206 |
+
}
|
207 |
+
|
208 |
+
if ( class_exists( 'Easy_Digital_Downloads' ) ) {
|
209 |
+
$checkbox_plugins['_edd_checkout'] = "(PRO ONLY) Easy Digital Downloads checkout";
|
210 |
+
}
|
211 |
+
|
212 |
+
if ( class_exists( 'Woocommerce' ) ) {
|
213 |
+
$checkbox_plugins['_woocommerce_checkout'] = "(PRO ONLY) WooCommerce checkout";
|
214 |
+
}
|
215 |
|
216 |
return $checkbox_plugins;
|
217 |
}
|
221 |
*/
|
222 |
public function redirect_to_pro()
|
223 |
{
|
224 |
+
?><script type="text/javascript">window.location.replace('http://dannyvankooten.com/mailchimp-for-wordpress/#utm_source=lite-plugin&utm_medium=link&utm_campaign=menu-upgrade-link'); </script><?php
|
225 |
}
|
226 |
|
227 |
/**
|
231 |
{
|
232 |
$opts = mc4wp_get_options( 'general' );
|
233 |
$tab = 'api-settings';
|
234 |
+
$connected = ( mc4wp_get_api()->is_connected() );
|
|
|
|
|
|
|
|
|
|
|
235 |
|
236 |
$lists = $this->get_mailchimp_lists();
|
237 |
+
require MC4WP_LITE_PLUGIN_DIR . 'includes/views/api-settings.php';
|
238 |
}
|
239 |
|
240 |
/**
|
246 |
$lists = $this->get_mailchimp_lists();
|
247 |
|
248 |
$tab = 'checkbox-settings';
|
249 |
+
require MC4WP_LITE_PLUGIN_DIR . 'includes/views/checkbox-settings.php';
|
250 |
}
|
251 |
|
252 |
/**
|
257 |
$opts = mc4wp_get_options( 'form' );
|
258 |
$lists = $this->get_mailchimp_lists();
|
259 |
$tab = 'form-settings';
|
260 |
+
require MC4WP_LITE_PLUGIN_DIR . 'includes/views/form-settings.php';
|
261 |
}
|
262 |
|
263 |
/**
|
269 |
private function get_mailchimp_lists()
|
270 |
{
|
271 |
$cached_lists = get_transient( 'mc4wp_mailchimp_lists' );
|
272 |
+
$refresh_cache = ( isset( $_POST['mc4wp-renew-cache'] ) && $_POST['mc4wp-renew-cache'] == 1 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
|
274 |
+
if( true === $refresh_cache || false === $cached_lists || empty( $cached_lists ) ) {
|
275 |
// make api request for lists
|
276 |
$api = mc4wp_get_api();
|
277 |
$lists = array();
|
308 |
}
|
309 |
|
310 |
// cache renewal triggered manually?
|
311 |
+
if( $refresh_cache ) {
|
312 |
+
if( false === empty( $lists ) ) {
|
313 |
+
add_settings_error( "mc4wp", "cache-renewed", __('MailChimp cache successfully renewed.', 'mailchimp-for-wp' ), 'updated' );
|
314 |
} else {
|
315 |
+
add_settings_error( "mc4wp", "cache-renew-failed", __('Failed to renew MailChimp cache - please try again later.', 'mailchimp-for-wp' ) );
|
316 |
}
|
317 |
}
|
318 |
|
includes/class-api.php
CHANGED
@@ -12,10 +12,25 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
12 |
* @uses WP_HTTP
|
13 |
*/
|
14 |
class MC4WP_Lite_API {
|
15 |
-
|
|
|
|
|
|
|
16 |
private $api_url = 'https://api.mailchimp.com/2.0/';
|
|
|
|
|
|
|
|
|
17 |
private $api_key = '';
|
|
|
|
|
|
|
|
|
18 |
private $error_message = '';
|
|
|
|
|
|
|
|
|
19 |
private $connected = null;
|
20 |
|
21 |
/**
|
@@ -53,7 +68,7 @@ class MC4WP_Lite_API {
|
|
53 |
*/
|
54 |
public function is_connected()
|
55 |
{
|
56 |
-
if( $this->connected
|
57 |
|
58 |
$this->connected = false;
|
59 |
$result = $this->call( 'helper/ping' );
|
@@ -61,7 +76,7 @@ class MC4WP_Lite_API {
|
|
61 |
if( $result !== false ) {
|
62 |
if( isset( $result->msg ) && $result->msg === "Everything's Chimpy!" ) {
|
63 |
$this->connected = true;
|
64 |
-
}
|
65 |
$this->show_error( "MailChimp Error: " . $result->error );
|
66 |
}
|
67 |
}
|
@@ -233,18 +248,19 @@ class MC4WP_Lite_API {
|
|
233 |
'sslverify' => false
|
234 |
)
|
235 |
);
|
236 |
-
|
|
|
237 |
if( is_wp_error( $response ) ) {
|
238 |
-
|
239 |
// show error message to admins
|
240 |
$this->show_error( "HTTP Error: " . $response->get_error_message() );
|
241 |
-
|
242 |
return false;
|
243 |
}
|
244 |
|
245 |
-
// dirty fix for older WP
|
246 |
-
if($method
|
247 |
-
return (object) array(
|
|
|
|
|
248 |
}
|
249 |
|
250 |
$body = wp_remote_retrieve_body( $response );
|
12 |
* @uses WP_HTTP
|
13 |
*/
|
14 |
class MC4WP_Lite_API {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
private $api_url = 'https://api.mailchimp.com/2.0/';
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
private $api_key = '';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
private $error_message = '';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @var boolean
|
33 |
+
*/
|
34 |
private $connected = null;
|
35 |
|
36 |
/**
|
68 |
*/
|
69 |
public function is_connected()
|
70 |
{
|
71 |
+
if( $this->connected === null ) {
|
72 |
|
73 |
$this->connected = false;
|
74 |
$result = $this->call( 'helper/ping' );
|
76 |
if( $result !== false ) {
|
77 |
if( isset( $result->msg ) && $result->msg === "Everything's Chimpy!" ) {
|
78 |
$this->connected = true;
|
79 |
+
} elseif( isset( $result->error ) ) {
|
80 |
$this->show_error( "MailChimp Error: " . $result->error );
|
81 |
}
|
82 |
}
|
248 |
'sslverify' => false
|
249 |
)
|
250 |
);
|
251 |
+
|
252 |
+
// test for wp errors
|
253 |
if( is_wp_error( $response ) ) {
|
|
|
254 |
// show error message to admins
|
255 |
$this->show_error( "HTTP Error: " . $response->get_error_message() );
|
|
|
256 |
return false;
|
257 |
}
|
258 |
|
259 |
+
// dirty fix for older WP versions
|
260 |
+
if( $method === 'helper/ping' && isset( $response['headers']['content-length'] ) && (int) $response['headers']['content-length'] === 44 ) {
|
261 |
+
return (object) array(
|
262 |
+
'msg' => "Everything's Chimpy!"
|
263 |
+
);
|
264 |
}
|
265 |
|
266 |
$body = wp_remote_retrieve_body( $response );
|
includes/class-checkbox-manager.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if( ! defined("MC4WP_LITE_VERSION") ) {
|
4 |
+
header( 'Status: 403 Forbidden' );
|
5 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
class MC4WP_Lite_Checkbox_Manager
|
10 |
+
{
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Constructor
|
14 |
+
*/
|
15 |
+
public function __construct()
|
16 |
+
{
|
17 |
+
|
18 |
+
$opts = mc4wp_get_options( 'checkbox' );
|
19 |
+
|
20 |
+
// load checkbox css if necessary
|
21 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'load_stylesheet' ) );
|
22 |
+
add_action( 'login_enqueue_scripts', array( $this, 'load_stylesheet' ) );
|
23 |
+
|
24 |
+
// Load WP Comment Form Integration
|
25 |
+
if ( $opts['show_at_comment_form'] ) {
|
26 |
+
new MC4WP_Comment_Form_Integration();
|
27 |
+
}
|
28 |
+
|
29 |
+
// Load WordPress Registration Form Integration
|
30 |
+
if ( $opts['show_at_registration_form'] ) {
|
31 |
+
new MC4WP_Registration_Form_Integration();
|
32 |
+
}
|
33 |
+
|
34 |
+
// Load BuddyPress Integration
|
35 |
+
if ( $opts['show_at_buddypress_form'] ) {
|
36 |
+
new MC4WP_BuddyPress_Integration();
|
37 |
+
}
|
38 |
+
|
39 |
+
// Load MultiSite Integration
|
40 |
+
if ( $opts['show_at_multisite_form'] ) {
|
41 |
+
new MC4WP_MultiSite_Integration();
|
42 |
+
}
|
43 |
+
|
44 |
+
// Load bbPress Integration
|
45 |
+
if ( $opts['show_at_bbpress_forms'] ) {
|
46 |
+
new MC4WP_bbPress_Integration();
|
47 |
+
}
|
48 |
+
|
49 |
+
// Load CF7 Integration
|
50 |
+
if( function_exists( 'wpcf7_add_shortcode' ) ) {
|
51 |
+
new MC4WP_CF7_Integration();
|
52 |
+
}
|
53 |
+
|
54 |
+
// Always load General Integration
|
55 |
+
new MC4WP_General_Integration();
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Loads the checkbox stylesheet
|
61 |
+
*/
|
62 |
+
public function load_stylesheet( ) {
|
63 |
+
|
64 |
+
$opts = mc4wp_get_options('checkbox');
|
65 |
+
|
66 |
+
if( $opts['css'] == false ) {
|
67 |
+
return false;
|
68 |
+
}
|
69 |
+
|
70 |
+
wp_enqueue_style( 'mailchimp-for-wp-checkbox', MC4WP_LITE_PLUGIN_URL . 'assets/css/checkbox.css', array(), MC4WP_LITE_VERSION, 'all' );
|
71 |
+
return true;
|
72 |
+
}
|
73 |
+
|
74 |
+
}
|
includes/class-checkbox.php
DELETED
@@ -1,523 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if( ! defined("MC4WP_LITE_VERSION") ) {
|
4 |
-
header( 'Status: 403 Forbidden' );
|
5 |
-
header( 'HTTP/1.1 403 Forbidden' );
|
6 |
-
exit;
|
7 |
-
}
|
8 |
-
|
9 |
-
class MC4WP_Lite_Checkbox
|
10 |
-
{
|
11 |
-
/**
|
12 |
-
* @var boolean
|
13 |
-
*/
|
14 |
-
private $showed_checkbox = false;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Constructor
|
18 |
-
*/
|
19 |
-
public function __construct()
|
20 |
-
{
|
21 |
-
$opts = mc4wp_get_options('checkbox');
|
22 |
-
|
23 |
-
add_action('init', array( $this, 'initialize' ) );
|
24 |
-
|
25 |
-
// load checkbox css if necessary
|
26 |
-
if ( $opts['css'] ) {
|
27 |
-
add_filter( 'mc4wp_stylesheets', array( $this, 'add_stylesheet' ) );
|
28 |
-
}
|
29 |
-
|
30 |
-
/* Comment Form Actions */
|
31 |
-
if($opts['show_at_comment_form']) {
|
32 |
-
// hooks for checking if we should subscribe the commenter
|
33 |
-
add_action('comment_post', array($this, 'subscribe_from_comment'), 20, 2);
|
34 |
-
|
35 |
-
// hooks for outputting the checkbox
|
36 |
-
add_action('thesis_hook_after_comment_box', array($this,'output_checkbox'), 20);
|
37 |
-
add_action('comment_form', array($this,'output_checkbox'), 20);
|
38 |
-
}
|
39 |
-
|
40 |
-
/* Registration Form Actions */
|
41 |
-
if($opts['show_at_registration_form']) {
|
42 |
-
add_action('register_form',array($this, 'output_checkbox'),20);
|
43 |
-
add_action('user_register',array($this, 'subscribe_from_registration'), 80, 1);
|
44 |
-
}
|
45 |
-
|
46 |
-
/* BuddyPress Form Actions */
|
47 |
-
if($opts['show_at_buddypress_form']) {
|
48 |
-
add_action('bp_before_registration_submit_buttons', array($this, 'output_checkbox'), 20);
|
49 |
-
add_action('bp_complete_signup', array($this, 'subscribe_from_buddypress'), 20);
|
50 |
-
}
|
51 |
-
|
52 |
-
/* Multisite Form Actions */
|
53 |
-
if($opts['show_at_multisite_form']) {
|
54 |
-
add_action('signup_extra_fields', array($this, 'output_checkbox'), 20);
|
55 |
-
add_action('signup_blogform', array($this, 'add_multisite_hidden_checkbox'), 20);
|
56 |
-
add_action('wpmu_activate_blog', array($this, 'on_multisite_blog_signup'), 20, 5);
|
57 |
-
add_action('wpmu_activate_user', array($this, 'on_multisite_user_signup'), 20, 3);
|
58 |
-
|
59 |
-
add_filter('add_signup_meta', array($this, 'add_multisite_usermeta'));
|
60 |
-
}
|
61 |
-
|
62 |
-
/* bbPress actions */
|
63 |
-
if($opts['show_at_bbpress_forms']) {
|
64 |
-
add_action('bbp_theme_after_topic_form_subscriptions', array($this, 'output_checkbox'), 10);
|
65 |
-
add_action('bbp_theme_after_reply_form_subscription', array($this, 'output_checkbox'), 10);
|
66 |
-
add_action('bbp_theme_anonymous_form_extras_bottom', array($this, 'output_checkbox'), 10);
|
67 |
-
add_action('bbp_new_topic', array($this, 'subscribe_from_bbpress_new_topic'), 10, 4);
|
68 |
-
add_action('bbp_new_reply', array($this, 'subscribe_from_bbpress_new_reply'), 10, 5);
|
69 |
-
}
|
70 |
-
|
71 |
-
}
|
72 |
-
|
73 |
-
public function initialize()
|
74 |
-
{
|
75 |
-
if( function_exists( "wpcf7_add_shortcode" ) ) {
|
76 |
-
wpcf7_add_shortcode( 'mc4wp_checkbox', array( $this, 'get_checkbox') );
|
77 |
-
add_action( 'wpcf7_posted_data', array( $this, 'alter_cf7_data') );
|
78 |
-
add_action( 'wpcf7_mail_sent', array( $this, 'subscribe_from_cf7' ) );
|
79 |
-
}
|
80 |
-
|
81 |
-
// catch-all (for manual integrations with third-party forms)
|
82 |
-
if( isset( $_POST['mc4wp-try-subscribe'] ) && $_POST['mc4wp-try-subscribe'] ) {
|
83 |
-
$this->subscribe_from_whatever();
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
public function get_checkbox( $args = array() )
|
88 |
-
{
|
89 |
-
$opts = mc4wp_get_options('checkbox');
|
90 |
-
|
91 |
-
$label = isset( $args['labels'][0] ) ? $args['labels'][0] : $opts['label'];
|
92 |
-
$checked = $opts['precheck'] ? "checked" : '';
|
93 |
-
|
94 |
-
// CF7 checkbox?
|
95 |
-
if( is_array( $args ) && isset( $args['type'] ) ) {
|
96 |
-
|
97 |
-
// check for default:0 or default:1 to set the checked attribute
|
98 |
-
if( in_array( 'default:1', $args['options'] ) ) {
|
99 |
-
$checked = 'checked';
|
100 |
-
} else if( in_array( 'default:0', $args['options'] ) ) {
|
101 |
-
$checked = '';
|
102 |
-
}
|
103 |
-
|
104 |
-
}
|
105 |
-
|
106 |
-
$content = "\n<!-- Checkbox by MailChimp for WordPress plugin v". MC4WP_LITE_VERSION ." - http://dannyvankooten.com/mailchimp-for-wordpress/ -->\n";
|
107 |
-
|
108 |
-
do_action('mc4wp_before_checkbox');
|
109 |
-
|
110 |
-
$content .= '<p id="mc4wp-checkbox">';
|
111 |
-
$content .= '<label><input type="checkbox" name="mc4wp-do-subscribe" value="1" '. $checked . ' /> ' . __($label) . '</label>';
|
112 |
-
$content .= '</p>';
|
113 |
-
|
114 |
-
do_action('mc4wp_after_checkbox');
|
115 |
-
|
116 |
-
$content .= "\n<!-- / MailChimp for WP Plugin -->\n";
|
117 |
-
return $content;
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Outputs a sign-up checkbox
|
122 |
-
*/
|
123 |
-
public function output_checkbox()
|
124 |
-
{
|
125 |
-
if( $this->showed_checkbox ) {
|
126 |
-
return;
|
127 |
-
}
|
128 |
-
|
129 |
-
// echo the sign-up checkbox
|
130 |
-
echo $this->get_checkbox();
|
131 |
-
|
132 |
-
$this->showed_checkbox = true;
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Adds the checkbox stylesheet to the array
|
137 |
-
* @param array $stylesheets
|
138 |
-
* @return array
|
139 |
-
*/
|
140 |
-
public function add_stylesheet( $stylesheets ) {
|
141 |
-
$stylesheets['checkbox'] = 1;
|
142 |
-
return $stylesheets;
|
143 |
-
}
|
144 |
-
|
145 |
-
|
146 |
-
/* Start comment form functions */
|
147 |
-
public function subscribe_from_comment( $cid, $comment_approved = '' ) {
|
148 |
-
if( ! isset( $_POST['mc4wp-do-subscribe'] ) || $_POST['mc4wp-do-subscribe'] != 1 ) {
|
149 |
-
return false;
|
150 |
-
}
|
151 |
-
|
152 |
-
if( $comment_approved === 'spam' ) {
|
153 |
-
return false;
|
154 |
-
}
|
155 |
-
|
156 |
-
$comment = get_comment( $cid );
|
157 |
-
|
158 |
-
$email = $comment->comment_author_email;
|
159 |
-
$merge_vars = array(
|
160 |
-
'OPTINIP' => $comment->comment_author_IP,
|
161 |
-
'NAME' => $comment->comment_author
|
162 |
-
);
|
163 |
-
|
164 |
-
return $this->subscribe( $email, $merge_vars );
|
165 |
-
}
|
166 |
-
|
167 |
-
public function add_comment_meta( $comment_id ) {
|
168 |
-
add_comment_meta($comment_id, 'mc4wp_subscribe', $_POST['mc4wp-do-subscribe'], true );
|
169 |
-
}
|
170 |
-
/* End comment form functions */
|
171 |
-
|
172 |
-
/* Start registration form functions */
|
173 |
-
public function subscribe_from_registration( $user_id ) {
|
174 |
-
|
175 |
-
if( ! isset( $_POST['mc4wp-do-subscribe'] ) || $_POST['mc4wp-do-subscribe'] != 1 ) {
|
176 |
-
return false;
|
177 |
-
}
|
178 |
-
|
179 |
-
// gather emailadress from user who WordPress registered
|
180 |
-
$user = get_userdata( $user_id );
|
181 |
-
if( $user == false ) {
|
182 |
-
return false;
|
183 |
-
}
|
184 |
-
|
185 |
-
$email = $user->user_email;
|
186 |
-
$merge_vars = array(
|
187 |
-
'NAME' => $user->user_login
|
188 |
-
);
|
189 |
-
|
190 |
-
if( isset( $user->user_firstname ) && ! empty( $user->user_firstname ) ) {
|
191 |
-
$merge_vars['FNAME'] = $user->user_firstname;
|
192 |
-
}
|
193 |
-
|
194 |
-
if( isset( $user->user_lastname ) && ! empty( $user->user_lastname ) ) {
|
195 |
-
$merge_vars['LNAME'] = $user->user_lastname;
|
196 |
-
}
|
197 |
-
|
198 |
-
$result = $this->subscribe( $email, $merge_vars );
|
199 |
-
}
|
200 |
-
/* End registration form functions */
|
201 |
-
|
202 |
-
/* Start BuddyPress functions */
|
203 |
-
public function subscribe_from_buddypress()
|
204 |
-
{
|
205 |
-
if( ! isset( $_POST['mc4wp-do-subscribe'] ) || $_POST['mc4wp-do-subscribe'] != 1 ) {
|
206 |
-
return false;
|
207 |
-
}
|
208 |
-
|
209 |
-
// gather emailadress and name from user who BuddyPress registered
|
210 |
-
$email = $_POST['signup_email'];
|
211 |
-
$merge_vars = array(
|
212 |
-
'NAME' => $_POST['signup_username']
|
213 |
-
);
|
214 |
-
|
215 |
-
return $this->subscribe( $email, $merge_vars );
|
216 |
-
}
|
217 |
-
/* End BuddyPress functions */
|
218 |
-
|
219 |
-
/* Start Multisite functions */
|
220 |
-
public function add_multisite_hidden_checkbox()
|
221 |
-
{
|
222 |
-
?><input type="hidden" name="mc4wp-do-subscribe" value="<?php echo ( isset( $_POST['mc4wp-do-subscribe'] ) ) ? 1 : 0; ?>" /><?php
|
223 |
-
}
|
224 |
-
|
225 |
-
public function on_multisite_blog_signup( $blog_id, $user_id, $a, $b ,$meta = null )
|
226 |
-
{
|
227 |
-
if( ! isset($meta['mc4wp-do-subscribe'] ) || $meta['mc4wp-do-subscribe'] != 1) {
|
228 |
-
return false;
|
229 |
-
}
|
230 |
-
|
231 |
-
return $this->subscribe_from_multisite($user_id);
|
232 |
-
}
|
233 |
-
|
234 |
-
public function on_multisite_user_signup($user_id, $password = NULL, $meta = NULL)
|
235 |
-
{
|
236 |
-
if( ! isset( $meta['mc4wp-do-subscribe'] ) || $meta['mc4wp-do-subscribe'] != 1 ) {
|
237 |
-
return false;
|
238 |
-
}
|
239 |
-
|
240 |
-
return $this->subscribe_from_multisite($user_id);
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
* Adds the checked state of the sign-up checkbox to the $meta array of Multisite sign-ups
|
245 |
-
*
|
246 |
-
* @param array $meta
|
247 |
-
* @return array
|
248 |
-
*/
|
249 |
-
public function add_multisite_usermeta( $meta = array() )
|
250 |
-
{
|
251 |
-
$meta['mc4wp-do-subscribe'] = ( isset( $_POST['mc4wp-do-subscribe'] ) ) ? 1 : 0;
|
252 |
-
return $meta;
|
253 |
-
}
|
254 |
-
|
255 |
-
/**
|
256 |
-
* Subscribes from Multisite sign-ups
|
257 |
-
* @param int $user_id
|
258 |
-
*/
|
259 |
-
public function subscribe_from_multisite( $user_id )
|
260 |
-
{
|
261 |
-
$user = get_userdata( $user_id );
|
262 |
-
|
263 |
-
if( ! is_object( $user ) ) {
|
264 |
-
return false;
|
265 |
-
}
|
266 |
-
|
267 |
-
$email = $user->user_email;
|
268 |
-
$merge_vars = array(
|
269 |
-
'NAME' => $user->first_name . ' ' . $user->last_name
|
270 |
-
);
|
271 |
-
$result = $this->subscribe( $email, $merge_vars );
|
272 |
-
}
|
273 |
-
/* End Multisite functions */
|
274 |
-
|
275 |
-
/* Start Contact Form 7 functions */
|
276 |
-
|
277 |
-
/**
|
278 |
-
* Adds the checkbox state to CF7 email data
|
279 |
-
* @param array $data
|
280 |
-
* @return array
|
281 |
-
*/
|
282 |
-
public function alter_cf7_data( $data = array() ) {
|
283 |
-
$data['mc4wp_checkbox'] = ( isset( $_POST['mc4wp-do-subscribe'] ) && $_POST['mc4wp-do-subscribe'] == 1 ) ? __("Yes") : __("No");
|
284 |
-
return $data;
|
285 |
-
}
|
286 |
-
|
287 |
-
/**
|
288 |
-
* Subscribe from Contact Form 7 submissions
|
289 |
-
* @param array $args (optional)
|
290 |
-
*/
|
291 |
-
public function subscribe_from_cf7( $args = null )
|
292 |
-
{
|
293 |
-
// check if CF7 "mc4wp" checkbox was checked
|
294 |
-
if( ! isset( $_POST['mc4wp-do-subscribe'] ) || ! $_POST['mc4wp-do-subscribe'] ) {
|
295 |
-
return false;
|
296 |
-
}
|
297 |
-
|
298 |
-
$_POST['mc4wp-try-subscribe'] = 1;
|
299 |
-
unset( $_POST['mc4wp-do-subscribe'] );
|
300 |
-
|
301 |
-
return $this->subscribe_from_whatever();
|
302 |
-
}
|
303 |
-
/* End Contact Form 7 functions */
|
304 |
-
|
305 |
-
/* Start whatever functions */
|
306 |
-
public function subscribe_from_whatever()
|
307 |
-
{
|
308 |
-
if(! isset( $_POST['mc4wp-try-subscribe'] ) || ! $_POST['mc4wp-try-subscribe'] ) {
|
309 |
-
return false;
|
310 |
-
}
|
311 |
-
|
312 |
-
// start running..
|
313 |
-
$email = null;
|
314 |
-
$merge_vars = array(
|
315 |
-
'GROUPINGS' => array()
|
316 |
-
);
|
317 |
-
|
318 |
-
foreach( $_POST as $key => $value ) {
|
319 |
-
|
320 |
-
if( $key == 'mc4wp-try-subscribe' ) {
|
321 |
-
continue;
|
322 |
-
} elseif( strtolower( substr( $key, 0, 6 ) ) == 'mc4wp-' ) {
|
323 |
-
// find extra fields which should be sent to MailChimp
|
324 |
-
$key = strtoupper( substr( $key, 6 ) );
|
325 |
-
|
326 |
-
if( $key == 'EMAIL' ) {
|
327 |
-
$email = $value;
|
328 |
-
} elseif( $key == 'GROUPINGS' && is_array( $value ) ) {
|
329 |
-
|
330 |
-
$groupings = $value;
|
331 |
-
|
332 |
-
foreach( $groupings as $grouping_id_or_name => $groups ) {
|
333 |
-
|
334 |
-
$grouping = array();
|
335 |
-
|
336 |
-
// group ID or group name given?
|
337 |
-
if( is_numeric( $grouping_id_or_name ) ) {
|
338 |
-
$grouping['id'] = $grouping_id_or_name;
|
339 |
-
} else {
|
340 |
-
$grouping['name'] = $grouping_id_or_name;
|
341 |
-
}
|
342 |
-
|
343 |
-
// comma separated list should become an array
|
344 |
-
if( ! is_array( $groups ) ) {
|
345 |
-
$grouping['groups'] = explode( ',', $groups );
|
346 |
-
} else {
|
347 |
-
$grouping['groups'] = $groups;
|
348 |
-
}
|
349 |
-
|
350 |
-
// add grouping to array
|
351 |
-
$merge_vars['GROUPINGS'][] = $grouping;
|
352 |
-
|
353 |
-
} // end foreach
|
354 |
-
|
355 |
-
} elseif( ! isset( $merge_vars[$key] ) ) {
|
356 |
-
|
357 |
-
// if value is array, convert to comma-delimited string
|
358 |
-
if( is_array( $value ) ) {
|
359 |
-
$value = implode( ',', $value );
|
360 |
-
}
|
361 |
-
|
362 |
-
$merge_vars[$key] = $value;
|
363 |
-
}
|
364 |
-
|
365 |
-
} elseif( ! $email && is_email( $value ) ) {
|
366 |
-
// find first email field
|
367 |
-
$email = $value;
|
368 |
-
} else {
|
369 |
-
$simple_key = str_replace( array( '-', '_' ), '', strtolower( $key ) );
|
370 |
-
|
371 |
-
if( ! isset( $merge_vars['NAME'] ) && in_array( $simple_key, array( 'name', 'yourname', 'username', 'fullname' ) ) ) {
|
372 |
-
// find name field
|
373 |
-
$merge_vars['NAME'] = $value;
|
374 |
-
}
|
375 |
-
|
376 |
-
if( ! isset( $merge_vars['FNAME'] ) && in_array( $simple_key, array( 'firstname', 'fname', "givenname", "forename" ) ) ) {
|
377 |
-
// find first name field
|
378 |
-
$merge_vars['FNAME'] = $value;
|
379 |
-
}
|
380 |
-
|
381 |
-
if( ! isset($merge_vars['LNAME']) && in_array( $simple_key, array( 'lastname', 'lname', 'surname', 'familyname' ) ) ) {
|
382 |
-
// find last name field
|
383 |
-
$merge_vars['LNAME'] = $value;
|
384 |
-
}
|
385 |
-
}
|
386 |
-
} // end foreach $_POST
|
387 |
-
|
388 |
-
|
389 |
-
// unset groupings if not used
|
390 |
-
if( empty( $merge_vars['GROUPINGS'] ) ) {
|
391 |
-
unset( $merge_vars['GROUPINGS'] );
|
392 |
-
}
|
393 |
-
|
394 |
-
// if email has not been found by the smart field guessing, return false.. sorry
|
395 |
-
if( ! $email ) {
|
396 |
-
return false;
|
397 |
-
}
|
398 |
-
|
399 |
-
// subscribe
|
400 |
-
$result = $this->subscribe( $email, $merge_vars );
|
401 |
-
return true;
|
402 |
-
}
|
403 |
-
/* End whatever functions */
|
404 |
-
|
405 |
-
/**
|
406 |
-
* @param array $anonymous_data
|
407 |
-
* @param int $user_id
|
408 |
-
* @return boolean
|
409 |
-
*/
|
410 |
-
public function subscribe_from_bbpress( $anonymous_data, $user_id ) {
|
411 |
-
if( ! isset($_POST['mc4wp-do-subscribe'] ) || $_POST['mc4wp-do-subscribe'] != 1 ) {
|
412 |
-
return;
|
413 |
-
}
|
414 |
-
|
415 |
-
if( $anonymous_data ) {
|
416 |
-
|
417 |
-
$email = $anonymous_data['bbp_anonymous_email'];
|
418 |
-
$merge_vars = array(
|
419 |
-
'NAME' => $anonymous_data['bbp_anonymous_name']
|
420 |
-
);
|
421 |
-
|
422 |
-
} elseif( $user_id ) {
|
423 |
-
|
424 |
-
$user_info = get_userdata( $user_id );
|
425 |
-
$email = $user_info->user_email;
|
426 |
-
$merge_vars = array(
|
427 |
-
'NAME' => $user_info->first_name . ' ' . $user_info->last_name,
|
428 |
-
'FNAME' => $user_info->first_name,
|
429 |
-
'LNAME' => $user_info->last_name
|
430 |
-
);
|
431 |
-
|
432 |
-
} else {
|
433 |
-
return false;
|
434 |
-
}
|
435 |
-
|
436 |
-
return $this->subscribe( $email, $merge_vars );
|
437 |
-
}
|
438 |
-
|
439 |
-
public function subscribe_from_bbpress_new_topic( $topic_id, $forum_id, $anonymous_data, $topic_author ) {
|
440 |
-
return $this->subscribe_from_bbpress( $anonymous_data, $topic_author );
|
441 |
-
}
|
442 |
-
|
443 |
-
public function subscribe_from_bbpress_new_reply( $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author )
|
444 |
-
{
|
445 |
-
return $this->subscribe_from_bbpress( $anonymous_data, $reply_author );
|
446 |
-
}
|
447 |
-
|
448 |
-
/**
|
449 |
-
* Sets up the required data and calls the API Subscribe method
|
450 |
-
*
|
451 |
-
* @param string $email
|
452 |
-
* @param array $merge_vars
|
453 |
-
* @return boolean
|
454 |
-
*/
|
455 |
-
public function subscribe( $email, array $merge_vars = array() )
|
456 |
-
{
|
457 |
-
$api = mc4wp_get_api();
|
458 |
-
$opts = mc4wp_get_options('checkbox');
|
459 |
-
|
460 |
-
$lists = $opts['lists'];
|
461 |
-
|
462 |
-
if( ! $lists || empty( $lists ) ) {
|
463 |
-
|
464 |
-
if( ( ! defined("DOING_AJAX") || ! DOING_AJAX ) && current_user_can( 'manage_options' ) ) {
|
465 |
-
wp_die('
|
466 |
-
<h3>MailChimp for WP - Error</h3>
|
467 |
-
<p>Please select a list to subscribe to in the <a href="'. admin_url('admin.php?page=mc4wp-lite-checkbox-settings') .'">checkbox settings</a>.</p>
|
468 |
-
<p style="font-style:italic; font-size:12px;">This message is only visible to administrators for debugging purposes.</p>
|
469 |
-
', "Error - MailChimp for WP", array( 'back_link' => true ) );
|
470 |
-
}
|
471 |
-
|
472 |
-
return 'no_lists_selected';
|
473 |
-
}
|
474 |
-
|
475 |
-
|
476 |
-
// guess FNAME and LNAME
|
477 |
-
if ( isset( $merge_vars['NAME'] ) && ! isset( $merge_vars['FNAME'] ) && ! isset( $merge_vars['LNAME'] ) ) {
|
478 |
-
|
479 |
-
$strpos = strpos( $merge_vars['NAME'], ' ' );
|
480 |
-
|
481 |
-
if ( $strpos ) {
|
482 |
-
$merge_vars['FNAME'] = trim( substr( $merge_vars['NAME'], 0, $strpos ) );
|
483 |
-
$merge_vars['LNAME'] = trim( substr( $merge_vars['NAME'], $strpos ) );
|
484 |
-
} else {
|
485 |
-
$merge_vars['FNAME'] = $merge_vars['NAME'];
|
486 |
-
}
|
487 |
-
}
|
488 |
-
|
489 |
-
$merge_vars = apply_filters( 'mc4wp_merge_vars', $merge_vars, '' );
|
490 |
-
$email_type = apply_filters( 'mc4wp_email_type', 'html' );
|
491 |
-
$lists = apply_filters( 'mc4wp_lists', $lists, $merge_vars );
|
492 |
-
|
493 |
-
foreach( $lists as $list ) {
|
494 |
-
$result = $api->subscribe( $list, $email, $merge_vars, $email_type, $opts['double_optin'] );
|
495 |
-
|
496 |
-
if( $result === true ) {
|
497 |
-
$from_url = ( isset( $_SERVER['HTTP_REFERER'] ) ) ? $_SERVER['HTTP_REFERER'] : '';
|
498 |
-
do_action( 'mc4wp_subscribe_checkbox', $email, $list, $merge_vars );
|
499 |
-
}
|
500 |
-
}
|
501 |
-
|
502 |
-
// check if result succeeded, show debug message to administrators
|
503 |
-
if( $result !== true && $api->has_error() && current_user_can( 'manage_options' ) && ! defined( "DOING_AJAX" ) )
|
504 |
-
{
|
505 |
-
wp_die("
|
506 |
-
<h3>MailChimp for WP - Error</h3>
|
507 |
-
<p>The MailChimp server returned the following error message as a response to our sign-up request:</p>
|
508 |
-
<pre>" . $api->get_error_message() . "</pre>
|
509 |
-
<p>This is the data that was sent to MailChimp: </p>
|
510 |
-
<strong>Email</strong>
|
511 |
-
<pre>{$email}</pre>
|
512 |
-
<strong>Merge variables</strong>
|
513 |
-
<pre>" . print_r( $merge_vars, true ) . "</pre>
|
514 |
-
<p style=\"font-style:italic; font-size:12px; \">This message is only visible to administrators for debugging purposes.</p>
|
515 |
-
", "Error - MailChimp for WP", array( 'back_link' => true ) );
|
516 |
-
}
|
517 |
-
|
518 |
-
return $result;
|
519 |
-
}
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/{class-form.php → class-form-manager.php}
RENAMED
@@ -9,7 +9,7 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
9 |
/**
|
10 |
* This class takes care of all form related functionality
|
11 |
*/
|
12 |
-
class
|
13 |
|
14 |
/**
|
15 |
* @var int
|
@@ -44,7 +44,8 @@ class MC4WP_Lite_Form {
|
|
44 |
add_filter( 'widget_text', 'shortcode_unautop' );
|
45 |
add_filter( 'widget_text', 'do_shortcode', 11 );
|
46 |
|
47 |
-
|
|
|
48 |
|
49 |
// has a MC4WP form been submitted?
|
50 |
if ( isset( $_POST['_mc4wp_form_submit'] ) ) {
|
@@ -73,28 +74,27 @@ class MC4WP_Lite_Form {
|
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
-
*
|
77 |
-
*
|
78 |
-
* @param array $stylesheets
|
79 |
-
* @return array
|
80 |
*/
|
81 |
-
public function
|
82 |
$opts = mc4wp_get_options('form');
|
83 |
|
84 |
-
|
85 |
-
|
|
|
86 |
|
87 |
-
|
88 |
-
$stylesheets['form'] = 1;
|
89 |
|
|
|
|
|
|
|
|
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
return $stylesheets;
|
98 |
}
|
99 |
|
100 |
/**
|
@@ -135,7 +135,7 @@ class MC4WP_Lite_Form {
|
|
135 |
$opts = mc4wp_get_options('form');
|
136 |
|
137 |
if ( ! function_exists( 'mc4wp_replace_variables' ) ) {
|
138 |
-
include_once MC4WP_LITE_PLUGIN_DIR . 'includes/template
|
139 |
}
|
140 |
|
141 |
// allow developers to add css classes
|
@@ -151,10 +151,16 @@ class MC4WP_Lite_Form {
|
|
151 |
$form_markup = __( $opts['markup'] );
|
152 |
|
153 |
// replace special values
|
154 |
-
$form_markup =
|
155 |
$form_markup = mc4wp_replace_variables( $form_markup, array_values( $opts['lists'] ) );
|
156 |
|
157 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
do_action( 'mc4wp_before_form_fields', 0 );
|
159 |
|
160 |
// allow plugins to alter form content
|
@@ -237,6 +243,12 @@ class MC4WP_Lite_Form {
|
|
237 |
return false;
|
238 |
}
|
239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
// allow plugins to add additional validation
|
241 |
$valid_form_request = apply_filters( 'mc4wp_valid_form_request', true );
|
242 |
if( $valid_form_request !== true ) {
|
9 |
/**
|
10 |
* This class takes care of all form related functionality
|
11 |
*/
|
12 |
+
class MC4WP_Lite_Form_Manager {
|
13 |
|
14 |
/**
|
15 |
* @var int
|
44 |
add_filter( 'widget_text', 'shortcode_unautop' );
|
45 |
add_filter( 'widget_text', 'do_shortcode', 11 );
|
46 |
|
47 |
+
// load checkbox css if necessary
|
48 |
+
add_action('wp_enqueue_scripts', array( $this, 'load_stylesheet' ) );
|
49 |
|
50 |
// has a MC4WP form been submitted?
|
51 |
if ( isset( $_POST['_mc4wp_form_submit'] ) ) {
|
74 |
}
|
75 |
|
76 |
/**
|
77 |
+
* Load the form stylesheet(s)
|
|
|
|
|
|
|
78 |
*/
|
79 |
+
public function load_stylesheet( ) {
|
80 |
$opts = mc4wp_get_options('form');
|
81 |
|
82 |
+
if( $opts['css'] == false ) {
|
83 |
+
return false;
|
84 |
+
}
|
85 |
|
86 |
+
if( $opts['css'] != 1 && $opts['css'] != 'default' ) {
|
|
|
87 |
|
88 |
+
$form_theme = $opts['css'];
|
89 |
+
if( in_array( $form_theme, array( 'blue', 'green', 'dark', 'light', 'red' ) ) ) {
|
90 |
+
wp_enqueue_style( 'mailchimp-for-wp-form-theme-' . $opts['css'], MC4WP_LITE_PLUGIN_URL . "assets/css/form-theme-{$opts['css']}.css", array(), MC4WP_LITE_VERSION, 'all' );
|
91 |
+
}
|
92 |
|
93 |
+
} else {
|
94 |
+
wp_enqueue_style( 'mailchimp-for-wp-form', MC4WP_LITE_PLUGIN_URL . "assets/css/form.css", array(), MC4WP_LITE_VERSION, 'all' );
|
95 |
+
}
|
96 |
+
|
97 |
+
return true;
|
|
|
|
|
98 |
}
|
99 |
|
100 |
/**
|
135 |
$opts = mc4wp_get_options('form');
|
136 |
|
137 |
if ( ! function_exists( 'mc4wp_replace_variables' ) ) {
|
138 |
+
include_once MC4WP_LITE_PLUGIN_DIR . 'includes/functions/template.php';
|
139 |
}
|
140 |
|
141 |
// allow developers to add css classes
|
151 |
$form_markup = __( $opts['markup'] );
|
152 |
|
153 |
// replace special values
|
154 |
+
$form_markup = str_ireplace( array( '%N%', '{n}' ), $this->form_instance_number, $form_markup );
|
155 |
$form_markup = mc4wp_replace_variables( $form_markup, array_values( $opts['lists'] ) );
|
156 |
|
157 |
+
// insert captcha
|
158 |
+
if( function_exists( 'cptch_display_captcha_custom' ) ) {
|
159 |
+
$captcha_fields = '<input type="hidden" name="_mc4wp_has_captcha" value="1" /><input type="hidden" name="cntctfrm_contact_action" value="true" />' . cptch_display_captcha_custom();
|
160 |
+
$form_markup = str_ireplace( '[captcha]', $captcha_fields, $form_markup );
|
161 |
+
}
|
162 |
+
|
163 |
+
// allow plugins to add form fieldsq
|
164 |
do_action( 'mc4wp_before_form_fields', 0 );
|
165 |
|
166 |
// allow plugins to alter form content
|
243 |
return false;
|
244 |
}
|
245 |
|
246 |
+
// check if captcha was present and valid
|
247 |
+
if( isset( $_POST['_mc4wp_has_captcha'] ) && $_POST['_mc4wp_has_captcha'] == 1 && function_exists( 'cptch_check_custom_form' ) && cptch_check_custom_form() !== true ) {
|
248 |
+
$this->error = 'invalid_captcha';
|
249 |
+
return false;
|
250 |
+
}
|
251 |
+
|
252 |
// allow plugins to add additional validation
|
253 |
$valid_form_request = apply_filters( 'mc4wp_valid_form_request', true );
|
254 |
if( $valid_form_request !== true ) {
|
includes/class-plugin.php
CHANGED
@@ -9,12 +9,12 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
9 |
class MC4WP_Lite {
|
10 |
|
11 |
/**
|
12 |
-
* @var
|
13 |
*/
|
14 |
private $form_manager;
|
15 |
|
16 |
/**
|
17 |
-
* @var
|
18 |
*/
|
19 |
private $checkbox_manager;
|
20 |
|
@@ -33,6 +33,8 @@ class MC4WP_Lite {
|
|
33 |
*/
|
34 |
public function __construct() {
|
35 |
|
|
|
|
|
36 |
// Check whether to run the upgrade routine
|
37 |
$db_code_version = get_option( 'mc4wp_code_version', 0 );
|
38 |
if( version_compare( $this->code_version, $db_code_version, "<" ) ) {
|
@@ -40,26 +42,62 @@ class MC4WP_Lite {
|
|
40 |
}
|
41 |
|
42 |
// checkbox
|
43 |
-
|
44 |
-
$this->checkbox_manager = new MC4WP_Lite_Checkbox();
|
45 |
|
46 |
// form
|
47 |
-
|
48 |
-
$this->form_manager = new MC4WP_Lite_Form();
|
49 |
|
50 |
// widget
|
51 |
add_action( 'widgets_init', array( $this, 'register_widget' ) );
|
52 |
|
53 |
if ( ! is_admin() ) {
|
54 |
// frontend only
|
55 |
-
include_once MC4WP_LITE_PLUGIN_DIR . 'includes/template
|
56 |
|
57 |
-
// load css
|
58 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'load_stylesheets' ), 90 );
|
59 |
-
add_action( 'login_enqueue_scripts', array( $this, 'load_stylesheets' ) );
|
60 |
}
|
61 |
}
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
/**
|
64 |
* @return MC4WP_Lite_Checkbox
|
65 |
*/
|
@@ -80,7 +118,6 @@ class MC4WP_Lite {
|
|
80 |
public function get_api() {
|
81 |
|
82 |
if( $this->api === null ) {
|
83 |
-
require_once MC4WP_LITE_PLUGIN_DIR . 'includes/class-api.php';
|
84 |
$opts = mc4wp_get_options();
|
85 |
$this->api = new MC4WP_Lite_API( $opts['general']['api_key'] );
|
86 |
}
|
@@ -164,18 +201,7 @@ class MC4WP_Lite {
|
|
164 |
|
165 |
public function register_widget()
|
166 |
{
|
167 |
-
include_once MC4WP_LITE_PLUGIN_DIR . 'includes/class-widget.php';
|
168 |
register_widget( 'MC4WP_Lite_Widget' );
|
169 |
}
|
170 |
|
171 |
-
public function load_stylesheets()
|
172 |
-
{
|
173 |
-
$stylesheets = apply_filters('mc4wp_stylesheets', array());
|
174 |
-
|
175 |
-
if(!empty($stylesheets)) {
|
176 |
-
$stylesheet_url = add_query_arg($stylesheets, MC4WP_LITE_PLUGIN_URL . 'assets/css/css.php' );
|
177 |
-
wp_enqueue_style( 'mailchimp-for-wp', $stylesheet_url, array(), MC4WP_LITE_VERSION);
|
178 |
-
}
|
179 |
-
}
|
180 |
-
|
181 |
}
|
9 |
class MC4WP_Lite {
|
10 |
|
11 |
/**
|
12 |
+
* @var MC4WP_Lite_Form_Manager
|
13 |
*/
|
14 |
private $form_manager;
|
15 |
|
16 |
/**
|
17 |
+
* @var MC4WP_Lite_Checkbox_Manager
|
18 |
*/
|
19 |
private $checkbox_manager;
|
20 |
|
33 |
*/
|
34 |
public function __construct() {
|
35 |
|
36 |
+
spl_autoload_register( array( $this, 'autoload') );
|
37 |
+
|
38 |
// Check whether to run the upgrade routine
|
39 |
$db_code_version = get_option( 'mc4wp_code_version', 0 );
|
40 |
if( version_compare( $this->code_version, $db_code_version, "<" ) ) {
|
42 |
}
|
43 |
|
44 |
// checkbox
|
45 |
+
$this->checkbox_manager = new MC4WP_Lite_Checkbox_Manager();
|
|
|
46 |
|
47 |
// form
|
48 |
+
$this->form_manager = new MC4WP_Lite_Form_Manager();
|
|
|
49 |
|
50 |
// widget
|
51 |
add_action( 'widgets_init', array( $this, 'register_widget' ) );
|
52 |
|
53 |
if ( ! is_admin() ) {
|
54 |
// frontend only
|
55 |
+
include_once MC4WP_LITE_PLUGIN_DIR . 'includes/functions/template.php';
|
56 |
|
|
|
|
|
|
|
57 |
}
|
58 |
}
|
59 |
|
60 |
+
/**
|
61 |
+
* @return bool
|
62 |
+
*/
|
63 |
+
public function autoload( $class ) {
|
64 |
+
|
65 |
+
static $classes = null;
|
66 |
+
|
67 |
+
if( $classes === null ) {
|
68 |
+
|
69 |
+
$include_path = MC4WP_LITE_PLUGIN_DIR . 'includes/';
|
70 |
+
|
71 |
+
$classes = array(
|
72 |
+
'mc4wp_lite_api' => $include_path . 'class-api.php',
|
73 |
+
'mc4wp_lite_checkbox_manager' => $include_path . 'class-checkbox-manager.php',
|
74 |
+
'mc4wp_lite_form_manager' => $include_path . 'class-form-manager.php',
|
75 |
+
'mc4wp_lite_widget' => $include_path . 'class-widget.php',
|
76 |
+
|
77 |
+
// integrations
|
78 |
+
'mc4wp_integration' => $include_path . 'integrations/class-integration.php',
|
79 |
+
'mc4wp_bbpress_integration' => $include_path . 'integrations/class-bbpress.php',
|
80 |
+
'mc4wp_buddypress_integration' => $include_path . 'integrations/class-buddypress.php',
|
81 |
+
'mc4wp_cf7_integration' => $include_path . 'integrations/class-cf7.php',
|
82 |
+
'mc4wp_comment_form_integration' => $include_path . 'integrations/class-comment-form.php',
|
83 |
+
'mc4wp_general_integration' => $include_path . 'integrations/class-general.php',
|
84 |
+
'mc4wp_multisite_integration' => $include_path . 'integrations/class-multisite.php',
|
85 |
+
'mc4wp_registration_form_integration' => $include_path . 'integrations/class-registration-form.php',
|
86 |
+
);
|
87 |
+
}
|
88 |
+
|
89 |
+
$class_name = strtolower( $class );
|
90 |
+
|
91 |
+
if( isset( $classes[$class_name] ) ) {
|
92 |
+
require_once $classes[$class_name];
|
93 |
+
return true;
|
94 |
+
}
|
95 |
+
|
96 |
+
return false;
|
97 |
+
|
98 |
+
|
99 |
+
}
|
100 |
+
|
101 |
/**
|
102 |
* @return MC4WP_Lite_Checkbox
|
103 |
*/
|
118 |
public function get_api() {
|
119 |
|
120 |
if( $this->api === null ) {
|
|
|
121 |
$opts = mc4wp_get_options();
|
122 |
$this->api = new MC4WP_Lite_API( $opts['general']['api_key'] );
|
123 |
}
|
201 |
|
202 |
public function register_widget()
|
203 |
{
|
|
|
204 |
register_widget( 'MC4WP_Lite_Widget' );
|
205 |
}
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
}
|
includes/class-widget.php
CHANGED
@@ -41,7 +41,7 @@ class MC4WP_Lite_Widget extends WP_Widget {
|
|
41 |
|
42 |
// make sure template functions exist (for usage in avia layout builder)
|
43 |
if ( ! function_exists( 'mc4wp_get_form' ) ) {
|
44 |
-
include_once MC4WP_LITE_PLUGIN_DIR . 'includes/template
|
45 |
}
|
46 |
|
47 |
echo mc4wp_get_form(0);
|
41 |
|
42 |
// make sure template functions exist (for usage in avia layout builder)
|
43 |
if ( ! function_exists( 'mc4wp_get_form' ) ) {
|
44 |
+
include_once MC4WP_LITE_PLUGIN_DIR . 'includes/functions/template.php';
|
45 |
}
|
46 |
|
47 |
echo mc4wp_get_form(0);
|
includes/{functions.php → functions/general.php}
RENAMED
@@ -14,9 +14,14 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
14 |
* @return array
|
15 |
*/
|
16 |
function mc4wp_get_options( $key = null ) {
|
17 |
-
static $options;
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
if( ! $options ) {
|
20 |
$defaults = array(
|
21 |
'general' => array(
|
22 |
'api_key' => ''
|
@@ -35,11 +40,12 @@ function mc4wp_get_options( $key = null ) {
|
|
35 |
),
|
36 |
'form' => array(
|
37 |
'css' => 'default',
|
38 |
-
'markup' => "<p>\n\t<label for=\"mc4wp_email\">
|
39 |
'text_success' => 'Thank you, your sign-up request was successful! Please check your e-mail inbox.',
|
40 |
'text_error' => 'Oops. Something went wrong. Please try again later.',
|
41 |
'text_invalid_email' => 'Please provide a valid email address.',
|
42 |
'text_already_subscribed' => "Given email address is already subscribed, thank you!",
|
|
|
43 |
'redirect' => '',
|
44 |
'lists' => array(),
|
45 |
'double_optin' => 1,
|
@@ -55,16 +61,18 @@ function mc4wp_get_options( $key = null ) {
|
|
55 |
|
56 |
$options = array();
|
57 |
foreach ( $db_keys_option_keys as $db_key => $option_key ) {
|
58 |
-
$option = get_option( $db_key );
|
59 |
|
60 |
// add option to database to prevent query on every pageload
|
61 |
-
if ( $option
|
|
|
|
|
62 |
|
63 |
$options[$option_key] = array_merge( $defaults[$option_key], (array) $option );
|
64 |
}
|
65 |
}
|
66 |
|
67 |
-
if( $key ) {
|
68 |
return $options[$key];
|
69 |
}
|
70 |
|
14 |
* @return array
|
15 |
*/
|
16 |
function mc4wp_get_options( $key = null ) {
|
17 |
+
static $options = null;
|
18 |
+
|
19 |
+
if( null === $options ) {
|
20 |
+
|
21 |
+
$email_label = __( 'Email address', 'mailchimp-for-wp' );
|
22 |
+
$email_placeholder = __( 'Your email address', 'mailchimp-for-wp' );
|
23 |
+
$signup_button = __( 'Sign up', 'mailchimp-for-wp' );
|
24 |
|
|
|
25 |
$defaults = array(
|
26 |
'general' => array(
|
27 |
'api_key' => ''
|
40 |
),
|
41 |
'form' => array(
|
42 |
'css' => 'default',
|
43 |
+
'markup' => "<p>\n\t<label for=\"mc4wp_email\">{$email_label}: </label>\n\t<input type=\"email\" id=\"mc4wp_email\" name=\"EMAIL\" placeholder=\"{$email_placeholder}\" required />\n</p>\n\n<p>\n\t<input type=\"submit\" value=\"{$signup_button}\" />\n</p>",
|
44 |
'text_success' => 'Thank you, your sign-up request was successful! Please check your e-mail inbox.',
|
45 |
'text_error' => 'Oops. Something went wrong. Please try again later.',
|
46 |
'text_invalid_email' => 'Please provide a valid email address.',
|
47 |
'text_already_subscribed' => "Given email address is already subscribed, thank you!",
|
48 |
+
'text_invalid_captcha' => 'Please complete the CAPTCHA.',
|
49 |
'redirect' => '',
|
50 |
'lists' => array(),
|
51 |
'double_optin' => 1,
|
61 |
|
62 |
$options = array();
|
63 |
foreach ( $db_keys_option_keys as $db_key => $option_key ) {
|
64 |
+
$option = get_option( $db_key, false );
|
65 |
|
66 |
// add option to database to prevent query on every pageload
|
67 |
+
if ( $option === false ) {
|
68 |
+
add_option( $db_key, $defaults[$option_key] );
|
69 |
+
}
|
70 |
|
71 |
$options[$option_key] = array_merge( $defaults[$option_key], (array) $option );
|
72 |
}
|
73 |
}
|
74 |
|
75 |
+
if( null !== $key ) {
|
76 |
return $options[$key];
|
77 |
}
|
78 |
|
includes/{template-functions.php → functions/template.php}
RENAMED
@@ -44,12 +44,12 @@ function mc4wp_get_form( $id = 0 ) {
|
|
44 |
function mc4wp_replace_variables( $text, $list_ids = array() ) {
|
45 |
$needles = array( '{ip}', '{current_url}', '{date}', '{time}' );
|
46 |
$replacements = array( $_SERVER['REMOTE_ADDR'], mc4wp_get_current_url(), date( "m/d/Y" ), date( "H:i:s" ) );
|
47 |
-
$text =
|
48 |
|
49 |
-
// subscriber count?
|
50 |
-
if (
|
51 |
$subscriber_count = mc4wp_get_subscriber_count( $list_ids );
|
52 |
-
$text =
|
53 |
}
|
54 |
|
55 |
$needles = array( '{user_email}', '{user_firstname}', '{user_lastname}', '{user_name}', '{user_id}' );
|
@@ -75,7 +75,7 @@ function mc4wp_replace_variables( $text, $list_ids = array() ) {
|
|
75 |
function mc4wp_get_subscriber_count( $list_ids ) {
|
76 |
$list_counts = get_transient( 'mc4wp_list_counts' );
|
77 |
|
78 |
-
if (
|
79 |
// make api call
|
80 |
$api = mc4wp_get_api();
|
81 |
$lists = $api->get_lists();
|
44 |
function mc4wp_replace_variables( $text, $list_ids = array() ) {
|
45 |
$needles = array( '{ip}', '{current_url}', '{date}', '{time}' );
|
46 |
$replacements = array( $_SERVER['REMOTE_ADDR'], mc4wp_get_current_url(), date( "m/d/Y" ), date( "H:i:s" ) );
|
47 |
+
$text = str_ireplace( $needles, $replacements, $text );
|
48 |
|
49 |
+
// subscriber count? only fetch these if the tag is actually used
|
50 |
+
if ( stristr( $text, '{subscriber_count}' ) != false ) {
|
51 |
$subscriber_count = mc4wp_get_subscriber_count( $list_ids );
|
52 |
+
$text = str_ireplace( '{subscriber_count}', $subscriber_count, $text );
|
53 |
}
|
54 |
|
55 |
$needles = array( '{user_email}', '{user_firstname}', '{user_lastname}', '{user_name}', '{user_id}' );
|
75 |
function mc4wp_get_subscriber_count( $list_ids ) {
|
76 |
$list_counts = get_transient( 'mc4wp_list_counts' );
|
77 |
|
78 |
+
if ( false === $list_counts ) {
|
79 |
// make api call
|
80 |
$api = mc4wp_get_api();
|
81 |
$lists = $api->get_lists();
|
includes/integrations/class-bbpress.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// prevent direct file access
|
4 |
+
if( ! defined("MC4WP_LITE_VERSION") ) {
|
5 |
+
header( 'Status: 403 Forbidden' );
|
6 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
class MC4WP_bbPress_Integration extends MC4WP_Integration {
|
11 |
+
|
12 |
+
public function __construct() {
|
13 |
+
add_action( 'bbp_theme_after_topic_form_subscriptions', array( $this, 'output_checkbox' ), 10 );
|
14 |
+
add_action( 'bbp_theme_after_reply_form_subscription', array( $this, 'output_checkbox' ), 10 );
|
15 |
+
add_action( 'bbp_theme_anonymous_form_extras_bottom', array( $this, 'output_checkbox' ), 10 );
|
16 |
+
add_action( 'bbp_new_topic', array( $this, 'subscribe_from_bbpress_new_topic' ), 10, 4 );
|
17 |
+
add_action( 'bbp_new_reply', array( $this, 'subscribe_from_bbpress_new_reply' ), 10, 5 );
|
18 |
+
}
|
19 |
+
|
20 |
+
public function output_checkbox( $hook = '' ) {
|
21 |
+
return parent::output_checkbox( 'bbpress_forms' );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param array $anonymous_data
|
26 |
+
* @param int $user_id
|
27 |
+
* @param string $trigger
|
28 |
+
* @return boolean
|
29 |
+
*/
|
30 |
+
public function subscribe_from_bbpress( $anonymous_data, $user_id, $trigger ) {
|
31 |
+
if ( $this->checkbox_was_checked === false ) {
|
32 |
+
return false;
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( $anonymous_data ) {
|
36 |
+
|
37 |
+
$email = $anonymous_data['bbp_anonymous_email'];
|
38 |
+
$merge_vars = array(
|
39 |
+
'NAME' => $anonymous_data['bbp_anonymous_name']
|
40 |
+
);
|
41 |
+
|
42 |
+
} elseif ( $user_id ) {
|
43 |
+
|
44 |
+
$user_info = get_userdata( $user_id );
|
45 |
+
$email = $user_info->user_email;
|
46 |
+
$merge_vars = array(
|
47 |
+
'NAME' => $user_info->first_name . ' ' . $user_info->last_name,
|
48 |
+
'FNAME' => $user_info->first_name,
|
49 |
+
'LNAME' => $user_info->last_name
|
50 |
+
);
|
51 |
+
|
52 |
+
} else {
|
53 |
+
return false;
|
54 |
+
}
|
55 |
+
|
56 |
+
return $this->subscribe( $email, $merge_vars, $trigger );
|
57 |
+
}
|
58 |
+
|
59 |
+
public function subscribe_from_bbpress_new_topic( $topic_id, $forum_id, $anonymous_data, $topic_author ) {
|
60 |
+
return $this->subscribe_from_bbpress( $anonymous_data, $topic_author, 'bbpress_new_topic' );
|
61 |
+
}
|
62 |
+
|
63 |
+
public function subscribe_from_bbpress_new_reply( $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author ) {
|
64 |
+
return $this->subscribe_from_bbpress( $anonymous_data, $reply_author, 'bbpress_new_reply' );
|
65 |
+
}
|
66 |
+
|
67 |
+
}
|
includes/integrations/class-buddypress.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// prevent direct file access
|
4 |
+
if( ! defined("MC4WP_LITE_VERSION") ) {
|
5 |
+
header( 'Status: 403 Forbidden' );
|
6 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
class MC4WP_BuddyPress_Integration extends MC4WP_Integration {
|
11 |
+
|
12 |
+
public function __construct() {
|
13 |
+
add_action( 'bp_before_registration_submit_buttons', array( $this, 'output_checkbox' ), 20 );
|
14 |
+
add_action( 'bp_core_signup_user', array( $this, 'subscribe_from_buddypress' ), 10, 4 );
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Output checkbox for BuddyPress registration form
|
19 |
+
*/
|
20 |
+
public function output_checkbox( $hook = '' ) {
|
21 |
+
return parent::output_checkbox( 'buddypress_form' );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Subscribes from BuddyPress Registration Form
|
26 |
+
* @param int $user_id
|
27 |
+
* @param string $user_login
|
28 |
+
* @param string $user_password
|
29 |
+
* @param string $user_email
|
30 |
+
* @param array $usermeta
|
31 |
+
*/
|
32 |
+
public function subscribe_from_buddypress( $user_id, $user_login, $user_password, $user_email ) {
|
33 |
+
|
34 |
+
if ( $this->checkbox_was_checked === false ) {
|
35 |
+
return false;
|
36 |
+
}
|
37 |
+
|
38 |
+
// gather emailadress and name from user who BuddyPress registered
|
39 |
+
$email = $user_email;
|
40 |
+
|
41 |
+
$merge_vars = array(
|
42 |
+
'NAME' => $user_login
|
43 |
+
);
|
44 |
+
|
45 |
+
return $this->subscribe( $email, $merge_vars, 'buddypress_registration' );
|
46 |
+
}
|
47 |
+
/* End BuddyPress functions */
|
48 |
+
|
49 |
+
}
|
includes/integrations/class-cf7.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// prevent direct file access
|
4 |
+
if( ! defined("MC4WP_LITE_VERSION") ) {
|
5 |
+
header( 'Status: 403 Forbidden' );
|
6 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
class MC4WP_CF7_Integration extends MC4WP_General_Integration {
|
11 |
+
|
12 |
+
protected $checkbox_name_value = '_mc4wp_subscribe';
|
13 |
+
|
14 |
+
public function __construct() {
|
15 |
+
|
16 |
+
$this->upgrade();
|
17 |
+
|
18 |
+
add_action( 'init', array( $this, 'init') );
|
19 |
+
|
20 |
+
add_action( 'wpcf7_mail_sent', array( $this, 'subscribe_from_cf7' ) );
|
21 |
+
add_action( 'wpcf7_posted_data', array( $this, 'alter_cf7_data') );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Registers the CF7 shortcode
|
26 |
+
* @return boolean
|
27 |
+
*/
|
28 |
+
public function init() {
|
29 |
+
|
30 |
+
if( ! function_exists( 'wpcf7_add_shortcode' ) ) {
|
31 |
+
return false;
|
32 |
+
}
|
33 |
+
|
34 |
+
wpcf7_add_shortcode( 'mc4wp_checkbox', array( $this, 'get_checkbox' ) );
|
35 |
+
return true;
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Alter Contact Form 7 data.
|
40 |
+
*
|
41 |
+
* Adds mc4wp_checkbox to post data so users can use `mcwp_checkbox` in their email templates
|
42 |
+
*
|
43 |
+
* @param array $data
|
44 |
+
* @return array
|
45 |
+
*/
|
46 |
+
public function alter_cf7_data( $data = array() ) {
|
47 |
+
$data['mc4wp_checkbox'] = $this->checkbox_was_checked() ? __("Yes") : __("No");
|
48 |
+
return $data;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Subscribe from Contact Form 7 Forms
|
53 |
+
* @param array $args
|
54 |
+
*/
|
55 |
+
public function subscribe_from_cf7( $args = null ) {
|
56 |
+
// was sign-up checkbox checked?
|
57 |
+
if ( $this->checkbox_was_checked() === false ) {
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
|
61 |
+
return $this->try_subscribe( 'cf7' );
|
62 |
+
}
|
63 |
+
|
64 |
+
}
|
includes/integrations/class-comment-form.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if( ! defined("MC4WP_LITE_VERSION") ) {
|
4 |
+
header( 'Status: 403 Forbidden' );
|
5 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
class MC4WP_Comment_Form_Integration extends MC4WP_Integration {
|
10 |
+
|
11 |
+
public function __construct() {
|
12 |
+
// hooks for outputting the checkbox
|
13 |
+
add_action( 'thesis_hook_after_comment_box', array( $this, 'output_checkbox' ), 10 );
|
14 |
+
add_action( 'comment_form', array( $this, 'output_checkbox' ), 10 );
|
15 |
+
|
16 |
+
// hooks for checking if we should subscribe the commenter
|
17 |
+
add_action( 'comment_post', array( $this, 'subscribe_from_comment' ), 40, 2 );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Outputs the checkbox for the comment form
|
22 |
+
*/
|
23 |
+
public function output_checkbox( $hook = '' ) {
|
24 |
+
return parent::output_checkbox( 'comment_form' );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Grabs data from WP Comment Form
|
29 |
+
*
|
30 |
+
* @param int $comment_ID
|
31 |
+
* @param string $comment_approved
|
32 |
+
*/
|
33 |
+
public function subscribe_from_comment( $comment_ID, $comment_approved = '' ) {
|
34 |
+
|
35 |
+
// was sign-up checkbox checked?
|
36 |
+
if ( $this->checkbox_was_checked() === false ) {
|
37 |
+
return false;
|
38 |
+
}
|
39 |
+
|
40 |
+
// is this a spam comment?
|
41 |
+
if ( $comment_approved === 'spam' ) {
|
42 |
+
return false;
|
43 |
+
}
|
44 |
+
|
45 |
+
$comment = get_comment( $comment_ID );
|
46 |
+
|
47 |
+
$email = $comment->comment_author_email;
|
48 |
+
$merge_vars = array(
|
49 |
+
'NAME' => $comment->comment_author,
|
50 |
+
'OPTIN_IP' => $comment->comment_author_IP
|
51 |
+
);
|
52 |
+
|
53 |
+
return $this->subscribe( $email, $merge_vars, 'comment' );
|
54 |
+
}
|
55 |
+
}
|
includes/integrations/class-general.php
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// prevent direct file access
|
4 |
+
if( ! defined( "MC4WP_LITE_VERSION" ) ) {
|
5 |
+
header( 'Status: 403 Forbidden' );
|
6 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
class MC4WP_General_Integration extends MC4WP_Integration {
|
11 |
+
|
12 |
+
protected $checkbox_name_value = 'mc4wp-subscribe';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Constructor
|
16 |
+
*/
|
17 |
+
public function __construct() {
|
18 |
+
// run backwards compatibility routine
|
19 |
+
$this->upgrade();
|
20 |
+
|
21 |
+
// hook actions
|
22 |
+
add_action( 'init', array( $this, 'try_subscribe' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Upgrade routine
|
27 |
+
* - Handles name change of checkbox for third-party form integrations: mc4wp-try-subscribe > mc4wp-subscribe
|
28 |
+
*/
|
29 |
+
public function upgrade() {
|
30 |
+
// set new $_POST trigger value
|
31 |
+
if( isset( $_POST['mc4wp-try-subscribe'] ) ) {
|
32 |
+
$_POST[ $this->checkbox_name_value ] = 1;
|
33 |
+
unset( $_POST['mc4wp-try-subscribe'] );
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Tries to subscribe from any third-party form (and CF7)
|
39 |
+
*
|
40 |
+
* @param string $trigger
|
41 |
+
*/
|
42 |
+
public function try_subscribe( $trigger = 'other_form' ) {
|
43 |
+
|
44 |
+
if ( $this->checkbox_was_checked() === false ) {
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
|
48 |
+
// start running..
|
49 |
+
$email = null;
|
50 |
+
$merge_vars = array(
|
51 |
+
'GROUPINGS' => array()
|
52 |
+
);
|
53 |
+
|
54 |
+
foreach( $_POST as $key => $value ) {
|
55 |
+
|
56 |
+
// @todo sanitize value
|
57 |
+
|
58 |
+
if( $key[0] === '_' || $key === $this->checkbox_name_value ) {
|
59 |
+
continue;
|
60 |
+
} elseif( strtolower( substr( $key, 0, 6 ) ) === 'mc4wp-' ) {
|
61 |
+
// find extra fields which should be sent to MailChimp
|
62 |
+
$key = strtoupper( substr( $key, 6 ) );
|
63 |
+
|
64 |
+
switch( $key ) {
|
65 |
+
case 'EMAIL':
|
66 |
+
$email = $value;
|
67 |
+
break;
|
68 |
+
|
69 |
+
case 'GROUPINGS':
|
70 |
+
$groupings = $value;
|
71 |
+
|
72 |
+
foreach($groupings as $grouping_id_or_name => $groups) {
|
73 |
+
|
74 |
+
$grouping = array();
|
75 |
+
|
76 |
+
// group ID or group name given?
|
77 |
+
if(is_numeric($grouping_id_or_name)) {
|
78 |
+
$grouping['id'] = $grouping_id_or_name;
|
79 |
+
} else {
|
80 |
+
$grouping['name'] = $grouping_id_or_name;
|
81 |
+
}
|
82 |
+
|
83 |
+
// comma separated list should become an array
|
84 |
+
if( ! is_array( $groups ) ) {
|
85 |
+
$groups = explode( ',', $groups );
|
86 |
+
}
|
87 |
+
|
88 |
+
$grouping['groups'] = array_map( 'stripslashes', $groups );
|
89 |
+
|
90 |
+
// add grouping to array
|
91 |
+
$merge_vars['GROUPINGS'][] = $grouping;
|
92 |
+
|
93 |
+
} // end foreach $groupings
|
94 |
+
break;
|
95 |
+
|
96 |
+
default:
|
97 |
+
if( is_array( $value ) ) {
|
98 |
+
$value = implode( ',', $value );
|
99 |
+
}
|
100 |
+
|
101 |
+
$merge_vars[$key] = $value;
|
102 |
+
break;
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
} elseif( ! $email && is_email( $value ) ) {
|
107 |
+
// find first email field
|
108 |
+
$email = $value;
|
109 |
+
} else {
|
110 |
+
$simple_key = str_replace( array( '-', '_' ), '', strtolower( $key ) );
|
111 |
+
|
112 |
+
if( ! isset( $merge_vars['NAME'] ) && in_array( $simple_key, array( 'name', 'yourname', 'username', 'fullname' ) ) ) {
|
113 |
+
// find name field
|
114 |
+
$merge_vars['NAME'] = $value;
|
115 |
+
} elseif( ! isset( $merge_vars['FNAME'] ) && in_array( $simple_key, array( 'firstname', 'fname', "givenname", "forename" ) ) ) {
|
116 |
+
// find first name field
|
117 |
+
$merge_vars['FNAME'] = $value;
|
118 |
+
} elseif( ! isset( $merge_vars['LNAME'] ) && in_array( $simple_key, array( 'lastname', 'lname', 'surname', 'familyname' ) ) ) {
|
119 |
+
// find last name field
|
120 |
+
$merge_vars['LNAME'] = $value;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
// unset groupings if not used
|
126 |
+
if( empty( $merge_vars['GROUPINGS'] ) ) {
|
127 |
+
unset( $merge_vars['GROUPINGS'] );
|
128 |
+
}
|
129 |
+
|
130 |
+
// if email has not been found by the smart field guessing, return false.. Sorry
|
131 |
+
if ( ! $email ) {
|
132 |
+
return false;
|
133 |
+
}
|
134 |
+
|
135 |
+
return $this->subscribe( $email, $merge_vars, $trigger );
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
}
|
includes/integrations/class-integration.php
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if( ! defined("MC4WP_LITE_VERSION") ) {
|
4 |
+
header( 'Status: 403 Forbidden' );
|
5 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
abstract class MC4WP_Integration {
|
10 |
+
|
11 |
+
protected $checkbox_name_value = '_mc4wp_subscribe';
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Constructor
|
15 |
+
*/
|
16 |
+
public function __construct() {}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @return boolean
|
20 |
+
*/
|
21 |
+
public function checkbox_was_checked() {
|
22 |
+
|
23 |
+
// Check if honeypot was filled (by spam bots)
|
24 |
+
if( isset( $_POST['_mc4wp_required_but_not_really'] ) && ! empty( $_POST['_mc4wp_required_but_not_really'] ) ) {
|
25 |
+
return false;
|
26 |
+
}
|
27 |
+
|
28 |
+
return ( isset( $_POST[ $this->checkbox_name_value ] ) && $_POST[ $this->checkbox_name_value ] == 1 );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Outputs a checkbox
|
33 |
+
*
|
34 |
+
* @param string $hook
|
35 |
+
*/
|
36 |
+
public function output_checkbox( $hook = '' ) {
|
37 |
+
echo $this->get_checkbox( $hook );
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @param mixed $hook Array or string
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
public function get_checkbox( $hook = '' ) {
|
45 |
+
|
46 |
+
$args = $hook;
|
47 |
+
$opts = mc4wp_get_options( 'checkbox' );
|
48 |
+
|
49 |
+
$checked = $opts['precheck'] ? "checked" : '';
|
50 |
+
|
51 |
+
// set label text
|
52 |
+
if ( $hook && is_string( $hook ) && isset( $opts['text_'.$hook.'_label'] ) && !empty( $opts['text_'.$hook.'_label'] ) ) {
|
53 |
+
// custom label text was set
|
54 |
+
$label = __( $opts['text_' . $hook . '_label'] );
|
55 |
+
} elseif ( $args && is_array( $args ) && isset( $args['labels'][0] ) ) {
|
56 |
+
// cf 7 shortcode
|
57 |
+
$label = $args['labels'][0];
|
58 |
+
} else {
|
59 |
+
// default label text
|
60 |
+
$label = __( $opts['label'] );
|
61 |
+
}
|
62 |
+
|
63 |
+
// replace label variables
|
64 |
+
$label = mc4wp_replace_variables( $label, $opts['lists'] );
|
65 |
+
|
66 |
+
// CF7 checkbox?
|
67 |
+
if( is_array( $args ) && isset( $args['type'] ) ) {
|
68 |
+
|
69 |
+
// check for default:0 or default:1 to set the checked attribute
|
70 |
+
if( in_array( 'default:1', $args['options'] ) ) {
|
71 |
+
$checked = 'checked';
|
72 |
+
} else if( in_array( 'default:0', $args['options'] ) ) {
|
73 |
+
$checked = '';
|
74 |
+
}
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
// add starting debug marker
|
79 |
+
$content = "\n<!-- MailChimp for WordPress v". MC4WP_LITE_VERSION ." - http://wordpress.org/plugins/mailchimp-for-wp/ -->\n";
|
80 |
+
|
81 |
+
do_action( 'mc4wp_before_checkbox' );
|
82 |
+
|
83 |
+
$content .= '<p id="mc4wp-checkbox">';
|
84 |
+
$content .= '<label>';
|
85 |
+
$content .= '<input type="checkbox" name="' . esc_attr( $this->checkbox_name_value ) . '" value="1" '. $checked . ' /> ';
|
86 |
+
$content .= $label;
|
87 |
+
$content .= '</label>';
|
88 |
+
$content .= '</p>';
|
89 |
+
|
90 |
+
$content .= '<textarea type="text" name="_mc4wp_required_but_not_really" style="display: none !important;"></textarea>';
|
91 |
+
|
92 |
+
do_action( 'mc4wp_after_checkbox' );
|
93 |
+
|
94 |
+
// add ending debug marker
|
95 |
+
$content .= "\n<!-- / MailChimp for WordPress -->\n";
|
96 |
+
|
97 |
+
return $content;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Makes a subscription request
|
102 |
+
*
|
103 |
+
* @param string $email
|
104 |
+
* @param array $merge_vars
|
105 |
+
* @param string $signup_type
|
106 |
+
* @param int $comment_ID
|
107 |
+
* @return boolean
|
108 |
+
*/
|
109 |
+
protected function subscribe( $email, array $merge_vars = array(), $signup_type = 'comment' ) {
|
110 |
+
$api = mc4wp_get_api();
|
111 |
+
$opts = mc4wp_get_options( 'checkbox' );
|
112 |
+
|
113 |
+
if( ! isset( $opts['lists'] ) || empty( $opts['lists'] ) ) {
|
114 |
+
if( ( ! defined( "DOING_AJAX" ) || ! DOING_AJAX ) && current_user_can( 'manage_options' ) ) {
|
115 |
+
wp_die('
|
116 |
+
<h3>MailChimp for WordPress - Error</h3>
|
117 |
+
<p>Please select a list to subscribe to in the <a href="'. admin_url( 'admin.php?page=mc4wp-lite-checkbox-settings' ) .'">checkbox settings</a>.</p>
|
118 |
+
<p style="font-style:italic; font-size:12px;">This message is only visible to administrators for debugging purposes.</p>
|
119 |
+
', "Error - MailChimp for WP", array( 'back_link' => true ) );
|
120 |
+
}
|
121 |
+
|
122 |
+
return 'no_lists_selected';
|
123 |
+
}
|
124 |
+
|
125 |
+
// maybe guess first and last name
|
126 |
+
if ( isset( $merge_vars['NAME'] ) && ! isset( $merge_vars['FNAME'] ) && ! isset( $merge_vars['LNAME'] ) ) {
|
127 |
+
|
128 |
+
$strpos = strpos( $merge_vars['NAME'], ' ' );
|
129 |
+
if ( $strpos !== false ) {
|
130 |
+
$merge_vars['FNAME'] = substr( $merge_vars['NAME'], 0, $strpos );
|
131 |
+
$merge_vars['LNAME'] = substr( $merge_vars['NAME'], $strpos );
|
132 |
+
} else {
|
133 |
+
$merge_vars['FNAME'] = $merge_vars['NAME'];
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
$result = false;
|
138 |
+
$merge_vars = apply_filters( 'mc4wp_merge_vars', $merge_vars, $signup_type );
|
139 |
+
$email_type = apply_filters( 'mc4wp_email_type', 'html' );
|
140 |
+
$lists = apply_filters( 'mc4wp_lists', $opts['lists'], $merge_vars );
|
141 |
+
|
142 |
+
do_action( 'mc4wp_before_subscribe', $email, $merge_vars );
|
143 |
+
|
144 |
+
foreach( $lists as $list_ID ) {
|
145 |
+
$result = $api->subscribe( $list_ID, $email, $merge_vars, $email_type, $opts['double_optin'], false, true, $opts['send_welcome'] );
|
146 |
+
}
|
147 |
+
|
148 |
+
do_action( 'mc4wp_after_subscribe', $email, $merge_vars, $result );
|
149 |
+
|
150 |
+
// check if result succeeded, show debug message to administrators (only in NON-AJAX requests)
|
151 |
+
if ( $result !== true && $api->has_error() && current_user_can( 'manage_options' ) && ( ! defined( "DOING_AJAX" ) || ! DOING_AJAX ) ) {
|
152 |
+
wp_die( "<h3>MailChimp for WP - Error</h3>
|
153 |
+
<p>The MailChimp server returned the following error message as a response to our sign-up request:</p>
|
154 |
+
<pre>" . $api->get_error_message() . "</pre>
|
155 |
+
<p>This is the data that was sent to MailChimp: </p>
|
156 |
+
<strong>Email</strong>
|
157 |
+
<pre>{$email}</pre>
|
158 |
+
<strong>Merge variables</strong>
|
159 |
+
<pre>" . print_r( $merge_vars, true ) . "</pre>
|
160 |
+
<p style=\"font-style:italic; font-size:12px; \">This message is only visible to administrators for debugging purposes.</p>
|
161 |
+
", "Error - MailChimp for WP", array( 'back_link' => true ) );
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
return $result;
|
166 |
+
}
|
167 |
+
}
|
includes/integrations/class-multisite.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// prevent direct file access
|
4 |
+
if( ! defined("MC4WP_LITE_VERSION" ) ) {
|
5 |
+
header( 'Status: 403 Forbidden' );
|
6 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
class MC4WP_MultiSite_Integration extends MC4WP_Integration {
|
11 |
+
|
12 |
+
public function __construct() {
|
13 |
+
add_action( 'signup_extra_fields', array( $this, 'output_checkbox' ), 20 );
|
14 |
+
add_action( 'signup_blogform', array( $this, 'add_multisite_hidden_checkbox' ), 20 );
|
15 |
+
add_action( 'wpmu_activate_blog', array( $this, 'on_multisite_blog_signup' ), 20, 5 );
|
16 |
+
add_action( 'wpmu_activate_user', array( $this, 'on_multisite_user_signup' ), 20, 3 );
|
17 |
+
|
18 |
+
add_filter( 'add_signup_meta', array( $this, 'add_multisite_usermeta' ) );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Output sign-up checkbox for MultiSite registration form
|
23 |
+
*/
|
24 |
+
public function output_checkbox( $hook = '' ) {
|
25 |
+
return parent::output_checkbox( 'multsite_form' );
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Add hidden checkbox to 2nd MultiSite registration form
|
30 |
+
*/
|
31 |
+
public function add_multisite_hidden_checkbox() {
|
32 |
+
$value = $this->checkbox_was_checked() ? 1 : 0;
|
33 |
+
?><input type="hidden" name="_mc4wp_subscribe" value="<?php echo $value; ?>" /><?php
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Subscribe from Multisite blog sign-ups
|
38 |
+
*
|
39 |
+
* @param int $blog_id
|
40 |
+
* @param int $user_id
|
41 |
+
* @return boolean
|
42 |
+
*/
|
43 |
+
public function on_multisite_blog_signup( $blog_id, $user_id, $a, $b , $meta = null ) {
|
44 |
+
// was sign-up checkbox checked?
|
45 |
+
if ( ! isset( $meta['_mc4wp_subscribe'] ) || $meta['_mc4wp_subscribe'] !== 1 ) {
|
46 |
+
return false;
|
47 |
+
}
|
48 |
+
|
49 |
+
return $this->subscribe_from_multisite( $user_id );
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Subscribe from Multisite user sign-ups
|
54 |
+
*
|
55 |
+
* @param int $user_id
|
56 |
+
* @param string $password
|
57 |
+
* @param array $meta
|
58 |
+
* @return boolean
|
59 |
+
*/
|
60 |
+
public function on_multisite_user_signup( $user_id, $password = NULL, $meta = array() ) {
|
61 |
+
// abandon if sign-up checkbox was not checked
|
62 |
+
if ( ! isset( $meta['_mc4wp_subscribe'] ) || $meta['_mc4wp_subscribe'] !== 1 ) {
|
63 |
+
return false;
|
64 |
+
}
|
65 |
+
|
66 |
+
return $this->subscribe_from_multisite( $user_id );
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Add user meta from Multisite sign-ups to store the checkbox value
|
71 |
+
*
|
72 |
+
* @param array $meta
|
73 |
+
* @return array
|
74 |
+
*/
|
75 |
+
public function add_multisite_usermeta( $meta = array() ) {
|
76 |
+
$meta['_mc4wp_subscribe'] = $this->checkbox_was_checked() ? 1 : 0;
|
77 |
+
return $meta;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Subscribe from Multisite forms
|
82 |
+
*
|
83 |
+
* @param int $user_id
|
84 |
+
*/
|
85 |
+
public function subscribe_from_multisite( $user_id ) {
|
86 |
+
$user = get_userdata( $user_id );
|
87 |
+
|
88 |
+
if ( ! is_object( $user ) ) {
|
89 |
+
return false;
|
90 |
+
}
|
91 |
+
|
92 |
+
$email = $user->user_email;
|
93 |
+
$merge_vars = array(
|
94 |
+
'NAME' => $user->first_name . ' ' . $user->last_name,
|
95 |
+
'FNAME' => $user->first_name,
|
96 |
+
'LNAME' => $user->last_name
|
97 |
+
);
|
98 |
+
|
99 |
+
return $this->subscribe( $email, $merge_vars, 'multisite_registration' );
|
100 |
+
}
|
101 |
+
|
102 |
+
}
|
includes/integrations/class-registration-form.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// prevent direct file access
|
4 |
+
if( ! defined("MC4WP_LITE_VERSION") ) {
|
5 |
+
header( 'Status: 403 Forbidden' );
|
6 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
class MC4WP_Registration_Form_Integration extends MC4WP_Integration {
|
11 |
+
|
12 |
+
public function __construct() {
|
13 |
+
add_action( 'register_form', array( $this, 'output_checkbox' ), 20 );
|
14 |
+
add_action( 'user_register', array( $this, 'subscribe_from_registration' ), 90, 1 );
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Outputs the registration form checkbox
|
19 |
+
*/
|
20 |
+
public function output_checkbox( $hook = '' ) {
|
21 |
+
return parent::output_checkbox( 'registration_form' );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Subscribes from WP Registration Form
|
26 |
+
*
|
27 |
+
* @param int $user_id
|
28 |
+
*/
|
29 |
+
public function subscribe_from_registration( $user_id ) {
|
30 |
+
|
31 |
+
// was sign-up checkbox checked?
|
32 |
+
if ( $this->checkbox_was_checked() === false ) {
|
33 |
+
return false;
|
34 |
+
}
|
35 |
+
|
36 |
+
// gather emailadress from user who WordPress registered
|
37 |
+
$user = get_userdata( $user_id );
|
38 |
+
|
39 |
+
// was a user found with the given ID?
|
40 |
+
if ( ! $user ) {
|
41 |
+
return false;
|
42 |
+
}
|
43 |
+
|
44 |
+
$email = $user->user_email;
|
45 |
+
$merge_vars = array( 'NAME' => $user->user_login );
|
46 |
+
|
47 |
+
// try to add first name
|
48 |
+
if ( isset( $user->user_firstname ) && !empty( $user->user_firstname ) ) {
|
49 |
+
$merge_vars['FNAME'] = $user->user_firstname;
|
50 |
+
}
|
51 |
+
|
52 |
+
// try to add last name
|
53 |
+
if ( isset( $user->user_lastname ) && !empty( $user->user_lastname ) ) {
|
54 |
+
$merge_vars['LNAME'] = $user->user_lastname;
|
55 |
+
}
|
56 |
+
|
57 |
+
return $this->subscribe( $email, $merge_vars, 'registration' );
|
58 |
+
}
|
59 |
+
/* End registration form functions */
|
60 |
+
|
61 |
+
}
|
includes/views/api-settings.php
CHANGED
@@ -9,7 +9,7 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
9 |
?>
|
10 |
<div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
|
11 |
|
12 |
-
<h2><img src="<?php echo MC4WP_LITE_PLUGIN_URL . 'assets/img/menu-icon.png'; ?>" /> MailChimp for WordPress: MailChimp Settings
|
13 |
|
14 |
<div id="mc4wp-content">
|
15 |
|
@@ -18,14 +18,21 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
18 |
<form action="options.php" method="post">
|
19 |
<?php settings_fields( 'mc4wp_lite_settings' ); ?>
|
20 |
|
21 |
-
<h3 class="mc4wp-title">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
<table class="form-table">
|
23 |
|
24 |
<tr valign="top">
|
25 |
<th scope="row"><label for="mailchimp_api_key">MailChimp API Key</label></th>
|
26 |
<td>
|
27 |
<input type="text" class="widefat" placeholder="Your MailChimp API key" id="mailchimp_api_key" name="mc4wp_lite[api_key]" value="<?php echo $opts['api_key']; ?>" />
|
28 |
-
<p class="help"><a target="_blank" href="http://admin.mailchimp.com/account/api"
|
29 |
</td>
|
30 |
|
31 |
</tr>
|
@@ -36,13 +43,15 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
36 |
</form>
|
37 |
|
38 |
<?php if($connected) { ?>
|
39 |
-
|
40 |
-
<h3 class="mc4wp-title"
|
41 |
-
<p
|
42 |
-
|
43 |
-
<form method="post">
|
|
|
|
|
44 |
<p>
|
45 |
-
<input type="submit"
|
46 |
</p>
|
47 |
</form>
|
48 |
|
@@ -51,39 +60,39 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
51 |
<tr>
|
52 |
<th class="mc4wp-hide-smallscreens" scope="col">List ID</th>
|
53 |
<th scope="col">List Name</th>
|
54 |
-
<th scope="col">Merge
|
55 |
<th scope="col">Groupings</th>
|
56 |
<th scope="col">Subscriber Count</th>
|
57 |
</tr>
|
58 |
</thead>
|
59 |
<tbody>
|
60 |
<?php
|
61 |
-
if($lists) {
|
62 |
foreach($lists as $list) { ?>
|
63 |
|
64 |
<tr valign="top">
|
65 |
-
<td class="mc4wp-hide-smallscreens"><?php echo $list->id; ?></td>
|
66 |
-
<td><?php echo $list->name; ?></td>
|
67 |
|
68 |
<td>
|
69 |
-
<?php if( ! empty( $list->merge_vars ) ) { ?>
|
70 |
<ul class="ul-square" style="margin-top: 0;">
|
71 |
<?php foreach( $list->merge_vars as $merge_var ) { ?>
|
72 |
-
<li><?php echo $merge_var->name; ?></li>
|
73 |
<?php } ?>
|
74 |
</ul>
|
75 |
<?php } ?>
|
76 |
</td>
|
77 |
<td>
|
78 |
<?php
|
79 |
-
if( ! empty( $list->interest_groupings ) ) {
|
80 |
foreach($list->interest_groupings as $grouping) { ?>
|
81 |
-
<strong><?php echo $grouping->name; ?></strong>
|
82 |
|
83 |
-
<?php if( ! empty( $grouping->groups ) ) { ?>
|
84 |
<ul class="ul-square">
|
85 |
<?php foreach( $grouping->groups as $group ) { ?>
|
86 |
-
<li><?php echo $group->name; ?></li>
|
87 |
<?php } ?>
|
88 |
</ul>
|
89 |
<?php } ?>
|
@@ -93,14 +102,14 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
93 |
} ?>
|
94 |
|
95 |
</td>
|
96 |
-
<td><?php echo $list->subscriber_count; ?></td>
|
97 |
</tr>
|
98 |
<?php
|
99 |
}
|
100 |
} else { ?>
|
101 |
<tr>
|
102 |
-
<td colspan="
|
103 |
-
<p
|
104 |
</td>
|
105 |
</tr>
|
106 |
<?php
|
@@ -109,9 +118,11 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
109 |
</tbody>
|
110 |
</table>
|
111 |
|
112 |
-
<form method="post">
|
|
|
|
|
113 |
<p>
|
114 |
-
<input type="submit"
|
115 |
</p>
|
116 |
</form>
|
117 |
<?php } ?>
|
9 |
?>
|
10 |
<div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
|
11 |
|
12 |
+
<h2><img src="<?php echo MC4WP_LITE_PLUGIN_URL . 'assets/img/menu-icon.png'; ?>" /> MailChimp for WordPress: MailChimp <?php _e( 'Settings' ); ?></h2>
|
13 |
|
14 |
<div id="mc4wp-content">
|
15 |
|
18 |
<form action="options.php" method="post">
|
19 |
<?php settings_fields( 'mc4wp_lite_settings' ); ?>
|
20 |
|
21 |
+
<h3 class="mc4wp-title">
|
22 |
+
MailChimp <?php _e( 'API Settings', 'mailchimp-for-wp' ); ?>
|
23 |
+
<?php if($connected) { ?>
|
24 |
+
<span class="status positive"><?php _e( 'CONNECTED' ,'mailchimp-for-wp' ); ?></span>
|
25 |
+
<?php } else { ?>
|
26 |
+
<span class="status negative"><?php _e( 'NOT CONNECTED', 'mailchimp-for-wp' ); ?></span>
|
27 |
+
<?php } ?>
|
28 |
+
</h3>
|
29 |
<table class="form-table">
|
30 |
|
31 |
<tr valign="top">
|
32 |
<th scope="row"><label for="mailchimp_api_key">MailChimp API Key</label></th>
|
33 |
<td>
|
34 |
<input type="text" class="widefat" placeholder="Your MailChimp API key" id="mailchimp_api_key" name="mc4wp_lite[api_key]" value="<?php echo $opts['api_key']; ?>" />
|
35 |
+
<p class="help"><a target="_blank" href="http://admin.mailchimp.com/account/api"><?php _e( 'Get your API key here.', 'mailchimp-for-wp' ); ?></a></p>
|
36 |
</td>
|
37 |
|
38 |
</tr>
|
43 |
</form>
|
44 |
|
45 |
<?php if($connected) { ?>
|
46 |
+
|
47 |
+
<h3 class="mc4wp-title"><?php _e( 'MailChimp Data' ,'mailchimp-for-wp' ); ?></h3>
|
48 |
+
<p><?php _e( 'The table below shows your MailChimp lists data. If you applied changes to your MailChimp lists, please use the following button to renew your cached data.', 'mailchimp-for-wp' ); ?></p>
|
49 |
+
|
50 |
+
<form method="post" action="">
|
51 |
+
<input type="hidden" name="mc4wp-renew-cache" value="1" />
|
52 |
+
|
53 |
<p>
|
54 |
+
<input type="submit" value="<?php _e( 'Renew MailChimp lists', 'mailchimp-for-wp' ); ?>" class="button" />
|
55 |
</p>
|
56 |
</form>
|
57 |
|
60 |
<tr>
|
61 |
<th class="mc4wp-hide-smallscreens" scope="col">List ID</th>
|
62 |
<th scope="col">List Name</th>
|
63 |
+
<th scope="col">Merge Fields</th>
|
64 |
<th scope="col">Groupings</th>
|
65 |
<th scope="col">Subscriber Count</th>
|
66 |
</tr>
|
67 |
</thead>
|
68 |
<tbody>
|
69 |
<?php
|
70 |
+
if( ! empty( $lists ) && is_array( $lists ) ) {
|
71 |
foreach($lists as $list) { ?>
|
72 |
|
73 |
<tr valign="top">
|
74 |
+
<td class="mc4wp-hide-smallscreens"><?php echo esc_html( $list->id ); ?></td>
|
75 |
+
<td><?php echo esc_html( $list->name ); ?></td>
|
76 |
|
77 |
<td>
|
78 |
+
<?php if( ! empty( $list->merge_vars ) && is_array( $list->merge_vars ) ) { ?>
|
79 |
<ul class="ul-square" style="margin-top: 0;">
|
80 |
<?php foreach( $list->merge_vars as $merge_var ) { ?>
|
81 |
+
<li><?php echo esc_html( $merge_var->name ); ?></li>
|
82 |
<?php } ?>
|
83 |
</ul>
|
84 |
<?php } ?>
|
85 |
</td>
|
86 |
<td>
|
87 |
<?php
|
88 |
+
if( ! empty( $list->interest_groupings ) && is_array( $list->interest_groupings ) ) {
|
89 |
foreach($list->interest_groupings as $grouping) { ?>
|
90 |
+
<strong><?php echo esc_html( $grouping->name ); ?></strong>
|
91 |
|
92 |
+
<?php if( ! empty( $grouping->groups ) && is_array( $grouping->groups ) ) { ?>
|
93 |
<ul class="ul-square">
|
94 |
<?php foreach( $grouping->groups as $group ) { ?>
|
95 |
+
<li><?php echo esc_html( $group->name ); ?></li>
|
96 |
<?php } ?>
|
97 |
</ul>
|
98 |
<?php } ?>
|
102 |
} ?>
|
103 |
|
104 |
</td>
|
105 |
+
<td><?php echo esc_html( $list->subscriber_count ); ?></td>
|
106 |
</tr>
|
107 |
<?php
|
108 |
}
|
109 |
} else { ?>
|
110 |
<tr>
|
111 |
+
<td colspan="5">
|
112 |
+
<p><?php _e( 'No lists were found in your MailChimp account', 'mailchimp-for-wp' ); ?>.</p>
|
113 |
</td>
|
114 |
</tr>
|
115 |
<?php
|
118 |
</tbody>
|
119 |
</table>
|
120 |
|
121 |
+
<form method="post" action="">
|
122 |
+
<input type="hidden" name="mc4wp-renew-cache" value="1" />
|
123 |
+
|
124 |
<p>
|
125 |
+
<input type="submit" value="<?php _e( 'Renew MailChimp lists', 'mailchimp-for-wp' ); ?>" class="button" />
|
126 |
</p>
|
127 |
</form>
|
128 |
<?php } ?>
|
includes/views/checkbox-settings.php
CHANGED
@@ -8,40 +8,38 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
8 |
?>
|
9 |
<div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
|
10 |
|
11 |
-
<h2><img src="<?php echo MC4WP_LITE_PLUGIN_URL . 'assets/img/menu-icon.png'; ?>" /> MailChimp for WordPress: Checkbox Settings
|
12 |
|
13 |
<div id="mc4wp-content">
|
14 |
|
15 |
<?php settings_errors(); ?>
|
16 |
-
<p
|
17 |
|
18 |
-
<h3 class="mc4wp-title">MailChimp settings for checkboxes</h3>
|
19 |
<form action="options.php" method="post">
|
20 |
<?php settings_fields( 'mc4wp_lite_checkbox_settings' ); ?>
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
26 |
<?php } ?>
|
27 |
|
28 |
<table class="form-table">
|
29 |
<tr valign="top">
|
30 |
-
<th scope="row">
|
31 |
|
32 |
<?php // loop through lists
|
33 |
-
if(empty($lists))
|
34 |
-
|
35 |
-
|
36 |
-
}
|
37 |
-
else
|
38 |
-
{ ?>
|
39 |
<td class="nowrap">
|
40 |
<?php foreach($lists as $list) {
|
41 |
-
?><label><input type="checkbox" name="mc4wp_lite_checkbox[lists][<?php echo $list->id; ?>]" value="<?php echo esc_attr($list->id); ?>" <?php
|
42 |
} ?>
|
43 |
</td>
|
44 |
-
<td class="desc"
|
45 |
<?php
|
46 |
}
|
47 |
?>
|
@@ -49,42 +47,45 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
49 |
<tr valign="top">
|
50 |
<th scope="row">Double opt-in?</th>
|
51 |
<td class="nowrap"><label><input type="radio" name="mc4wp_lite_checkbox[double_optin]" value="1" <?php checked($opts['double_optin'], 1); ?> /> Yes</label> <label><input type="radio" id="mc4wp_checkbox_double_optin_0" name="mc4wp_lite_checkbox[double_optin]" value="0" <?php checked($opts['double_optin'], 0); ?> /> No</label></td>
|
52 |
-
<td class="desc"
|
53 |
</tr>
|
54 |
</table>
|
55 |
|
56 |
-
<h3 class="mc4wp-title"
|
57 |
<table class="form-table">
|
58 |
|
59 |
<tr valign="top">
|
60 |
-
<th scope="row"
|
61 |
-
<td
|
62 |
<?php foreach($this->get_checkbox_compatible_plugins() as $code => $name) {
|
63 |
|
64 |
-
if($code[0]
|
65 |
-
?><label><input name="mc4wp_lite_checkbox[show_at_<?php echo $code; ?>]" value="1" type="checkbox" <?php checked($opts['show_at_'
|
66 |
} else {
|
67 |
-
?><label class="pro-feature"><input type="checkbox" disabled> <?php echo $name; ?></label><br /><?php
|
68 |
}
|
69 |
} ?>
|
70 |
</td>
|
|
|
|
|
|
|
71 |
</tr>
|
72 |
<tr valign="top">
|
73 |
-
<th scope="row"><label for="mc4wp_checkbox_label"
|
74 |
<td colspan="2">
|
75 |
-
<input type="text" class="widefat" id="mc4wp_checkbox_label" name="mc4wp_lite_checkbox[label]" value="<?php echo esc_attr($opts['label']); ?>" required />
|
76 |
-
<p class="help"
|
77 |
</td>
|
78 |
</tr>
|
79 |
<tr valign="top">
|
80 |
-
<th scope="row"
|
81 |
-
<td class="nowrap"><label><input type="radio" name="mc4wp_lite_checkbox[precheck]" value="1" <?php checked($opts['precheck'], 1); ?> /> Yes
|
82 |
<td class="desc"></td>
|
83 |
</tr>
|
84 |
<tr valign="top">
|
85 |
-
<th scope="row"
|
86 |
-
<td class="nowrap"><label><input type="radio" name="mc4wp_lite_checkbox[css]" value="1" <?php checked($opts['css'], 1); ?> /> Yes
|
87 |
-
<td class="desc"
|
88 |
</tr>
|
89 |
|
90 |
|
8 |
?>
|
9 |
<div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
|
10 |
|
11 |
+
<h2><img src="<?php echo MC4WP_LITE_PLUGIN_URL . 'assets/img/menu-icon.png'; ?>" /> MailChimp for WordPress: Checkbox <?php _e( 'Settings' ); ?></h2>
|
12 |
|
13 |
<div id="mc4wp-content">
|
14 |
|
15 |
<?php settings_errors(); ?>
|
16 |
+
<p><?php _e( 'To use sign-up checkboxes, select at least one list and one form to add the checkbox to.', 'mailchimp-for-wp' ); ?></p>
|
17 |
|
|
|
18 |
<form action="options.php" method="post">
|
19 |
<?php settings_fields( 'mc4wp_lite_checkbox_settings' ); ?>
|
20 |
|
21 |
+
<h3 class="mc4wp-title"><?php _e( 'MailChimp settings for checkboxes', 'mailchimp-for-wp' ); ?></h3>
|
22 |
+
|
23 |
+
<?php if( empty( $opts['lists'] ) ) { ?>
|
24 |
+
<div class="mc4wp-info">
|
25 |
+
<p><?php _e( 'If you want to use sign-up checkboxes, select at least one MailChimp list to subscribe people to.', 'mailchimp-for-wp' ); ?></p>
|
26 |
+
</div>
|
27 |
<?php } ?>
|
28 |
|
29 |
<table class="form-table">
|
30 |
<tr valign="top">
|
31 |
+
<th scope="row">MailChimp list(s)</th>
|
32 |
|
33 |
<?php // loop through lists
|
34 |
+
if( ! $lists || empty( $lists ) ) {
|
35 |
+
?><td colspan="2"><?php printf( __( 'No lists found, %sare you connected to MailChimp?%s', 'mailchimp-for-wp' ), '<a href="'. admin_url( 'admin.php?page=mc4wp-lite' ) .'">', '</a>' ); ?></td><?php
|
36 |
+
} else { ?>
|
|
|
|
|
|
|
37 |
<td class="nowrap">
|
38 |
<?php foreach($lists as $list) {
|
39 |
+
?><label><input type="checkbox" name="mc4wp_lite_checkbox[lists][<?php echo esc_attr( $list->id ); ?>]" value="<?php echo esc_attr($list->id); ?>" <?php checked( array_key_exists( $list->id, $opts['lists'] ), true ); ?>> <?php echo esc_html( $list->name ); ?></label><br /><?php
|
40 |
} ?>
|
41 |
</td>
|
42 |
+
<td class="desc"><?php _e( 'Select the list(s) to which people who check the checkbox should be subscribed.' ,'mailchimp-for-wp' ); ?></td>
|
43 |
<?php
|
44 |
}
|
45 |
?>
|
47 |
<tr valign="top">
|
48 |
<th scope="row">Double opt-in?</th>
|
49 |
<td class="nowrap"><label><input type="radio" name="mc4wp_lite_checkbox[double_optin]" value="1" <?php checked($opts['double_optin'], 1); ?> /> Yes</label> <label><input type="radio" id="mc4wp_checkbox_double_optin_0" name="mc4wp_lite_checkbox[double_optin]" value="0" <?php checked($opts['double_optin'], 0); ?> /> No</label></td>
|
50 |
+
<td class="desc"><?php _e( 'Select "yes" if you want people to confirm their email address before being subscribed (recommended)', 'mailchimp-for-wp' ); ?></td>
|
51 |
</tr>
|
52 |
</table>
|
53 |
|
54 |
+
<h3 class="mc4wp-title"><?php _e( 'Checkbox settings', 'mailchimp-for-wp' ); ?></h3>
|
55 |
<table class="form-table">
|
56 |
|
57 |
<tr valign="top">
|
58 |
+
<th scope="row"><?php _e( 'Add the checkbox to these forms', 'mailchimp-for-wp' ); ?></th>
|
59 |
+
<td class="nowrap">
|
60 |
<?php foreach($this->get_checkbox_compatible_plugins() as $code => $name) {
|
61 |
|
62 |
+
if($code[0] !== '_') {
|
63 |
+
?><label><input name="mc4wp_lite_checkbox[show_at_<?php echo $code; ?>]" value="1" type="checkbox" <?php checked( $opts['show_at_' . $code], 1 ); ?>> <?php echo esc_html( $name ); ?></label><br /><?php
|
64 |
} else {
|
65 |
+
?><label class="pro-feature"><input type="checkbox" disabled> <?php echo esc_html( $name ); ?></label><br /><?php
|
66 |
}
|
67 |
} ?>
|
68 |
</td>
|
69 |
+
<td class="desc">
|
70 |
+
<?php _e( 'Selecting a form will automatically add the sign-up checkbox to it.', 'mailchimp-for-wp' ); ?>
|
71 |
+
</td>
|
72 |
</tr>
|
73 |
<tr valign="top">
|
74 |
+
<th scope="row"><label for="mc4wp_checkbox_label"><?php _e( 'Checkbox label text', 'mailchimp-for-wp' ); ?></label></th>
|
75 |
<td colspan="2">
|
76 |
+
<input type="text" class="widefat" id="mc4wp_checkbox_label" name="mc4wp_lite_checkbox[label]" value="<?php echo esc_attr( $opts['label'] ); ?>" required />
|
77 |
+
<p class="help"><?php printf( __( 'HTML tags like %s are allowed in the label text.', 'mailchimp-for-wp' ), '<code>' . esc_html( '<strong><em><a>' ) . '</code>' ); ?></p>
|
78 |
</td>
|
79 |
</tr>
|
80 |
<tr valign="top">
|
81 |
+
<th scope="row"><?php _e( 'Pre-check the checkbox?', 'mailchimp-for-wp' ); ?></th>
|
82 |
+
<td class="nowrap"><label><input type="radio" name="mc4wp_lite_checkbox[precheck]" value="1" <?php checked( $opts['precheck'], 1 ); ?> /> <?php _e( 'Yes' ); ?></label> <label><input type="radio" name="mc4wp_lite_checkbox[precheck]" value="0" <?php checked( $opts['precheck'], 0 ); ?> /> <?php _e( 'No' ); ?></label></td>
|
83 |
<td class="desc"></td>
|
84 |
</tr>
|
85 |
<tr valign="top">
|
86 |
+
<th scope="row"><?php _e( 'Load some default CSS?', 'mailchimp-for-wp' ); ?></th>
|
87 |
+
<td class="nowrap"><label><input type="radio" name="mc4wp_lite_checkbox[css]" value="1" <?php checked( $opts['css'], 1 ); ?> /> <?php _e( 'Yes' ); ?></label> <label><input type="radio" name="mc4wp_lite_checkbox[css]" value="0" <?php checked( $opts['css'], 0 ); ?> /> <?php _e( 'No' ); ?></label></td>
|
88 |
+
<td class="desc"><?php _e( 'Select "yes" if the checkbox appears in a weird place.', 'mailchimp-for-wp' ); ?></td>
|
89 |
</tr>
|
90 |
|
91 |
|
includes/views/form-settings.php
CHANGED
@@ -6,59 +6,59 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
6 |
} ?>
|
7 |
<div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
|
8 |
|
9 |
-
<h2><img src="<?php echo MC4WP_LITE_PLUGIN_URL . 'assets/img/menu-icon.png'; ?>" /> MailChimp for WordPress: Form
|
10 |
|
11 |
<div id="mc4wp-content">
|
12 |
|
13 |
<?php settings_errors(); ?>
|
14 |
|
15 |
-
<p
|
16 |
|
17 |
<form action="options.php" method="post">
|
18 |
<?php settings_fields( 'mc4wp_lite_form_settings' ); ?>
|
19 |
|
20 |
-
<h3 class="mc4wp-title"
|
21 |
<table class="form-table">
|
22 |
|
23 |
<tr valign="top">
|
24 |
-
<th scope="row"><label for="mc4wp_load_stylesheet_select"
|
25 |
<td class="nowrap valigntop">
|
26 |
<select name="mc4wp_lite_form[css]" id="mc4wp_load_stylesheet_select">
|
27 |
-
<option value="0" <?php selected($opts['css'], 0);
|
28 |
-
<option value="default" <?php selected($opts['css'], 'default'); ?><?php selected($opts['css'], 1);
|
29 |
-
<option disabled>(PRO ONLY) Yes, load my custom form styles
|
30 |
-
<optgroup label="
|
31 |
-
<option value="light" <?php selected($opts['css'], 'light');
|
32 |
-
<option value="red" <?php selected($opts['css'], 'red');
|
33 |
-
<option value="green" <?php selected($opts['css'], 'green');
|
34 |
-
<option value="blue" <?php selected($opts['css'], 'blue');
|
35 |
-
<option value="dark" <?php selected($opts['css'], 'dark');
|
36 |
-
<option disabled>(PRO ONLY) Custom Color Theme
|
37 |
</optgroup>
|
38 |
</select>
|
39 |
</td>
|
40 |
<td class="desc">
|
41 |
-
If you want to load some default styles, select "basic formatting styles" or one of the
|
42 |
</td>
|
43 |
</tr>
|
44 |
<tr valign="top">
|
45 |
<th scope="row">MailChimp list(s)</th>
|
46 |
<?php // loop through lists
|
47 |
-
if(empty($lists)) {
|
48 |
-
?><td colspan="2"
|
49 |
} else { ?>
|
50 |
<td>
|
51 |
<ul id="mc4wp-lists">
|
52 |
<?php foreach($lists as $list) { ?>
|
53 |
<li>
|
54 |
<label>
|
55 |
-
<input type="checkbox" name="mc4wp_lite_form[lists][<?php echo esc_attr($list->id); ?>]" value="<?php echo esc_attr($list->id); ?>" data-list-groupings="<?php echo esc_attr(json_encode($list->interest_groupings)); ?>" data-list-fields="<?php echo esc_attr(json_encode($list->merge_vars)); ?>" <?php if(array_key_exists($list->id, $opts['lists'])) echo 'checked="checked"'; ?>> <?php echo $list->name; ?>
|
56 |
</label>
|
57 |
</li>
|
58 |
<?php } ?>
|
59 |
</ul>
|
60 |
</td>
|
61 |
-
<td class="desc"
|
62 |
<?php } ?>
|
63 |
|
64 |
</tr>
|
@@ -68,12 +68,12 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
68 |
<div class="mc4wp-wrapper">
|
69 |
<div class="mc4wp-col mc4wp-first">
|
70 |
<?php
|
71 |
-
if(function_exists('wp_editor')) {
|
72 |
-
wp_editor( esc_textarea($opts['markup']), 'mc4wpformmarkup', array('tinymce' => false, 'media_buttons' =>
|
73 |
} else {
|
74 |
?><textarea class="widefat" cols="160" rows="20" id="mc4wpformmarkup" name="mc4wp_lite_form[markup]"><?php echo esc_textarea($opts['markup']); ?></textarea><?php
|
75 |
} ?>
|
76 |
-
<p class="help"
|
77 |
|
78 |
</div>
|
79 |
|
@@ -88,22 +88,22 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
88 |
|
89 |
<?php submit_button(); ?>
|
90 |
|
91 |
-
<h3 class="mc4wp-title">MailChimp Settings
|
92 |
<table class="form-table">
|
93 |
<tr valign="top">
|
94 |
<th scope="row">Double opt-in?</th>
|
95 |
-
<td class="nowrap"><input type="radio" id="mc4wp_form_double_optin_1" name="mc4wp_lite_form[double_optin]" value="1" <?php
|
96 |
-
<td class="desc"
|
97 |
</tr>
|
98 |
<tr class="pro-feature" valign="top">
|
99 |
<th scope="row">Send Welcome Email?</th>
|
100 |
<td class="nowrap">
|
101 |
<input type="radio" readonly />
|
102 |
-
<label><?php _e("Yes"); ?></label>
|
103 |
<input type="radio" checked readonly />
|
104 |
-
<label><?php _e("No"); ?></label>
|
105 |
</td>
|
106 |
-
<td class="desc"
|
107 |
</tr>
|
108 |
<tr class="pro-feature" valign="top">
|
109 |
<th scope="row">Update existing subscribers?</th>
|
@@ -111,9 +111,9 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
111 |
<input type="radio" readonly />
|
112 |
<label><?php _e("Yes"); ?></label>
|
113 |
<input type="radio" checked readonly />
|
114 |
-
<label><?php _e(
|
115 |
</td>
|
116 |
-
<td class="desc"
|
117 |
</tr>
|
118 |
<tr class="pro-feature" valign="top">
|
119 |
<th scope="row">Replace interest groups?</th>
|
@@ -123,11 +123,11 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
123 |
<input type="radio" readonly />
|
124 |
<label><?php _e("No"); ?></label>
|
125 |
</td>
|
126 |
-
<td class="desc"
|
127 |
</tr>
|
128 |
</table>
|
129 |
|
130 |
-
<h3 class="mc4wp-title"
|
131 |
|
132 |
<table class="form-table mc4wp-form-messages">
|
133 |
<tr valign="top" class="pro-feature">
|
@@ -136,39 +136,47 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
136 |
<input type="radio" readonly /> <label><?php _e("Yes"); ?></label>
|
137 |
<input type="radio" checked readonly /> <label><?php _e("No"); ?></label>
|
138 |
</td>
|
139 |
-
<td class="desc"
|
140 |
</tr>
|
141 |
<tr valign="top">
|
142 |
-
<th scope="row"><label for="mc4wp_form_hide_after_success"
|
143 |
<td class="nowrap"><input type="radio" id="mc4wp_form_hide_after_success_1" name="mc4wp_lite_form[hide_after_success]" value="1" <?php if($opts['hide_after_success'] == 1) echo 'checked="checked"'; ?> /> <label for="mc4wp_form_hide_after_success_1">Yes</label> <input type="radio" id="mc4wp_form_hide_after_success_0" name="mc4wp_lite_form[hide_after_success]" value="0" <?php if($opts['hide_after_success'] == 0) echo 'checked="checked"'; ?> /> <label for="mc4wp_form_hide_after_success_0">No</label></td>
|
144 |
-
<td class="desc"
|
145 |
</tr>
|
146 |
<tr valign="top">
|
147 |
-
<th scope="row"><label for="mc4wp_form_redirect"
|
148 |
<td colspan="2">
|
149 |
-
<input type="text" class="widefat" name="mc4wp_lite_form[redirect]" id="mc4wp_form_redirect" placeholder="Example: <?php echo esc_attr(site_url('/thank-you/')); ?>"value="<?php echo $opts['redirect']; ?>" />
|
150 |
-
<p class="help"
|
151 |
</td>
|
152 |
</tr>
|
153 |
<tr valign="top">
|
154 |
-
<th scope="row"><label for="mc4wp_form_text_success"
|
155 |
-
<td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_success" name="mc4wp_lite_form[text_success]" value="<?php echo esc_attr($opts['text_success']); ?>" required /></td>
|
156 |
</tr>
|
157 |
<tr valign="top">
|
158 |
-
<th scope="row"><label for="mc4wp_form_text_error"
|
159 |
-
<td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_error" name="mc4wp_lite_form[text_error]" value="<?php echo esc_attr($opts['text_error']); ?>" required /></td>
|
160 |
</tr>
|
161 |
<tr valign="top">
|
162 |
-
<th scope="row"><label for="mc4wp_form_text_invalid_email"
|
163 |
-
<td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_invalid_email" name="mc4wp_lite_form[text_invalid_email]" value="<?php echo esc_attr($opts['text_invalid_email']); ?>" required /></td>
|
164 |
</tr>
|
165 |
<tr valign="top">
|
166 |
-
<th scope="row"><label for="mc4wp_form_text_already_subscribed"
|
167 |
-
<td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_already_subscribed" name="mc4wp_lite_form[text_already_subscribed]" value="<?php echo esc_attr($opts['text_already_subscribed']); ?>" required /></td>
|
168 |
-
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
<tr>
|
170 |
<th></th>
|
171 |
-
<td colspan="2"
|
|
|
|
|
172 |
</tr>
|
173 |
</table>
|
174 |
|
6 |
} ?>
|
7 |
<div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
|
8 |
|
9 |
+
<h2><img src="<?php echo MC4WP_LITE_PLUGIN_URL . 'assets/img/menu-icon.png'; ?>" /> MailChimp for WordPress: <?php _e( 'Form Settings', 'mailchimp-for-wp' ); ?></h2>
|
10 |
|
11 |
<div id="mc4wp-content">
|
12 |
|
13 |
<?php settings_errors(); ?>
|
14 |
|
15 |
+
<p><?php printf( __( 'To use the MailChimp sign-up form, configure the form below and then either paste %s in the content of a post or page or use the widget.', 'mailchimp-for-wp' ), '<input size="10" type="text" onfocus="this.select();" readonly="readonly" value="[mc4wp_form]" class="mc4wp-shortcode-example">' ); ?></p>
|
16 |
|
17 |
<form action="options.php" method="post">
|
18 |
<?php settings_fields( 'mc4wp_lite_form_settings' ); ?>
|
19 |
|
20 |
+
<h3 class="mc4wp-title"><?php _e( 'Required form settings', 'mailchimp-for-wp' ); ?></h3>
|
21 |
<table class="form-table">
|
22 |
|
23 |
<tr valign="top">
|
24 |
+
<th scope="row"><label for="mc4wp_load_stylesheet_select"><?php _e( 'Load form styles?' ,'mailchimp-for-wp' ); ?></label></th>
|
25 |
<td class="nowrap valigntop">
|
26 |
<select name="mc4wp_lite_form[css]" id="mc4wp_load_stylesheet_select">
|
27 |
+
<option value="0" <?php selected($opts['css'], 0); ?>><?php _e( 'No' ); ?></option>
|
28 |
+
<option value="default" <?php selected($opts['css'], 'default'); ?><?php selected($opts['css'], 1); ?>><?php _e( 'Yes, load basic form styles', 'mailchimp-for-wp' ); ?></option>
|
29 |
+
<option disabled>(PRO ONLY) <?php _e( 'Yes, load my custom form styles', 'mailchimp-for-wp' ); ?></option>
|
30 |
+
<optgroup label="<?php _e( 'Yes, load default form theme', 'mailchimp-for-wp' ); ?>">
|
31 |
+
<option value="light" <?php selected($opts['css'], 'light'); ?>><?php _e( 'Light Theme', 'mailchimp-for-wp' ); ?></option>
|
32 |
+
<option value="red" <?php selected($opts['css'], 'red'); ?>><?php _e( 'Red Theme', 'mailchimp-for-wp' ); ?></option>
|
33 |
+
<option value="green" <?php selected($opts['css'], 'green'); ?>><?php _e( 'Green Theme', 'mailchimp-for-wp' ); ?></option>
|
34 |
+
<option value="blue" <?php selected($opts['css'], 'blue'); ?>><?php _e( 'Blue Theme', 'mailchimp-for-wp' ); ?></option>
|
35 |
+
<option value="dark" <?php selected($opts['css'], 'dark'); ?>><?php _e( 'Dark Theme', 'mailchimp-for-wp' ); ?></option>
|
36 |
+
<option disabled>(PRO ONLY) <?php _e( 'Custom Color Theme', 'mailchimp-for-wp' ); ?></option>
|
37 |
</optgroup>
|
38 |
</select>
|
39 |
</td>
|
40 |
<td class="desc">
|
41 |
+
<?php _e( 'If you want to load some default CSS styles, select "basic formatting styles" or choose one of the color themes' , 'mailchimp-for-wp' ); ?>
|
42 |
</td>
|
43 |
</tr>
|
44 |
<tr valign="top">
|
45 |
<th scope="row">MailChimp list(s)</th>
|
46 |
<?php // loop through lists
|
47 |
+
if( empty( $lists ) ) {
|
48 |
+
?><td colspan="2"><?php printf( __( 'No lists found, %sare you connected to MailChimp?%s', 'mailchimp-for-wp' ), '<a href="'. admin_url( 'admin.php?page=mc4wp-lite' ) .'">', '</a>' ); ?></td><?php
|
49 |
} else { ?>
|
50 |
<td>
|
51 |
<ul id="mc4wp-lists">
|
52 |
<?php foreach($lists as $list) { ?>
|
53 |
<li>
|
54 |
<label>
|
55 |
+
<input type="checkbox" name="mc4wp_lite_form[lists][<?php echo esc_attr($list->id); ?>]" value="<?php echo esc_attr($list->id); ?>" data-list-groupings="<?php echo esc_attr(json_encode($list->interest_groupings)); ?>" data-list-fields="<?php echo esc_attr(json_encode($list->merge_vars)); ?>" <?php if(array_key_exists($list->id, $opts['lists'])) echo 'checked="checked"'; ?>> <?php echo esc_html( $list->name ); ?>
|
56 |
</label>
|
57 |
</li>
|
58 |
<?php } ?>
|
59 |
</ul>
|
60 |
</td>
|
61 |
+
<td class="desc"><?php _e( 'Select the list(s) to which people who submit this form should be subscribed.' ,'mailchimp-for-wp' ); ?></td>
|
62 |
<?php } ?>
|
63 |
|
64 |
</tr>
|
68 |
<div class="mc4wp-wrapper">
|
69 |
<div class="mc4wp-col mc4wp-first">
|
70 |
<?php
|
71 |
+
if( function_exists( 'wp_editor' ) ) {
|
72 |
+
wp_editor( esc_textarea( $opts['markup'] ), 'mc4wpformmarkup', array( 'tinymce' => false, 'media_buttons' => true, 'textarea_name' => 'mc4wp_lite_form[markup]'));
|
73 |
} else {
|
74 |
?><textarea class="widefat" cols="160" rows="20" id="mc4wpformmarkup" name="mc4wp_lite_form[markup]"><?php echo esc_textarea($opts['markup']); ?></textarea><?php
|
75 |
} ?>
|
76 |
+
<p class="help"><?php printf( __( 'To display your sign-up form, paste %s inside the contents of a post, page or text widget.', 'mailchimp-for-wp' ), '<input type="text" onfocus="this.select();" readonly="readonly" value="[mc4wp_form]" size="12" class="mc4wp-shortcode-example">' ); ?></p>
|
77 |
|
78 |
</div>
|
79 |
|
88 |
|
89 |
<?php submit_button(); ?>
|
90 |
|
91 |
+
<h3 class="mc4wp-title">MailChimp <?php _e( 'Settings' ); ?></h3>
|
92 |
<table class="form-table">
|
93 |
<tr valign="top">
|
94 |
<th scope="row">Double opt-in?</th>
|
95 |
+
<td class="nowrap"><input type="radio" id="mc4wp_form_double_optin_1" name="mc4wp_lite_form[double_optin]" value="1" <?php checked( $opts['double_optin'], 1 ); ?> /> <label for="mc4wp_form_double_optin_1"><?php _e( 'Yes' ); ?></label> <input type="radio" id="mc4wp_form_double_optin_0" name="mc4wp_lite_form[double_optin]" value="0" <?php checked( $opts['double_optin'], 0); ?> /> <label for="mc4wp_form_double_optin_0"><?php _e( 'No' ); ?></label></td>
|
96 |
+
<td class="desc"><?php _e( 'Select "yes" if you want people to confirm their email address before being subscribed (recommended)', 'mailchimp-for-wp' ); ?></td>
|
97 |
</tr>
|
98 |
<tr class="pro-feature" valign="top">
|
99 |
<th scope="row">Send Welcome Email?</th>
|
100 |
<td class="nowrap">
|
101 |
<input type="radio" readonly />
|
102 |
+
<label><?php _e( "Yes" ); ?></label>
|
103 |
<input type="radio" checked readonly />
|
104 |
+
<label><?php _e( "No" ); ?></label>
|
105 |
</td>
|
106 |
+
<td class="desc"><?php _e( 'Select "yes" if you want to send your lists Welcome Email if a subscribe succeeds (only when double opt-in is disabled).' ,'mailchimp-for-wp' ); ?></td>
|
107 |
</tr>
|
108 |
<tr class="pro-feature" valign="top">
|
109 |
<th scope="row">Update existing subscribers?</th>
|
111 |
<input type="radio" readonly />
|
112 |
<label><?php _e("Yes"); ?></label>
|
113 |
<input type="radio" checked readonly />
|
114 |
+
<label><?php _e( 'No' ); ?></label>
|
115 |
</td>
|
116 |
+
<td class="desc"><?php _e( 'Select "yes" if you want to update existing subscribers (instead of showing the "already subscribed" message).', 'mailchimp-for-wp' ); ?></td>
|
117 |
</tr>
|
118 |
<tr class="pro-feature" valign="top">
|
119 |
<th scope="row">Replace interest groups?</th>
|
123 |
<input type="radio" readonly />
|
124 |
<label><?php _e("No"); ?></label>
|
125 |
</td>
|
126 |
+
<td class="desc"><?php _e( 'Select "yes" if you want to replace the interest groups with the groups provided instead of adding the provided groups to the member\'s interest groups (only when updating a subscriber).', 'mailchimp-for-wp'); ?></td>
|
127 |
</tr>
|
128 |
</table>
|
129 |
|
130 |
+
<h3 class="mc4wp-title"><?php _e( 'Form Settings & Messages', 'mailchimp-for-wp' ); ?></h3>
|
131 |
|
132 |
<table class="form-table mc4wp-form-messages">
|
133 |
<tr valign="top" class="pro-feature">
|
136 |
<input type="radio" readonly /> <label><?php _e("Yes"); ?></label>
|
137 |
<input type="radio" checked readonly /> <label><?php _e("No"); ?></label>
|
138 |
</td>
|
139 |
+
<td class="desc"><?php _e( 'Select "yes" if you want to use AJAX (JavaScript) to submit forms.', 'mailchimp-for-wp' ); ?> <a href="http://dannyvankooten.com/mailchimp-for-wordpress/demo/?utm_source=lite-plugin&utm_medium=link&utm_campaign=settings-demo-link">(demo)</a></td>
|
140 |
</tr>
|
141 |
<tr valign="top">
|
142 |
+
<th scope="row"><label for="mc4wp_form_hide_after_success"><?php _e( 'Hide form after a successful sign-up?', 'mailchimp-for-wp' ); ?></label></th>
|
143 |
<td class="nowrap"><input type="radio" id="mc4wp_form_hide_after_success_1" name="mc4wp_lite_form[hide_after_success]" value="1" <?php if($opts['hide_after_success'] == 1) echo 'checked="checked"'; ?> /> <label for="mc4wp_form_hide_after_success_1">Yes</label> <input type="radio" id="mc4wp_form_hide_after_success_0" name="mc4wp_lite_form[hide_after_success]" value="0" <?php if($opts['hide_after_success'] == 0) echo 'checked="checked"'; ?> /> <label for="mc4wp_form_hide_after_success_0">No</label></td>
|
144 |
+
<td class="desc"><?php _e( 'Select "yes" to hide the form fields after a successful sign-up.', 'mailchimp-for-wp' ); ?></td>
|
145 |
</tr>
|
146 |
<tr valign="top">
|
147 |
+
<th scope="row"><label for="mc4wp_form_redirect"><?php _e( 'Redirect to URL after successful sign-ups', 'mailchimp-for-wp' ); ?></label></th>
|
148 |
<td colspan="2">
|
149 |
+
<input type="text" class="widefat" name="mc4wp_lite_form[redirect]" id="mc4wp_form_redirect" placeholder="Example: <?php echo esc_attr( site_url('/thank-you/' ) ); ?>"value="<?php echo $opts['redirect']; ?>" />
|
150 |
+
<p class="help"><?php _e( 'Leave empty or enter 0 for no redirection. Use complete (absolute) URLs, including <code>http://</code>', 'mailchimp-for-wp' ); ?></p>
|
151 |
</td>
|
152 |
</tr>
|
153 |
<tr valign="top">
|
154 |
+
<th scope="row"><label for="mc4wp_form_text_success"><?php _e( 'Success message', 'mailchimp-for-wp' ); ?></label></th>
|
155 |
+
<td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_success" name="mc4wp_lite_form[text_success]" value="<?php echo esc_attr( $opts['text_success'] ); ?>" required /></td>
|
156 |
</tr>
|
157 |
<tr valign="top">
|
158 |
+
<th scope="row"><label for="mc4wp_form_text_error"><?php _e( 'General error message' ,'mailchimp-for-wp' ); ?></label></th>
|
159 |
+
<td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_error" name="mc4wp_lite_form[text_error]" value="<?php echo esc_attr( $opts['text_error'] ); ?>" required /></td>
|
160 |
</tr>
|
161 |
<tr valign="top">
|
162 |
+
<th scope="row"><label for="mc4wp_form_text_invalid_email"><?php _e( 'Invalid email address message', 'mailchimp-for-wp' ); ?></label></th>
|
163 |
+
<td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_invalid_email" name="mc4wp_lite_form[text_invalid_email]" value="<?php echo esc_attr( $opts['text_invalid_email'] ); ?>" required /></td>
|
164 |
</tr>
|
165 |
<tr valign="top">
|
166 |
+
<th scope="row"><label for="mc4wp_form_text_already_subscribed"><?php _e( 'Already subscribed message', 'mailchimp-for-wp' ); ?></label></th>
|
167 |
+
<td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_already_subscribed" name="mc4wp_lite_form[text_already_subscribed]" value="<?php echo esc_attr( $opts['text_already_subscribed'] ); ?>" required /></td>
|
168 |
+
</tr>
|
169 |
+
<?php if( true === $this->has_captcha_plugin ) { ?>
|
170 |
+
<tr valign="top">
|
171 |
+
<th scope="row"><label for="mc4wp_form_text_invalid_captcha"><?php _e( 'Invalid CAPTCHA message', 'mailchimp-for-wp' ); ?></label></th>
|
172 |
+
<td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_invalid_captcha" name="mc4wp_lite_form[text_invalid_captcha]" value="<?php echo esc_attr( $opts['text_invalid_captcha'] ); ?>" required /></td>
|
173 |
+
</tr>
|
174 |
+
<?php } ?>
|
175 |
<tr>
|
176 |
<th></th>
|
177 |
+
<td colspan="2">
|
178 |
+
<p class="help"><?php printf( __( 'HTML tags like %s are allowed in the message fields.', 'mailchimp-for-wp' ), '<code>' . esc_html( '<strong><em><a>' ) . '</code>' ); ?></p>
|
179 |
+
</td>
|
180 |
</tr>
|
181 |
</table>
|
182 |
|
includes/views/parts/admin-field-wizard.php
CHANGED
@@ -7,15 +7,17 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
7 |
?>
|
8 |
<div id="mc4wp-fw" class="mc4wp-well">
|
9 |
|
10 |
-
<h4 class="mc4wp-title"
|
11 |
|
12 |
|
13 |
-
<p class="mc4wp-notice no-lists-selected" <?php if(!empty($opts['lists'])) { ?>style="display: none;" <?php } ?>>
|
|
|
|
|
14 |
|
15 |
-
<p
|
16 |
<p>
|
17 |
<select class="widefat" id="mc4wp-fw-mailchimp-fields">
|
18 |
-
<option class="default" value="" disabled selected
|
19 |
<optgroup label="MailChimp merge fields" class="merge-fields"></optgroup>
|
20 |
<optgroup label="Interest groupings" class="groupings"></optgroup>
|
21 |
<optgroup label="Other" class="other">
|
@@ -28,40 +30,40 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
|
|
28 |
<div id="mc4wp-fw-fields">
|
29 |
|
30 |
<p class="row label">
|
31 |
-
<label for="mc4wp-fw-label">Label <small
|
32 |
<input class="widefat" type="text" id="mc4wp-fw-label" />
|
33 |
</p>
|
34 |
|
35 |
<p class="row placeholder">
|
36 |
-
<label for="mc4wp-fw-placeholder">Placeholder <small
|
37 |
<input class="widefat" type="text" id="mc4wp-fw-placeholder" />
|
38 |
</p>
|
39 |
|
40 |
<p class="row value">
|
41 |
-
<label for="mc4wp-fw-value"><span id="mc4wp-fw-value-label"
|
42 |
<input class="widefat" type="text" id="mc4wp-fw-value" />
|
43 |
</p>
|
44 |
|
45 |
<p class="row values" id="mc4wp-fw-values">
|
46 |
-
<label for="mc4wp-fw-values">Value labels <small
|
47 |
</p>
|
48 |
|
49 |
<p class="row wrap-p">
|
50 |
<input type="checkbox" id="mc4wp-fw-wrap-p" value="1" checked />
|
51 |
-
<label for="mc4wp-fw-wrap-p"
|
52 |
</p>
|
53 |
|
54 |
<p class="row required">
|
55 |
<input type="checkbox" id="mc4wp-fw-required" value="1" />
|
56 |
-
<label for="mc4wp-fw-required"
|
57 |
</p>
|
58 |
|
59 |
<p>
|
60 |
-
<input class="button button-large" type="button" id="mc4wp-fw-add-to-form" value="«
|
61 |
</p>
|
62 |
|
63 |
<p>
|
64 |
-
<label for="mc4wp-fw-preview"
|
65 |
<textarea class="widefat" id="mc4wp-fw-preview" rows="5"></textarea>
|
66 |
</p>
|
67 |
|
7 |
?>
|
8 |
<div id="mc4wp-fw" class="mc4wp-well">
|
9 |
|
10 |
+
<h4 class="mc4wp-title"><?php _e( 'Add a new field', 'mailchimp-for-wp' ); ?></h4>
|
11 |
|
12 |
|
13 |
+
<p class="mc4wp-notice no-lists-selected" <?php if(!empty($opts['lists'])) { ?>style="display: none;" <?php } ?>>
|
14 |
+
<?php _e( 'Select at least one list first.', 'mailchimp-for-wp' ); ?>
|
15 |
+
</p>
|
16 |
|
17 |
+
<p><?php _e( 'Use the tool below to generate the HTML for your form fields.', 'mailchimp-for-wp' ); ?></p>
|
18 |
<p>
|
19 |
<select class="widefat" id="mc4wp-fw-mailchimp-fields">
|
20 |
+
<option class="default" value="" disabled selected><?php _e( 'Select MailChimp field..', 'mailchimp-for-wp' ); ?></option>
|
21 |
<optgroup label="MailChimp merge fields" class="merge-fields"></optgroup>
|
22 |
<optgroup label="Interest groupings" class="groupings"></optgroup>
|
23 |
<optgroup label="Other" class="other">
|
30 |
<div id="mc4wp-fw-fields">
|
31 |
|
32 |
<p class="row label">
|
33 |
+
<label for="mc4wp-fw-label">Label <small><?php _e( '(optional)', 'mailchimp-for-wp' ); ?></small></label>
|
34 |
<input class="widefat" type="text" id="mc4wp-fw-label" />
|
35 |
</p>
|
36 |
|
37 |
<p class="row placeholder">
|
38 |
+
<label for="mc4wp-fw-placeholder">Placeholder <small><?php _e( '(optional)', 'mailchimp-for-wp' ); ?></small></label>
|
39 |
<input class="widefat" type="text" id="mc4wp-fw-placeholder" />
|
40 |
</p>
|
41 |
|
42 |
<p class="row value">
|
43 |
+
<label for="mc4wp-fw-value"><span id="mc4wp-fw-value-label"><?php _e( 'Initial value', 'mailchimp-for-wp' ); ?> <small><?php _e( '(optional)', 'mailchimp-for-wp' ); ?></small></span></label>
|
44 |
<input class="widefat" type="text" id="mc4wp-fw-value" />
|
45 |
</p>
|
46 |
|
47 |
<p class="row values" id="mc4wp-fw-values">
|
48 |
+
<label for="mc4wp-fw-values">Value labels <small><?php _e( '(leave empty to hide)', 'mailchimp-for-wp' ); ?></small></label>
|
49 |
</p>
|
50 |
|
51 |
<p class="row wrap-p">
|
52 |
<input type="checkbox" id="mc4wp-fw-wrap-p" value="1" checked />
|
53 |
+
<label for="mc4wp-fw-wrap-p"><?php printf( __( 'Wrap in paragraph %s tags?', 'mailchimp-for-wp' ), '(<code><p></code>)' ); ?></label>
|
54 |
</p>
|
55 |
|
56 |
<p class="row required">
|
57 |
<input type="checkbox" id="mc4wp-fw-required" value="1" />
|
58 |
+
<label for="mc4wp-fw-required"><?php _e( 'Required field?' ,'mailchimp-for-wp' ); ?></label>
|
59 |
</p>
|
60 |
|
61 |
<p>
|
62 |
+
<input class="button button-large" type="button" id="mc4wp-fw-add-to-form" value="« <?php _e( 'Add to form' ,'mailchimp-for-wp' ); ?>" />
|
63 |
</p>
|
64 |
|
65 |
<p>
|
66 |
+
<label for="mc4wp-fw-preview"><?php _e( 'Generated HTML', 'mailchimp-for-wp' ); ?></label>
|
67 |
<textarea class="widefat" id="mc4wp-fw-preview" rows="5"></textarea>
|
68 |
</p>
|
69 |
|
languages/mailchimp-for-wp-nl_NL.mo
ADDED
Binary file
|
languages/mailchimp-for-wp-nl_NL.po
ADDED
@@ -0,0 +1,440 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: MailChimp for WordPress\n"
|
4 |
+
"POT-Creation-Date: 2014-04-29 22:55+0100\n"
|
5 |
+
"PO-Revision-Date: 2014-04-29 22:55+0100\n"
|
6 |
+
"Last-Translator: Danny <hi@dannyvankooten.com>\n"
|
7 |
+
"Language-Team: Danny van Kooten <hi@dannyvankooten.com>\n"
|
8 |
+
"Language: en_EN\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.5\n"
|
13 |
+
"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Poedit-SearchPath-0: ..\n"
|
16 |
+
|
17 |
+
#: ../includes/class-admin.php:92 ../includes/views/api-settings.php:12
|
18 |
+
#: ../includes/views/checkbox-settings.php:11
|
19 |
+
#: ../includes/views/form-settings.php:91
|
20 |
+
msgid "Settings"
|
21 |
+
msgstr "Instellingen"
|
22 |
+
|
23 |
+
#: ../includes/class-admin.php:111
|
24 |
+
msgid "Upgrade to Pro"
|
25 |
+
msgstr "Upgrade naar Pro"
|
26 |
+
|
27 |
+
#: ../includes/class-admin.php:192
|
28 |
+
msgid "Comment form"
|
29 |
+
msgstr "Reactieformulier"
|
30 |
+
|
31 |
+
#: ../includes/class-admin.php:193
|
32 |
+
msgid "Registration form"
|
33 |
+
msgstr "Registratieformulier"
|
34 |
+
|
35 |
+
#: ../includes/class-admin.php:197
|
36 |
+
msgid "MultiSite forms"
|
37 |
+
msgstr "MultiSite formulieren"
|
38 |
+
|
39 |
+
#: ../includes/class-admin.php:201
|
40 |
+
msgid "BuddyPress registration"
|
41 |
+
msgstr "BuddyPress registratie"
|
42 |
+
|
43 |
+
#: ../includes/class-admin.php:313
|
44 |
+
msgid "MailChimp cache successfully renewed."
|
45 |
+
msgstr "MailChimp cache succesvol geleegd."
|
46 |
+
|
47 |
+
#: ../includes/class-admin.php:315
|
48 |
+
msgid "Failed to renew MailChimp cache - please try again later."
|
49 |
+
msgstr ""
|
50 |
+
"Het is niet gelukt om de MailChimp cache te legen - probeer het alsjeblieft "
|
51 |
+
"later opnieuw."
|
52 |
+
|
53 |
+
#: ../includes/class-widget.php:20
|
54 |
+
msgid "MailChimp Sign-Up Form"
|
55 |
+
msgstr "MailChimp inschrijfformulier"
|
56 |
+
|
57 |
+
#: ../includes/class-widget.php:21
|
58 |
+
msgid "Displays your MailChimp for WordPress sign-up form"
|
59 |
+
msgstr "Toont je MailChimp for WordPress inschrijfformulier."
|
60 |
+
|
61 |
+
#: ../includes/class-widget.php:60
|
62 |
+
msgid "Newsletter"
|
63 |
+
msgstr "Nieuwsbrief"
|
64 |
+
|
65 |
+
#: ../includes/class-widget.php:63
|
66 |
+
msgid "Title:"
|
67 |
+
msgstr "Titel:"
|
68 |
+
|
69 |
+
#: ../includes/class-widget.php:67
|
70 |
+
#, php-format
|
71 |
+
msgid ""
|
72 |
+
"You can edit your sign-up form in the %sMailChimp for WordPress form settings"
|
73 |
+
"%s."
|
74 |
+
msgstr ""
|
75 |
+
"Je kan je inschrijfformulier wijzigen in de %sMailChimp for WordPress "
|
76 |
+
"formulier instellingen%s."
|
77 |
+
|
78 |
+
#: ../includes/functions/general.php:21
|
79 |
+
msgid "Email address"
|
80 |
+
msgstr "Emailadres"
|
81 |
+
|
82 |
+
#: ../includes/functions/general.php:22
|
83 |
+
msgid "Your email address"
|
84 |
+
msgstr "Jouw emailadres"
|
85 |
+
|
86 |
+
#: ../includes/functions/general.php:23
|
87 |
+
msgid "Sign up"
|
88 |
+
msgstr "Inschrijven"
|
89 |
+
|
90 |
+
#: ../includes/integrations/class-cf7.php:47
|
91 |
+
#: ../includes/views/checkbox-settings.php:82
|
92 |
+
#: ../includes/views/checkbox-settings.php:87
|
93 |
+
#: ../includes/views/form-settings.php:95
|
94 |
+
#: ../includes/views/form-settings.php:102
|
95 |
+
#: ../includes/views/form-settings.php:112
|
96 |
+
#: ../includes/views/form-settings.php:122
|
97 |
+
#: ../includes/views/form-settings.php:136
|
98 |
+
msgid "Yes"
|
99 |
+
msgstr "Ja"
|
100 |
+
|
101 |
+
#: ../includes/integrations/class-cf7.php:47
|
102 |
+
#: ../includes/views/checkbox-settings.php:82
|
103 |
+
#: ../includes/views/checkbox-settings.php:87
|
104 |
+
#: ../includes/views/form-settings.php:27
|
105 |
+
#: ../includes/views/form-settings.php:95
|
106 |
+
#: ../includes/views/form-settings.php:104
|
107 |
+
#: ../includes/views/form-settings.php:114
|
108 |
+
#: ../includes/views/form-settings.php:124
|
109 |
+
#: ../includes/views/form-settings.php:137
|
110 |
+
msgid "No"
|
111 |
+
msgstr "Nee"
|
112 |
+
|
113 |
+
#: ../includes/views/api-settings.php:22
|
114 |
+
msgid "API Settings"
|
115 |
+
msgstr "API Instellingen"
|
116 |
+
|
117 |
+
#: ../includes/views/api-settings.php:24
|
118 |
+
msgid "CONNECTED"
|
119 |
+
msgstr "VERBONDEN"
|
120 |
+
|
121 |
+
#: ../includes/views/api-settings.php:26
|
122 |
+
msgid "NOT CONNECTED"
|
123 |
+
msgstr "NIET VERBONDEN"
|
124 |
+
|
125 |
+
#: ../includes/views/api-settings.php:35
|
126 |
+
msgid "Get your API key here."
|
127 |
+
msgstr "Verkrijg hier je API-sleutel"
|
128 |
+
|
129 |
+
#: ../includes/views/api-settings.php:47
|
130 |
+
msgid "MailChimp Data"
|
131 |
+
msgstr "MailChimp Data"
|
132 |
+
|
133 |
+
#: ../includes/views/api-settings.php:48
|
134 |
+
msgid ""
|
135 |
+
"The table below shows your MailChimp lists data. If you applied changes to "
|
136 |
+
"your MailChimp lists, please use the following button to renew your cached "
|
137 |
+
"data."
|
138 |
+
msgstr ""
|
139 |
+
"The tabel hieronder toont je MailChimp lijst configuratie. Wanneer je hier "
|
140 |
+
"veranderingen aan hebt doorgevoerd die nog niet weergegeven worden kun je de "
|
141 |
+
"volgende button gebruiken om je configuratie opnieuw in te laden."
|
142 |
+
|
143 |
+
#: ../includes/views/api-settings.php:54
|
144 |
+
#: ../includes/views/api-settings.php:125
|
145 |
+
msgid "Renew MailChimp lists"
|
146 |
+
msgstr "Vernieuw MailChimp lijsten"
|
147 |
+
|
148 |
+
#: ../includes/views/api-settings.php:112
|
149 |
+
msgid "No lists were found in your MailChimp account"
|
150 |
+
msgstr "Er zijn geen lijsten gevonden in je MailChimp account."
|
151 |
+
|
152 |
+
#: ../includes/views/checkbox-settings.php:16
|
153 |
+
msgid ""
|
154 |
+
"To use sign-up checkboxes, select at least one list and one form to add the "
|
155 |
+
"checkbox to."
|
156 |
+
msgstr ""
|
157 |
+
"Selecteer ten minste 1 MailChimp lijst en 1 formulier om de checkbox aan toe "
|
158 |
+
"te voegen om inschrijf checkboxes te gebruiken."
|
159 |
+
|
160 |
+
#: ../includes/views/checkbox-settings.php:21
|
161 |
+
msgid "MailChimp settings for checkboxes"
|
162 |
+
msgstr "MailChimp instellingen voor checkboxes"
|
163 |
+
|
164 |
+
#: ../includes/views/checkbox-settings.php:25
|
165 |
+
msgid ""
|
166 |
+
"If you want to use sign-up checkboxes, select at least one MailChimp list to "
|
167 |
+
"subscribe people to."
|
168 |
+
msgstr ""
|
169 |
+
"Selecteer ten minste 1 MailChimp lijst waar mensen aan toegevoegd moeten "
|
170 |
+
"worden."
|
171 |
+
|
172 |
+
#: ../includes/views/checkbox-settings.php:35
|
173 |
+
#: ../includes/views/form-settings.php:48
|
174 |
+
#, php-format
|
175 |
+
msgid "No lists found, %sare you connected to MailChimp?%s"
|
176 |
+
msgstr "Geen lijsten gevonden. %sBen je verbonden met MailChimp?%s"
|
177 |
+
|
178 |
+
#: ../includes/views/checkbox-settings.php:42
|
179 |
+
msgid ""
|
180 |
+
"Select the list(s) to which people who check the checkbox should be "
|
181 |
+
"subscribed."
|
182 |
+
msgstr ""
|
183 |
+
"Selecteer de lijsten aan welke mensen die checkbox aanvinken toegevoegd "
|
184 |
+
"zouden moeten worden."
|
185 |
+
|
186 |
+
#: ../includes/views/checkbox-settings.php:50
|
187 |
+
#: ../includes/views/form-settings.php:96
|
188 |
+
msgid ""
|
189 |
+
"Select \"yes\" if you want people to confirm their email address before "
|
190 |
+
"being subscribed (recommended)"
|
191 |
+
msgstr ""
|
192 |
+
"Selecteer \"yes\" wanneer je wilt dat mensen hun emailadres moeten "
|
193 |
+
"bevestigen alvorens ze aan je MailChimp lijst worden toegevoegd (aanbevolen)"
|
194 |
+
|
195 |
+
#: ../includes/views/checkbox-settings.php:54
|
196 |
+
msgid "Checkbox settings"
|
197 |
+
msgstr "Checkbox instellingen"
|
198 |
+
|
199 |
+
#: ../includes/views/checkbox-settings.php:58
|
200 |
+
msgid "Add the checkbox to these forms"
|
201 |
+
msgstr "Voeg de checkbox toe aan de volgende formulieren"
|
202 |
+
|
203 |
+
#: ../includes/views/checkbox-settings.php:70
|
204 |
+
msgid "Selecting a form will automatically add the sign-up checkbox to it."
|
205 |
+
msgstr ""
|
206 |
+
"De \"schrijf je in\" checkbox wordt automatisch toegevoegd aan de "
|
207 |
+
"formulieren die je hier selecteert."
|
208 |
+
|
209 |
+
#: ../includes/views/checkbox-settings.php:74
|
210 |
+
msgid "Checkbox label text"
|
211 |
+
msgstr "Checkbox label tekst"
|
212 |
+
|
213 |
+
#: ../includes/views/checkbox-settings.php:77
|
214 |
+
#, php-format
|
215 |
+
msgid "HTML tags like %s are allowed in the label text."
|
216 |
+
msgstr "HTML tags als %s zijn toegestaan in de label tekst."
|
217 |
+
|
218 |
+
#: ../includes/views/checkbox-settings.php:81
|
219 |
+
msgid "Pre-check the checkbox?"
|
220 |
+
msgstr "Vink de checkbox standaard aan?"
|
221 |
+
|
222 |
+
#: ../includes/views/checkbox-settings.php:86
|
223 |
+
msgid "Load some default CSS?"
|
224 |
+
msgstr "Laad standaard CSS?"
|
225 |
+
|
226 |
+
#: ../includes/views/checkbox-settings.php:88
|
227 |
+
msgid "Select \"yes\" if the checkbox appears in a weird place."
|
228 |
+
msgstr "Selecteer \"ja\" als de checkbox op een vreemde plaats verschijnt."
|
229 |
+
|
230 |
+
#: ../includes/views/form-settings.php:9
|
231 |
+
msgid "Form Settings"
|
232 |
+
msgstr "Formulier Instellingen"
|
233 |
+
|
234 |
+
#: ../includes/views/form-settings.php:15
|
235 |
+
#, php-format
|
236 |
+
msgid ""
|
237 |
+
"To use the MailChimp sign-up form, configure the form below and then either "
|
238 |
+
"paste %s in the content of a post or page or use the widget."
|
239 |
+
msgstr ""
|
240 |
+
"Om het MailChimp inschrijfformulier te gebruiken kun je hieronder je "
|
241 |
+
"formulier configureren. Vervolgens kun je de meegeleverde plugin widget "
|
242 |
+
"gebruiken of %s in de inhoud van een bericht of pagina plakken."
|
243 |
+
|
244 |
+
#: ../includes/views/form-settings.php:20
|
245 |
+
msgid "Required form settings"
|
246 |
+
msgstr "Verplichte formulier instellingen"
|
247 |
+
|
248 |
+
#: ../includes/views/form-settings.php:24
|
249 |
+
msgid "Load form styles?"
|
250 |
+
msgstr "Laad formulier stijlen?"
|
251 |
+
|
252 |
+
#: ../includes/views/form-settings.php:28
|
253 |
+
msgid "Yes, load basic formatting styles"
|
254 |
+
msgstr "Ja, laad standaard formulier stijlen"
|
255 |
+
|
256 |
+
#: ../includes/views/form-settings.php:29
|
257 |
+
msgid "Yes, load my custom form styles"
|
258 |
+
msgstr "Ja, laad mijn zelf ontworpen formulier stijlen"
|
259 |
+
|
260 |
+
#: ../includes/views/form-settings.php:31
|
261 |
+
msgid "Light Theme"
|
262 |
+
msgstr "Licht Thema"
|
263 |
+
|
264 |
+
#: ../includes/views/form-settings.php:32
|
265 |
+
msgid "Red Theme"
|
266 |
+
msgstr "Rood Thema"
|
267 |
+
|
268 |
+
#: ../includes/views/form-settings.php:33
|
269 |
+
msgid "Green Theme"
|
270 |
+
msgstr "Groen Thema"
|
271 |
+
|
272 |
+
#: ../includes/views/form-settings.php:34
|
273 |
+
msgid "Blue Theme"
|
274 |
+
msgstr "Blauw Thema"
|
275 |
+
|
276 |
+
#: ../includes/views/form-settings.php:35
|
277 |
+
msgid "Dark Theme"
|
278 |
+
msgstr "Donker Thema"
|
279 |
+
|
280 |
+
#: ../includes/views/form-settings.php:36
|
281 |
+
msgid "Custom Color Theme"
|
282 |
+
msgstr "Aangepaste Kleur Thema"
|
283 |
+
|
284 |
+
#: ../includes/views/form-settings.php:41
|
285 |
+
msgid ""
|
286 |
+
"If you want to load some default CSS styles, select \"basic formatting styles"
|
287 |
+
"\" or choose one of the color themes"
|
288 |
+
msgstr ""
|
289 |
+
"Wanneer je standaard stijlen in wilt laden, selecteer \"standaard formulier "
|
290 |
+
"stijlen\" of kies een van de kleurenthema's."
|
291 |
+
|
292 |
+
#: ../includes/views/form-settings.php:61
|
293 |
+
msgid ""
|
294 |
+
"Select the list(s) to which people who submit this form should be subscribed."
|
295 |
+
msgstr ""
|
296 |
+
"Selecteer de MailChimp lijsten aan welke mensen die het formulier invullen "
|
297 |
+
"toegevoegd moeten worden."
|
298 |
+
|
299 |
+
#: ../includes/views/form-settings.php:76
|
300 |
+
#, php-format
|
301 |
+
msgid ""
|
302 |
+
"To display your sign-up form, paste %s inside the contents of a post, page "
|
303 |
+
"or text widget."
|
304 |
+
msgstr ""
|
305 |
+
"Plak %s in de inhoud van een bericht of pagina of gebruik de widget om je "
|
306 |
+
"inschrijfformulier te tonen."
|
307 |
+
|
308 |
+
#: ../includes/views/form-settings.php:106
|
309 |
+
msgid ""
|
310 |
+
"Select \"yes\" if you want to send your lists Welcome Email if a subscribe "
|
311 |
+
"succeeds (only when double opt-in is disabled)."
|
312 |
+
msgstr ""
|
313 |
+
"Selecteer \"ja\" als je de \"Welcome Email\" wilt sturen naar nieuwe "
|
314 |
+
"abonnees (enkel wanneer \"double opt-in\" uitgeschakeld is)"
|
315 |
+
|
316 |
+
#: ../includes/views/form-settings.php:116
|
317 |
+
msgid ""
|
318 |
+
"Select \"yes\" if you want to update existing subscribers (instead of "
|
319 |
+
"showing the \"already subscribed\" message)."
|
320 |
+
msgstr ""
|
321 |
+
"Selecteer \"ja\" wanneer je bestaande abonnees wilt updaten (in plaats van "
|
322 |
+
"het tonen van de \"reeds ingeschreven\" melding)"
|
323 |
+
|
324 |
+
#: ../includes/views/form-settings.php:126
|
325 |
+
msgid ""
|
326 |
+
"Select \"yes\" if you want to replace the interest groups with the groups "
|
327 |
+
"provided instead of adding the provided groups to the member's interest "
|
328 |
+
"groups (only when updating a subscriber)."
|
329 |
+
msgstr ""
|
330 |
+
"Selecteer \"ja\" wanneer je interest groups wilt verplaatsen met de "
|
331 |
+
"verstuurde groepen in plaats van deze aan de bestaande groepen toe te voegen "
|
332 |
+
"(enkel bij het updaten van abonnees)."
|
333 |
+
|
334 |
+
#: ../includes/views/form-settings.php:130
|
335 |
+
msgid "Form Settings & Messages"
|
336 |
+
msgstr "Form Instellingen & Meldingen"
|
337 |
+
|
338 |
+
#: ../includes/views/form-settings.php:139
|
339 |
+
msgid "Select \"yes\" if you want to use AJAX (JavaScript) to submit forms."
|
340 |
+
msgstr ""
|
341 |
+
"Selecteer \"ja\" wanneer je AJAX (JavaScript) wilt gebruiken voor het "
|
342 |
+
"verzenden van formulieren."
|
343 |
+
|
344 |
+
#: ../includes/views/form-settings.php:142
|
345 |
+
msgid "Hide form after a successful sign-up?"
|
346 |
+
msgstr "Verberg formulier na succesvolle inschrijvingen?"
|
347 |
+
|
348 |
+
#: ../includes/views/form-settings.php:144
|
349 |
+
msgid "Select \"yes\" to hide the form fields after a successful sign-up."
|
350 |
+
msgstr ""
|
351 |
+
"Selecteer \"ja\" om de formuliervelden te verbergen na elke succesvolle "
|
352 |
+
"inschrijving."
|
353 |
+
|
354 |
+
#: ../includes/views/form-settings.php:147
|
355 |
+
msgid "Redirect to URL after successful sign-ups"
|
356 |
+
msgstr "Doorsturen naar URL na succesvolle inschrijving"
|
357 |
+
|
358 |
+
#: ../includes/views/form-settings.php:150
|
359 |
+
msgid ""
|
360 |
+
"Leave empty or enter 0 for no redirection. Use complete (absolute) URLs, "
|
361 |
+
"including <code>http://</code>"
|
362 |
+
msgstr ""
|
363 |
+
"Laat leeg (of geef 0 in) voor geen doorverwijzing. Gebruik complete "
|
364 |
+
"(absolute) URLs, inclusief <code>http://</code>"
|
365 |
+
|
366 |
+
#: ../includes/views/form-settings.php:154
|
367 |
+
msgid "Success message"
|
368 |
+
msgstr "Succesmelding"
|
369 |
+
|
370 |
+
#: ../includes/views/form-settings.php:158
|
371 |
+
msgid "General error message"
|
372 |
+
msgstr "Foutmelding"
|
373 |
+
|
374 |
+
#: ../includes/views/form-settings.php:162
|
375 |
+
msgid "Invalid email address message"
|
376 |
+
msgstr "Foutief emailadres"
|
377 |
+
|
378 |
+
#: ../includes/views/form-settings.php:166
|
379 |
+
msgid "Already subscribed message"
|
380 |
+
msgstr "Reeds ingeschreven"
|
381 |
+
|
382 |
+
#: ../includes/views/form-settings.php:171
|
383 |
+
msgid "Invalid CAPTCHA message"
|
384 |
+
msgstr "Foutieve CAPTCHA melding"
|
385 |
+
|
386 |
+
#: ../includes/views/form-settings.php:178
|
387 |
+
#, php-format
|
388 |
+
msgid "HTML tags like %s are allowed in the message fields."
|
389 |
+
msgstr "HTML tags als %s zijn toegestaan in de meldingteksten."
|
390 |
+
|
391 |
+
#: ../includes/views/parts/admin-field-wizard.php:10
|
392 |
+
msgid "Add a new field"
|
393 |
+
msgstr "Nieuw veld toevoegen"
|
394 |
+
|
395 |
+
#: ../includes/views/parts/admin-field-wizard.php:14
|
396 |
+
msgid "Select at least one list first."
|
397 |
+
msgstr "Selecteer ten minste 1 MailChimp lijst."
|
398 |
+
|
399 |
+
#: ../includes/views/parts/admin-field-wizard.php:17
|
400 |
+
msgid "Use the tool below to generate the HTML for your form fields."
|
401 |
+
msgstr ""
|
402 |
+
"Gebruik onderstaande tool om de HTML voor je formuliervelden te genereren"
|
403 |
+
|
404 |
+
#: ../includes/views/parts/admin-field-wizard.php:20
|
405 |
+
msgid "Select MailChimp field.."
|
406 |
+
msgstr "Selecteer MailChimp veld"
|
407 |
+
|
408 |
+
#: ../includes/views/parts/admin-field-wizard.php:33
|
409 |
+
#: ../includes/views/parts/admin-field-wizard.php:38
|
410 |
+
#: ../includes/views/parts/admin-field-wizard.php:43
|
411 |
+
msgid "(optional)"
|
412 |
+
msgstr "(optioneel)"
|
413 |
+
|
414 |
+
#: ../includes/views/parts/admin-field-wizard.php:43
|
415 |
+
msgid "Initial value"
|
416 |
+
msgstr "Initiële waarde"
|
417 |
+
|
418 |
+
#: ../includes/views/parts/admin-field-wizard.php:48
|
419 |
+
msgid "(leave empty to hide)"
|
420 |
+
msgstr "(laat leeg om te verbergen)"
|
421 |
+
|
422 |
+
#: ../includes/views/parts/admin-field-wizard.php:53
|
423 |
+
#, php-format
|
424 |
+
msgid "Wrap in paragraph %s tags?"
|
425 |
+
msgstr "Omsluit in paragraaf %s tags?"
|
426 |
+
|
427 |
+
#: ../includes/views/parts/admin-field-wizard.php:58
|
428 |
+
msgid "Required field?"
|
429 |
+
msgstr "Verplicht veld?"
|
430 |
+
|
431 |
+
#: ../includes/views/parts/admin-field-wizard.php:62
|
432 |
+
msgid "Add to form"
|
433 |
+
msgstr "Aan formulier toevoegen"
|
434 |
+
|
435 |
+
#: ../includes/views/parts/admin-field-wizard.php:66
|
436 |
+
msgid "Generated HTML"
|
437 |
+
msgstr "Gegenereerde HTML"
|
438 |
+
|
439 |
+
#~ msgid "Click here to get your MailChimp API Key."
|
440 |
+
#~ msgstr "Klik hier om je MailChimp API sleutel op te halen."
|
languages/mailchimp-for-wp.mo
ADDED
Binary file
|
languages/mailchimp-for-wp.po
ADDED
@@ -0,0 +1,401 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: MailChimp for WordPress\n"
|
4 |
+
"POT-Creation-Date: 2014-04-29 22:59+0100\n"
|
5 |
+
"PO-Revision-Date: 2014-04-29 22:59+0100\n"
|
6 |
+
"Last-Translator: Danny <hi@dannyvankooten.com>\n"
|
7 |
+
"Language-Team: Danny van Kooten <hi@dannyvankooten.com>\n"
|
8 |
+
"Language: en_EN\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.5\n"
|
13 |
+
"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Poedit-SearchPath-0: ..\n"
|
16 |
+
|
17 |
+
#: ../includes/class-admin.php:92 ../includes/views/api-settings.php:12
|
18 |
+
#: ../includes/views/checkbox-settings.php:11
|
19 |
+
#: ../includes/views/form-settings.php:91
|
20 |
+
msgid "Settings"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: ../includes/class-admin.php:111
|
24 |
+
msgid "Upgrade to Pro"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: ../includes/class-admin.php:192
|
28 |
+
msgid "Comment form"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: ../includes/class-admin.php:193
|
32 |
+
msgid "Registration form"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: ../includes/class-admin.php:197
|
36 |
+
msgid "MultiSite forms"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: ../includes/class-admin.php:201
|
40 |
+
msgid "BuddyPress registration"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: ../includes/class-admin.php:313
|
44 |
+
msgid "MailChimp cache successfully renewed."
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: ../includes/class-admin.php:315
|
48 |
+
msgid "Failed to renew MailChimp cache - please try again later."
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: ../includes/class-widget.php:20
|
52 |
+
msgid "MailChimp Sign-Up Form"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: ../includes/class-widget.php:21
|
56 |
+
msgid "Displays your MailChimp for WordPress sign-up form"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: ../includes/class-widget.php:60
|
60 |
+
msgid "Newsletter"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: ../includes/class-widget.php:63
|
64 |
+
msgid "Title:"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: ../includes/class-widget.php:67
|
68 |
+
#, php-format
|
69 |
+
msgid ""
|
70 |
+
"You can edit your sign-up form in the %sMailChimp for WordPress form settings"
|
71 |
+
"%s."
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: ../includes/functions/general.php:21
|
75 |
+
msgid "Email address"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: ../includes/functions/general.php:22
|
79 |
+
msgid "Your email address"
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: ../includes/functions/general.php:23
|
83 |
+
msgid "Sign up"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: ../includes/integrations/class-cf7.php:47
|
87 |
+
#: ../includes/views/checkbox-settings.php:82
|
88 |
+
#: ../includes/views/checkbox-settings.php:87
|
89 |
+
#: ../includes/views/form-settings.php:95
|
90 |
+
#: ../includes/views/form-settings.php:102
|
91 |
+
#: ../includes/views/form-settings.php:112
|
92 |
+
#: ../includes/views/form-settings.php:122
|
93 |
+
#: ../includes/views/form-settings.php:136
|
94 |
+
msgid "Yes"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: ../includes/integrations/class-cf7.php:47
|
98 |
+
#: ../includes/views/checkbox-settings.php:82
|
99 |
+
#: ../includes/views/checkbox-settings.php:87
|
100 |
+
#: ../includes/views/form-settings.php:27
|
101 |
+
#: ../includes/views/form-settings.php:95
|
102 |
+
#: ../includes/views/form-settings.php:104
|
103 |
+
#: ../includes/views/form-settings.php:114
|
104 |
+
#: ../includes/views/form-settings.php:124
|
105 |
+
#: ../includes/views/form-settings.php:137
|
106 |
+
msgid "No"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: ../includes/views/api-settings.php:22
|
110 |
+
msgid "API Settings"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: ../includes/views/api-settings.php:24
|
114 |
+
msgid "CONNECTED"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: ../includes/views/api-settings.php:26
|
118 |
+
msgid "NOT CONNECTED"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: ../includes/views/api-settings.php:35
|
122 |
+
msgid "Get your API key here."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: ../includes/views/api-settings.php:47
|
126 |
+
msgid "MailChimp Data"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: ../includes/views/api-settings.php:48
|
130 |
+
msgid ""
|
131 |
+
"The table below shows your MailChimp lists data. If you applied changes to "
|
132 |
+
"your MailChimp lists, please use the following button to renew your cached "
|
133 |
+
"data."
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: ../includes/views/api-settings.php:54
|
137 |
+
#: ../includes/views/api-settings.php:125
|
138 |
+
msgid "Renew MailChimp lists"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: ../includes/views/api-settings.php:112
|
142 |
+
msgid "No lists were found in your MailChimp account"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: ../includes/views/checkbox-settings.php:16
|
146 |
+
msgid ""
|
147 |
+
"To use sign-up checkboxes, select at least one list and one form to add the "
|
148 |
+
"checkbox to."
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: ../includes/views/checkbox-settings.php:21
|
152 |
+
msgid "MailChimp settings for checkboxes"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: ../includes/views/checkbox-settings.php:25
|
156 |
+
msgid ""
|
157 |
+
"If you want to use sign-up checkboxes, select at least one MailChimp list to "
|
158 |
+
"subscribe people to."
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: ../includes/views/checkbox-settings.php:35
|
162 |
+
#: ../includes/views/form-settings.php:48
|
163 |
+
#, php-format
|
164 |
+
msgid "No lists found, %sare you connected to MailChimp?%s"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: ../includes/views/checkbox-settings.php:42
|
168 |
+
msgid ""
|
169 |
+
"Select the list(s) to which people who check the checkbox should be "
|
170 |
+
"subscribed."
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: ../includes/views/checkbox-settings.php:50
|
174 |
+
#: ../includes/views/form-settings.php:96
|
175 |
+
msgid ""
|
176 |
+
"Select \"yes\" if you want people to confirm their email address before "
|
177 |
+
"being subscribed (recommended)"
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: ../includes/views/checkbox-settings.php:54
|
181 |
+
msgid "Checkbox settings"
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: ../includes/views/checkbox-settings.php:58
|
185 |
+
msgid "Add the checkbox to these forms"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: ../includes/views/checkbox-settings.php:70
|
189 |
+
msgid "Selecting a form will automatically add the sign-up checkbox to it."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: ../includes/views/checkbox-settings.php:74
|
193 |
+
msgid "Checkbox label text"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: ../includes/views/checkbox-settings.php:77
|
197 |
+
#, php-format
|
198 |
+
msgid "HTML tags like %s are allowed in the label text."
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: ../includes/views/checkbox-settings.php:81
|
202 |
+
msgid "Pre-check the checkbox?"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: ../includes/views/checkbox-settings.php:86
|
206 |
+
msgid "Load some default CSS?"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: ../includes/views/checkbox-settings.php:88
|
210 |
+
msgid "Select \"yes\" if the checkbox appears in a weird place."
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: ../includes/views/form-settings.php:9
|
214 |
+
msgid "Form Settings"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: ../includes/views/form-settings.php:15
|
218 |
+
#, php-format
|
219 |
+
msgid ""
|
220 |
+
"To use the MailChimp sign-up form, configure the form below and then either "
|
221 |
+
"paste %s in the content of a post or page or use the widget."
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: ../includes/views/form-settings.php:20
|
225 |
+
msgid "Required form settings"
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: ../includes/views/form-settings.php:24
|
229 |
+
msgid "Load form styles?"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: ../includes/views/form-settings.php:28
|
233 |
+
msgid "Yes, load basic form styles"
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: ../includes/views/form-settings.php:29
|
237 |
+
msgid "Yes, load my custom form styles"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: ../includes/views/form-settings.php:30
|
241 |
+
msgid "Yes, load default form theme"
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: ../includes/views/form-settings.php:31
|
245 |
+
msgid "Light Theme"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: ../includes/views/form-settings.php:32
|
249 |
+
msgid "Red Theme"
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: ../includes/views/form-settings.php:33
|
253 |
+
msgid "Green Theme"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: ../includes/views/form-settings.php:34
|
257 |
+
msgid "Blue Theme"
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: ../includes/views/form-settings.php:35
|
261 |
+
msgid "Dark Theme"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: ../includes/views/form-settings.php:36
|
265 |
+
msgid "Custom Color Theme"
|
266 |
+
msgstr ""
|
267 |
+
|
268 |
+
#: ../includes/views/form-settings.php:41
|
269 |
+
msgid ""
|
270 |
+
"If you want to load some default CSS styles, select \"basic formatting styles"
|
271 |
+
"\" or choose one of the color themes"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: ../includes/views/form-settings.php:61
|
275 |
+
msgid ""
|
276 |
+
"Select the list(s) to which people who submit this form should be subscribed."
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: ../includes/views/form-settings.php:76
|
280 |
+
#, php-format
|
281 |
+
msgid ""
|
282 |
+
"To display your sign-up form, paste %s inside the contents of a post, page "
|
283 |
+
"or text widget."
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: ../includes/views/form-settings.php:106
|
287 |
+
msgid ""
|
288 |
+
"Select \"yes\" if you want to send your lists Welcome Email if a subscribe "
|
289 |
+
"succeeds (only when double opt-in is disabled)."
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: ../includes/views/form-settings.php:116
|
293 |
+
msgid ""
|
294 |
+
"Select \"yes\" if you want to update existing subscribers (instead of "
|
295 |
+
"showing the \"already subscribed\" message)."
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: ../includes/views/form-settings.php:126
|
299 |
+
msgid ""
|
300 |
+
"Select \"yes\" if you want to replace the interest groups with the groups "
|
301 |
+
"provided instead of adding the provided groups to the member's interest "
|
302 |
+
"groups (only when updating a subscriber)."
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: ../includes/views/form-settings.php:130
|
306 |
+
msgid "Form Settings & Messages"
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
#: ../includes/views/form-settings.php:139
|
310 |
+
msgid "Select \"yes\" if you want to use AJAX (JavaScript) to submit forms."
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: ../includes/views/form-settings.php:142
|
314 |
+
msgid "Hide form after a successful sign-up?"
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: ../includes/views/form-settings.php:144
|
318 |
+
msgid "Select \"yes\" to hide the form fields after a successful sign-up."
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: ../includes/views/form-settings.php:147
|
322 |
+
msgid "Redirect to URL after successful sign-ups"
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: ../includes/views/form-settings.php:150
|
326 |
+
msgid ""
|
327 |
+
"Leave empty or enter 0 for no redirection. Use complete (absolute) URLs, "
|
328 |
+
"including <code>http://</code>"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: ../includes/views/form-settings.php:154
|
332 |
+
msgid "Success message"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: ../includes/views/form-settings.php:158
|
336 |
+
msgid "General error message"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: ../includes/views/form-settings.php:162
|
340 |
+
msgid "Invalid email address message"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: ../includes/views/form-settings.php:166
|
344 |
+
msgid "Already subscribed message"
|
345 |
+
msgstr ""
|
346 |
+
|
347 |
+
#: ../includes/views/form-settings.php:171
|
348 |
+
msgid "Invalid CAPTCHA message"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: ../includes/views/form-settings.php:178
|
352 |
+
#, php-format
|
353 |
+
msgid "HTML tags like %s are allowed in the message fields."
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: ../includes/views/parts/admin-field-wizard.php:10
|
357 |
+
msgid "Add a new field"
|
358 |
+
msgstr ""
|
359 |
+
|
360 |
+
#: ../includes/views/parts/admin-field-wizard.php:14
|
361 |
+
msgid "Select at least one list first."
|
362 |
+
msgstr ""
|
363 |
+
|
364 |
+
#: ../includes/views/parts/admin-field-wizard.php:17
|
365 |
+
msgid "Use the tool below to generate the HTML for your form fields."
|
366 |
+
msgstr ""
|
367 |
+
|
368 |
+
#: ../includes/views/parts/admin-field-wizard.php:20
|
369 |
+
msgid "Select MailChimp field.."
|
370 |
+
msgstr ""
|
371 |
+
|
372 |
+
#: ../includes/views/parts/admin-field-wizard.php:33
|
373 |
+
#: ../includes/views/parts/admin-field-wizard.php:38
|
374 |
+
#: ../includes/views/parts/admin-field-wizard.php:43
|
375 |
+
msgid "(optional)"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: ../includes/views/parts/admin-field-wizard.php:43
|
379 |
+
msgid "Initial value"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: ../includes/views/parts/admin-field-wizard.php:48
|
383 |
+
msgid "(leave empty to hide)"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: ../includes/views/parts/admin-field-wizard.php:53
|
387 |
+
#, php-format
|
388 |
+
msgid "Wrap in paragraph %s tags?"
|
389 |
+
msgstr ""
|
390 |
+
|
391 |
+
#: ../includes/views/parts/admin-field-wizard.php:58
|
392 |
+
msgid "Required field?"
|
393 |
+
msgstr ""
|
394 |
+
|
395 |
+
#: ../includes/views/parts/admin-field-wizard.php:62
|
396 |
+
msgid "Add to form"
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: ../includes/views/parts/admin-field-wizard.php:66
|
400 |
+
msgid "Generated HTML"
|
401 |
+
msgstr ""
|
mailchimp-for-wp.php
CHANGED
@@ -3,9 +3,11 @@
|
|
3 |
Plugin Name: MailChimp for WordPress Lite
|
4 |
Plugin URI: http://dannyvankooten.com/mailchimp-for-wordpress/
|
5 |
Description: Lite version of MailChimp for WordPress. Adds various sign-up methods to your website.
|
6 |
-
Version:
|
7 |
Author: Danny van Kooten
|
8 |
-
Author URI: http://
|
|
|
|
|
9 |
License: GPL v3
|
10 |
|
11 |
MailChimp for WordPress
|
@@ -45,11 +47,12 @@ function mc4wp_load_plugin() {
|
|
45 |
}
|
46 |
|
47 |
// bootstrap the lite plugin
|
48 |
-
define( "MC4WP_LITE_VERSION", "
|
49 |
define( "MC4WP_LITE_PLUGIN_DIR", plugin_dir_path( __FILE__ ) );
|
50 |
define( "MC4WP_LITE_PLUGIN_URL", plugins_url( '/' , __FILE__ ) );
|
|
|
51 |
|
52 |
-
require_once MC4WP_LITE_PLUGIN_DIR . 'includes/functions.php';
|
53 |
require_once MC4WP_LITE_PLUGIN_DIR . 'includes/class-plugin.php';
|
54 |
$GLOBALS['mc4wp'] = new MC4WP_Lite();
|
55 |
|
3 |
Plugin Name: MailChimp for WordPress Lite
|
4 |
Plugin URI: http://dannyvankooten.com/mailchimp-for-wordpress/
|
5 |
Description: Lite version of MailChimp for WordPress. Adds various sign-up methods to your website.
|
6 |
+
Version: 2.0
|
7 |
Author: Danny van Kooten
|
8 |
+
Author URI: http://dannyvankooten.com
|
9 |
+
Text Domain: mailchimp-for-wp
|
10 |
+
Domain Path: /languages
|
11 |
License: GPL v3
|
12 |
|
13 |
MailChimp for WordPress
|
47 |
}
|
48 |
|
49 |
// bootstrap the lite plugin
|
50 |
+
define( "MC4WP_LITE_VERSION", "2.0" );
|
51 |
define( "MC4WP_LITE_PLUGIN_DIR", plugin_dir_path( __FILE__ ) );
|
52 |
define( "MC4WP_LITE_PLUGIN_URL", plugins_url( '/' , __FILE__ ) );
|
53 |
+
define( "MC4WP_LITE_PLUGIN_FILE", __FILE__ );
|
54 |
|
55 |
+
require_once MC4WP_LITE_PLUGIN_DIR . 'includes/functions/general.php';
|
56 |
require_once MC4WP_LITE_PLUGIN_DIR . 'includes/class-plugin.php';
|
57 |
$GLOBALS['mc4wp'] = new MC4WP_Lite();
|
58 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: DvanKooten
|
|
3 |
Donate link: http://dannyvankooten.com/donate/
|
4 |
Tags: mailchimp,form,shortcode,widget,checkbox,comment,newsletter,buddypress,multisite,bbpress,woocommerce,easy digital downloads,contact form,contact form 7
|
5 |
Requires at least: 3.1
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag:
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -27,8 +27,8 @@ Add sign-up checkboxes to *any* form on your website. The plugin offers built-in
|
|
27 |
**MailChimp for WordPress, at a glance..**
|
28 |
|
29 |
- Simple. All you need is your MailChimp API key.
|
30 |
-
- Customizable. Have the form fields generated for you or
|
31 |
-
- Beautiful. Choose one of the default form themes or
|
32 |
- Developer friendly.
|
33 |
|
34 |
[Installation](http://wordpress.org/plugins/mailchimp-for-wp/installation/) | [Frequently Asked Questions](http://wordpress.org/plugins/mailchimp-for-wp/faq/) | [Screenshots](http://wordpress.org/plugins/mailchimp-for-wp/screenshots/)
|
@@ -80,8 +80,8 @@ If you like the plugin, upgrade to [MailChimp for WordPress Pro](http://dannyvan
|
|
80 |
>
|
81 |
> 1. Multiple forms, each subscribing to one or multiple MailChimp list(s).
|
82 |
> 1. AJAX - no page reload after submitting a sign-up form.
|
83 |
-
> 1. Custom color themes and a
|
84 |
-
> 1. Statistics & log
|
85 |
>
|
86 |
> [More Pro features](http://dannyvankooten.com/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-link) | [Demo](http://dannyvankooten.com/mailchimp-for-wordpress/demo/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-link)
|
87 |
|
@@ -125,7 +125,7 @@ You can use CSS rules to style the sign-up form, use the following CSS selectors
|
|
125 |
|
126 |
Add your custom CSS rules to the end of your theme stylesheet, **/wp-content/themes/your-theme-name/style.css**. Do not add them to the plugin stylesheet as they will be automatically overwritten on the next plugin update.
|
127 |
|
128 |
-
[PS: With the Pro version, you can design beautiful forms
|
129 |
|
130 |
= Where can I find my MailChimp API key? =
|
131 |
[Here](http://kb.mailchimp.com/article/where-can-i-find-my-api-key)
|
@@ -145,11 +145,11 @@ If you need more data for your merge fields, prefix the field name with `mc4wp-`
|
|
145 |
`
|
146 |
|
147 |
= Can I add a checkbox to third-party forms? =
|
148 |
-
Yes. Just include a checkbox with name attribute `mc4wp-
|
149 |
|
150 |
*Example HTML*
|
151 |
`
|
152 |
-
<label><input type="checkbox" name="mc4wp-
|
153 |
`
|
154 |
|
155 |
If you need to send more data to your MailChimp list, prefix the name attribute with `mc4wp-`.
|
@@ -179,6 +179,9 @@ When you have double opt-in disabled, new subscribers will be seen as *imports*
|
|
179 |
= Can I add more (hidden) fields to the sign-up checkbox? =
|
180 |
Not at the moment, but you can add more data using a filter. Here is a code snippet to [add grouping information to comment form sign-ups](https://gist.github.com/dannyvankooten/7120559).
|
181 |
|
|
|
|
|
|
|
182 |
= Why does the checkbox not show up at my comment form? =
|
183 |
Your theme probably does not support the necessary comment hook this plugin uses to add the checkbox to your comment form. You can manually place the checkbox by placing the following code snippet inside the form tags of your theme's comment form.
|
184 |
|
@@ -199,6 +202,23 @@ Your theme folder can be found by browsing to `/wp-content/themes/your-theme-nam
|
|
199 |
|
200 |
== Changelog ==
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
= 1.5.8 - March 26, 2014 =
|
203 |
|
204 |
**Fixes**
|
@@ -354,177 +374,7 @@ Your theme folder can be found by browsing to `/wp-content/themes/your-theme-nam
|
|
354 |
* Improved: usability and responsiveness of form settings page
|
355 |
* Improved: clean-up
|
356 |
|
357 |
-
= 1.1.4 =
|
358 |
-
* Fixed: usage of textarea elements in the form mark-up for WP3.3+.
|
359 |
-
|
360 |
-
= 1.1.3 =
|
361 |
-
* Added: first and lastname to registration hook, works with Register Redux Plus for example.
|
362 |
-
|
363 |
-
= 1.1.2 =
|
364 |
-
* Fixed: field wizard initial value not being set in some browsers
|
365 |
-
* Fixed: CF7 checkbox subscribing everyone regardless of checkbox setting
|
366 |
-
* Added: bbPress compatibility, you can now add a sign-up checkbox to the new topic and new reply forms
|
367 |
-
* Improved: various code and debug improvements
|
368 |
-
* Improved: field wizard now wraps radio inputs and checkboxes in a label
|
369 |
-
* Improved: Usability when using sign-up checkbox with Contact Form 7
|
370 |
-
* Removed: form usage option
|
371 |
-
|
372 |
-
= 1.1.1 =
|
373 |
-
* Fixed warning for BuddyPress sites
|
374 |
-
|
375 |
-
= 1.1 =
|
376 |
-
* Fixed: spam comments not being filtered
|
377 |
-
* Fixed: Automatic splitting of NAME into FNAME and LNAME
|
378 |
-
* Added: HTML 5 url, tel and date fields to field wizard
|
379 |
-
* Added: Form variables for usage inside form mark-up.
|
380 |
-
* Improved: default form CSS
|
381 |
-
* Improved: Contact Form 7 integration
|
382 |
-
|
383 |
-
= 1.0.3 =
|
384 |
-
* Added HTML quicktags to form markup textarea.
|
385 |
-
* Added option to set custom label when using Contact Form 7 shortcode `[mc4wp_checkbox "Your checkbox label"]`
|
386 |
-
* Added HTML comments
|
387 |
-
* Added upgrade link to plugins overview
|
388 |
-
* Improved compatibility with third-party plugins when using checkbox, smarter e-mail field guessing
|
389 |
-
* Improved: easier copying of the form shortcode from form settings pages
|
390 |
-
* Added: uninstall function
|
391 |
-
|
392 |
-
= 1.0.2 =
|
393 |
-
* Improved code, less memory usage
|
394 |
-
* Added `mc4wp_form()` function for usage inside template files
|
395 |
-
|
396 |
-
= 1.0.1 =
|
397 |
-
* Changed: format for groups is now somewhat easier. Refer to the FAQ and update your form mark-up please. (Backwards compatibility included)
|
398 |
-
* Added: group preset to form field wizard for hidden fields, checkboxes and radio inputs.
|
399 |
-
* Added: radio inputs to field wizard
|
400 |
-
* Improved: the field wizard will now add labels after the checkbox and radio input elements.
|
401 |
-
* Fixed: regular error messages not being shown in some cases.
|
402 |
-
|
403 |
-
= 1.0 =
|
404 |
-
* Added support for group checkboxes
|
405 |
-
* Added support for paragraph elements in error and success messages, the messages are now wrapped in `<div>` instead. Update your custom CSS rules
|
406 |
-
* Added some translation filters for qTranslate and WPML compatibility.
|
407 |
-
|
408 |
-
= 0.8.3 =
|
409 |
-
* Added: Guess first and last name when only using full name field.
|
410 |
-
* Added: Links to [MailChimp for WordPress Pro](http://dannyvankooten.com/mailchimp-for-wordpress/)
|
411 |
-
* Fixed: Bug where options could not be saved after adding specific HTML tags to the form mark-up.
|
412 |
-
|
413 |
-
= 0.8.2 =
|
414 |
-
* Improved: Namespaced form CSS classes
|
415 |
-
* Improved: Improved error messages
|
416 |
-
* Improved: It is now easier to add fields to your form mark-up by using the wizard. You can choose presets etc.
|
417 |
-
* Improved: All field names that are of importance for MailChimp should now be uppercased (backwards compatibility is included)
|
418 |
-
* Improved: Fields named added through the wizard are now validated and sanitized
|
419 |
-
* Improved: Added caching to the backend which makes it way faster
|
420 |
-
* Improved: Various usability improvements
|
421 |
-
|
422 |
-
= 0.8.1 =
|
423 |
-
* Fixed: typo in form success message
|
424 |
-
* Improved: various little improvements
|
425 |
-
* Added: option to hide the form after a successful sign-up
|
426 |
-
|
427 |
-
= 0.8 =
|
428 |
-
* Changed links to show your appreciation for this plugin.
|
429 |
-
* Improved: CSS reset now works for registration forms as well.
|
430 |
-
* Improved: Code, removed unnecessary code, only load classes when not existing yet, etc.
|
431 |
-
* Improved: hooked into user_register to allow third-party registration form plugins.
|
432 |
-
* Added: Shortcode for usage inside Contact Form 7 form templates `[mc4wp_checkbox]`
|
433 |
-
* Added: Catch-all, hook into ANY form using ANY input field with name attribute `mc4wp-try-subscribe` and value `1`.
|
434 |
-
* Fixed: Subscribe from Multisite sign-up
|
435 |
-
* Fixed: 404 page when no e-mail given.
|
436 |
-
|
437 |
-
|
438 |
-
= 0.7 =
|
439 |
-
* Improved: small backend JavaScript improvements / fixes
|
440 |
-
* Improved: configuration tabs on options page now work with JavaScript disabled as well
|
441 |
-
* Added: form and checkbox can now subscribe to different lists
|
442 |
-
* Added: Error messages for WP Administrators (for debugging)
|
443 |
-
* Added: `mc4wp_checkbox()` function to manually add the checkbox to a comment form.
|
444 |
-
|
445 |
-
= 0.6.2 =
|
446 |
-
* Fixed: Double quotes now enabled in text labels and success / error messages (which enables the use of JavaScript)
|
447 |
-
* Fixed: Sign-up form failing silently without showing error.
|
448 |
-
|
449 |
-
= 0.6.1 =
|
450 |
-
* Fixed: error notices
|
451 |
-
* Added: some default CSS for success and error notices
|
452 |
-
* Added: notice when form mark-up does not contain email field
|
453 |
-
|
454 |
-
= 0.6 =
|
455 |
-
* Fixed: cannot redeclare class MCAPI
|
456 |
-
* Fixed: scroll to form element
|
457 |
-
* Added: notice when copying the form mark-up instead of using `[mc4wp_form]`
|
458 |
-
* Added: CSS classes to form success and error message(s).
|
459 |
-
* Removed: Static element ID on form success and error message(s) for W3C validity when more than one form on 1 page.
|
460 |
-
|
461 |
-
= 0.5 =
|
462 |
-
* Fixed W3C invalid value "true" for attribute "required"
|
463 |
-
* Added scroll to form element after form submit.
|
464 |
-
* Added option to redirect visitors after they subscribed using the sign-up form.
|
465 |
-
|
466 |
-
= 0.4.1 =
|
467 |
-
* Fixed correct and more specific error messages
|
468 |
-
* Fixed form designer, hidden fields no longer wrapped in paragraph tags
|
469 |
-
* Added text fields to form designer
|
470 |
-
* Added error message when email address was already on the list
|
471 |
-
* Added debug message when there is a problem with one of the (required) merge fields
|
472 |
-
|
473 |
-
= 0.4 =
|
474 |
-
* Improved dashboard, it now has different tabs for the different settings.
|
475 |
-
* Improved guessing of first and last name.
|
476 |
-
* Fixed debugging statements on settings page
|
477 |
-
* Added settings link on plugins overview page
|
478 |
-
* Added form functionality
|
479 |
-
* Added form shortcode
|
480 |
-
* Added necessary filters for shortcodes to work inside text widgets
|
481 |
-
* Added spam honeypot to form to ignore bot sign-ups
|
482 |
-
* Added error & success messages to form
|
483 |
-
* Added Freddy icon to menu
|
484 |
-
|
485 |
-
= 0.3 =
|
486 |
-
* Fixed the missing argument bug when submitting a comment for some users.
|
487 |
-
* Added support for regular, BuddyPress and MultiSite registration forms.
|
488 |
-
|
489 |
-
= 0.2 =
|
490 |
-
* Fixed small bug where name of comment author was not correctly assigned
|
491 |
-
* Improved CSS reset for checkbox
|
492 |
-
|
493 |
-
= 0.1 =
|
494 |
-
* BETA release
|
495 |
-
|
496 |
== Upgrade Notice ==
|
497 |
|
498 |
-
=
|
499 |
-
|
500 |
-
|
501 |
-
= 1.5.7 =
|
502 |
-
Minor improvements and small bug fixes.
|
503 |
-
|
504 |
-
= 1.5.5 =
|
505 |
-
Fixed field generator only generating `text` input fields.
|
506 |
-
|
507 |
-
= 1.5.4 =
|
508 |
-
Fixed admin notice and "add to form" button, improved Contact Form 7 integration.
|
509 |
-
|
510 |
-
= 1.5.3 =
|
511 |
-
Fixed admin notice and improved Contact Form 7 integration.
|
512 |
-
|
513 |
-
= 1.4.8 =
|
514 |
-
WP 3.8 compatibility, better scroll to form and huge settings page performance improvement
|
515 |
-
|
516 |
-
= 1.4.5 =
|
517 |
-
Bugfix: fixed invalid email address message after updating to 1.4.4
|
518 |
-
|
519 |
-
= 1.4.1 =
|
520 |
-
Fixed grouping information not being sent to MailChimp when using sign-up forms.
|
521 |
-
|
522 |
-
= 1.4 =
|
523 |
-
New: default form themes, more unlocked fields in the "add field" tool and smarter auto-detection of name fields when integrating with Contact Form 7.
|
524 |
-
|
525 |
-
= 1.2.5 =
|
526 |
-
Fixed CSS issue where the form caused a hue gap in the sidebar for some themes.
|
527 |
-
|
528 |
-
= 1.1.1 =
|
529 |
-
Bugfix for BuddyPress sites
|
530 |
-
|
3 |
Donate link: http://dannyvankooten.com/donate/
|
4 |
Tags: mailchimp,form,shortcode,widget,checkbox,comment,newsletter,buddypress,multisite,bbpress,woocommerce,easy digital downloads,contact form,contact form 7
|
5 |
Requires at least: 3.1
|
6 |
+
Tested up to: 3.9
|
7 |
+
Stable tag: 2.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
27 |
**MailChimp for WordPress, at a glance..**
|
28 |
|
29 |
- Simple. All you need is your MailChimp API key.
|
30 |
+
- Customizable. Have the form fields generated for you or use your own mark-up.
|
31 |
+
- Beautiful. Choose one of the default form themes or use your own styles.
|
32 |
- Developer friendly.
|
33 |
|
34 |
[Installation](http://wordpress.org/plugins/mailchimp-for-wp/installation/) | [Frequently Asked Questions](http://wordpress.org/plugins/mailchimp-for-wp/faq/) | [Screenshots](http://wordpress.org/plugins/mailchimp-for-wp/screenshots/)
|
80 |
>
|
81 |
> 1. Multiple forms, each subscribing to one or multiple MailChimp list(s).
|
82 |
> 1. AJAX - no page reload after submitting a sign-up form.
|
83 |
+
> 1. Custom color themes and a form designer (CSS Builder)
|
84 |
+
> 1. Statistics & log. Learn when, where and how your visitors subscribed.
|
85 |
>
|
86 |
> [More Pro features](http://dannyvankooten.com/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-link) | [Demo](http://dannyvankooten.com/mailchimp-for-wordpress/demo/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-link)
|
87 |
|
125 |
|
126 |
Add your custom CSS rules to the end of your theme stylesheet, **/wp-content/themes/your-theme-name/style.css**. Do not add them to the plugin stylesheet as they will be automatically overwritten on the next plugin update.
|
127 |
|
128 |
+
[PS: With the Pro version, you can design beautiful forms easily >>](http://dannyvankooten.com/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=after-css-link)
|
129 |
|
130 |
= Where can I find my MailChimp API key? =
|
131 |
[Here](http://kb.mailchimp.com/article/where-can-i-find-my-api-key)
|
145 |
`
|
146 |
|
147 |
= Can I add a checkbox to third-party forms? =
|
148 |
+
Yes. Just include a checkbox with name attribute `mc4wp-subscribe` and value `1` in your form.
|
149 |
|
150 |
*Example HTML*
|
151 |
`
|
152 |
+
<label><input type="checkbox" name="mc4wp-subscribe" value="1" /> Subscribe to our newsletter?</label>
|
153 |
`
|
154 |
|
155 |
If you need to send more data to your MailChimp list, prefix the name attribute with `mc4wp-`.
|
179 |
= Can I add more (hidden) fields to the sign-up checkbox? =
|
180 |
Not at the moment, but you can add more data using a filter. Here is a code snippet to [add grouping information to comment form sign-ups](https://gist.github.com/dannyvankooten/7120559).
|
181 |
|
182 |
+
= How do I add a Captcha to my forms? =
|
183 |
+
Install the [BWS Captcha](https://wordpress.org/plugins/captcha/) plugin, then use `[captcha]` inside your form mark-up.
|
184 |
+
|
185 |
= Why does the checkbox not show up at my comment form? =
|
186 |
Your theme probably does not support the necessary comment hook this plugin uses to add the checkbox to your comment form. You can manually place the checkbox by placing the following code snippet inside the form tags of your theme's comment form.
|
187 |
|
202 |
|
203 |
== Changelog ==
|
204 |
|
205 |
+
= 2.0 - April 29, 2014 =
|
206 |
+
|
207 |
+
**Improvements**
|
208 |
+
|
209 |
+
- CSS is now served as static CSS instead of being served through PHP.
|
210 |
+
- The anti-spam honeypot is now added to the sign-up checkbox as well.
|
211 |
+
- Improved object-oriented code architecture and better class documentation
|
212 |
+
- Better CSS reset for the various form themes to increase theme compatibility
|
213 |
+
- Added class autoloading to the plugin
|
214 |
+
- Various minor code improvements
|
215 |
+
|
216 |
+
**Additions**
|
217 |
+
|
218 |
+
- You can now add a captcha field to your sign-up forms by installing the [BWS Captcha](http://wordpress.org/plugins/captcha/) plugin and using `[captcha]` inside your form mark-up.
|
219 |
+
- All settings pages are now fully translatable. The plugin has just 2 translations available yet (`en_US` and `nl_NL`) so if you're good at translating, please send me your language pack for the plugin.
|
220 |
+
- You can now use tab indentation in the form markup textarea
|
221 |
+
|
222 |
= 1.5.8 - March 26, 2014 =
|
223 |
|
224 |
**Fixes**
|
374 |
* Improved: usability and responsiveness of form settings page
|
375 |
* Improved: clean-up
|
376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
== Upgrade Notice ==
|
378 |
|
379 |
+
= 2.0 =
|
380 |
+
Support for Captcha's, translated settings pages, improved CSS serving and various code improvements.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|