Optin Forms - Version 1.2.9.3

Version Description

( May 28th, 2019) = * MailerLite implementation

Download this release

Release Info

Developer wpkube
Plugin Icon 128x128 Optin Forms
Version 1.2.9.3
Comparing to
See all releases

Code changes from version 1.2.9.2 to 1.2.9.3

css/optinforms-admin.css CHANGED
@@ -45,7 +45,7 @@
45
  .optinforms-ad-product-button a {color: #fff!important; background: #FD5A22; padding: 9px 20px; border: 0; border-radius: 4px; font-size: 16px; font-weight: 700; cursor: pointer; width: 220px; text-align: center; text-transform: uppercase; -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ -moz-box-sizing: border-box; /* Firefox, other Gecko */ box-sizing: border-box;letter-spacing:1px;}
46
  .optinforms-ad-product-button a:hover {background: #505050; color:#fff!important;}
47
 
48
- #optinforms_email_solution_option1, #optinforms_email_solution_option2, #optinforms_email_solution_option3, #optinforms_email_solution_option4, #optinforms_email_solution_option5, #optinforms_email_solution_option6, #optinforms_email_solution_option7, #optinforms_form_design_option1, #optinforms_form_design_option2, #optinforms_form_design_option3, #optinforms_form_design_option4, #optinforms_form_design_option5, #optinforms_form_design_option6 {display:none;}
49
 
50
  #optinforms-slider-wrapper {margin: 0; width: 764px;}
51
  #optinforms-slider {position: relative; width: 680px; height: 175px; margin: 0; padding: 0; overflow: hidden; list-style:none; text-align:center;}
45
  .optinforms-ad-product-button a {color: #fff!important; background: #FD5A22; padding: 9px 20px; border: 0; border-radius: 4px; font-size: 16px; font-weight: 700; cursor: pointer; width: 220px; text-align: center; text-transform: uppercase; -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ -moz-box-sizing: border-box; /* Firefox, other Gecko */ box-sizing: border-box;letter-spacing:1px;}
46
  .optinforms-ad-product-button a:hover {background: #505050; color:#fff!important;}
47
 
48
+ #optinforms_email_solution_option1, #optinforms_email_solution_option2, #optinforms_email_solution_option3, #optinforms_email_solution_option4, #optinforms_email_solution_option5, #optinforms_email_solution_option6, #optinforms_email_solution_option7, #optinforms_email_solution_option8, #optinforms_form_design_option1, #optinforms_form_design_option2, #optinforms_form_design_option3, #optinforms_form_design_option4, #optinforms_form_design_option5, #optinforms_form_design_option6 {display:none;}
49
 
50
  #optinforms-slider-wrapper {margin: 0; width: 764px;}
51
  #optinforms-slider {position: relative; width: 680px; height: 175px; margin: 0; padding: 0; overflow: hidden; list-style:none; text-align:center;}
images/support-mailerlite-001.jpg ADDED
Binary file
images/support-mailerlite-002.jpg ADDED
Binary file
images/support-mailerlite-003.jpg ADDED
Binary file
images/support-mailerlite-004.jpg ADDED
Binary file
includes/functions.php CHANGED
@@ -4,6 +4,7 @@
4
  $optinforms_email_solution = get_option('optinforms_email_solution');
5
 
6
  $optinforms_form_action_mailchimp = get_option('optinforms_form_action_mailchimp');
 
7
  $optinforms_form_action_madmimi = get_option('optinforms_form_action_madmimi');
8
  $optinforms_form_action_interspire = get_option('optinforms_form_action_interspire');
9
 
@@ -119,10 +120,14 @@ function optinforms_get_form_action() {
119
  elseif($optinforms_email_solution == 'optinforms_email_solution_option6') {
120
  return optinforms_form_action_interspire();
121
  }
122
- // add Convertkit action
123
  elseif($optinforms_email_solution == 'optinforms_email_solution_option7') {
124
  return optinforms_form_action_convertkit();
125
  }
 
 
 
 
126
  }
127
 
128
  // Add our form action
@@ -189,6 +194,15 @@ function optinforms_form_action_icontact() {
189
  return 'https://app.icontact.com/icp/core/mycontacts/signup/designer/form/?id=' . $special_id . '&cid=' . $client_id . '&lid=' . $list_id;
190
  }
191
 
 
 
 
 
 
 
 
 
 
192
  // Convertkit form action
193
  function optinforms_form_action_convertkit() {
194
  return "https://app.convertkit.com/landing_pages/" . optinforms_form_id_convertkit() . "/subscribe";
@@ -365,6 +379,8 @@ function optinforms_get_form_identifiers() {
365
  return "<script src=\"https://app.convertkit.com/assets/CKJS4.js?v=21\"></script><input type=\"hidden\" name=\"id\" value=\"" . optinforms_form_id_convertkit() . "\" id=\"landing_page_id\" />
366
  <div class=\"ck_errorArea\"><div id=\"ck_error_msg\" style=\"display:none\"><p>" . optinforms_form_get_error_convertkit() . "</p></div></div>
367
  ";
 
 
368
  }
369
  }
370
 
@@ -398,9 +414,12 @@ function optinforms_get_name_field() {
398
  elseif($optinforms_email_solution == 'optinforms_email_solution_option6') {
399
  return "CustomFields[" . optinforms_form_name_field_interspire() . "]";
400
  }
401
- // define Convertkit name field
402
  elseif($optinforms_email_solution == 'optinforms_email_solution_option7') {
403
  return "first_name";
 
 
 
404
  }
405
  }
406
 
@@ -434,10 +453,14 @@ function optinforms_get_email_field() {
434
  elseif($optinforms_email_solution == 'optinforms_email_solution_option6') {
435
  return "email";
436
  }
437
- // define Convertkit email field
438
  elseif($optinforms_email_solution == 'optinforms_email_solution_option7') {
439
  return "email";
440
  }
 
 
 
 
441
  }
442
 
443
  // Define a form design
@@ -463,7 +486,7 @@ function optinforms_form_exclude_pages() {
463
 
464
  // Decide when our admin notices are loaded
465
  function optinforms_configuration() {
466
- global $optinforms_email_solution, $optinforms_form_list_name_aweber, $optinforms_form_listid_icontact, $optinforms_form_specialid_icontact, $optinforms_form_clientid_icontact, $optinforms_form_action_mailchimp, $optinforms_form_webformid_getresponse, $optinforms_form_action_madmimi, $optinforms_form_action_interspire, $optinforms_form_id_convertkit;
467
  if(($optinforms_email_solution == 'optinforms_email_solution_option1') && (empty($optinforms_form_list_name_aweber))) {
468
  echo optinforms_configuration_message();
469
  }
@@ -482,7 +505,10 @@ function optinforms_configuration() {
482
  elseif (($optinforms_email_solution == 'optinforms_email_solution_option6') && (empty($optinforms_form_action_interspire))) {
483
  echo optinforms_configuration_message();
484
  }
485
- elseif (($optinforms_email_solution == 'optinforms_email_solution_option7') && (empty($optinforms_form_id_convertkit))) {
 
 
 
486
  echo optinforms_configuration_message();
487
  }
488
  }
@@ -743,6 +769,9 @@ function optinforms_provider_sc() {
743
  } else if ( $optinforms_email_solution == 'optinforms_email_solution_option7' ) {
744
  $provider = 'ConvertKit';
745
  $privacy_url = 'https://convertkit.com/privacy/';
 
 
 
746
  }
747
 
748
  return $provider;
@@ -780,6 +809,9 @@ function optinforms_privacy_url_sc() {
780
  } else if ( $optinforms_email_solution == 'optinforms_email_solution_option7' ) {
781
  $provider = 'ConvertKit';
782
  $privacy_url = 'https://convertkit.com/privacy/';
 
 
 
783
  }
784
 
785
  return $privacy_url;
4
  $optinforms_email_solution = get_option('optinforms_email_solution');
5
 
6
  $optinforms_form_action_mailchimp = get_option('optinforms_form_action_mailchimp');
7
+ $optinforms_form_action_mailerlite = get_option('optinforms_form_action_mailerlite');
8
  $optinforms_form_action_madmimi = get_option('optinforms_form_action_madmimi');
9
  $optinforms_form_action_interspire = get_option('optinforms_form_action_interspire');
10
 
120
  elseif($optinforms_email_solution == 'optinforms_email_solution_option6') {
121
  return optinforms_form_action_interspire();
122
  }
123
+ // add Convertkit action
124
  elseif($optinforms_email_solution == 'optinforms_email_solution_option7') {
125
  return optinforms_form_action_convertkit();
126
  }
127
+ // add mailerlite
128
+ elseif($optinforms_email_solution == 'optinforms_email_solution_option8') {
129
+ return optinforms_form_action_mailerlite();
130
+ }
131
  }
132
 
133
  // Add our form action
194
  return 'https://app.icontact.com/icp/core/mycontacts/signup/designer/form/?id=' . $special_id . '&cid=' . $client_id . '&lid=' . $list_id;
195
  }
196
 
197
+ // Mailerlite form action
198
+ function optinforms_form_action_mailerlite() {
199
+ global $optinforms_form_action_mailerlite;
200
+ if(empty($optinforms_form_action_mailerlite)) {
201
+ $optinforms_form_action_mailerlite = "";
202
+ }
203
+ return $optinforms_form_action_mailerlite;
204
+ }
205
+
206
  // Convertkit form action
207
  function optinforms_form_action_convertkit() {
208
  return "https://app.convertkit.com/landing_pages/" . optinforms_form_id_convertkit() . "/subscribe";
379
  return "<script src=\"https://app.convertkit.com/assets/CKJS4.js?v=21\"></script><input type=\"hidden\" name=\"id\" value=\"" . optinforms_form_id_convertkit() . "\" id=\"landing_page_id\" />
380
  <div class=\"ck_errorArea\"><div id=\"ck_error_msg\" style=\"display:none\"><p>" . optinforms_form_get_error_convertkit() . "</p></div></div>
381
  ";
382
+ } elseif ( $optinforms_email_solution == 'optinforms_email_solution_option8' ) {
383
+ return '<input type="hidden" name="ml-submit" value="1">';
384
  }
385
  }
386
 
414
  elseif($optinforms_email_solution == 'optinforms_email_solution_option6') {
415
  return "CustomFields[" . optinforms_form_name_field_interspire() . "]";
416
  }
417
+ // define Convertkit name field
418
  elseif($optinforms_email_solution == 'optinforms_email_solution_option7') {
419
  return "first_name";
420
+ // MailerLite name field
421
+ } elseif($optinforms_email_solution == 'optinforms_email_solution_option8') {
422
+ return "fields[name]";
423
  }
424
  }
425
 
453
  elseif($optinforms_email_solution == 'optinforms_email_solution_option6') {
454
  return "email";
455
  }
456
+ // define Convertkit email field
457
  elseif($optinforms_email_solution == 'optinforms_email_solution_option7') {
458
  return "email";
459
  }
460
+ // define Mailerlite email field
461
+ elseif($optinforms_email_solution == 'optinforms_email_solution_option8') {
462
+ return 'fields[email]';
463
+ }
464
  }
465
 
466
  // Define a form design
486
 
487
  // Decide when our admin notices are loaded
488
  function optinforms_configuration() {
489
+ global $optinforms_email_solution, $optinforms_form_list_name_aweber, $optinforms_form_listid_icontact, $optinforms_form_specialid_icontact, $optinforms_form_clientid_icontact, $optinforms_form_action_mailchimp, $optinforms_form_action_mailerlite, $optinforms_form_webformid_getresponse, $optinforms_form_action_madmimi, $optinforms_form_action_interspire, $optinforms_form_id_convertkit;
490
  if(($optinforms_email_solution == 'optinforms_email_solution_option1') && (empty($optinforms_form_list_name_aweber))) {
491
  echo optinforms_configuration_message();
492
  }
505
  elseif (($optinforms_email_solution == 'optinforms_email_solution_option6') && (empty($optinforms_form_action_interspire))) {
506
  echo optinforms_configuration_message();
507
  }
508
+ elseif (($optinforms_email_solution == 'optinforms_email_solution_option7') && (empty($optinforms_form_id_convertkit))) {
509
+ echo optinforms_configuration_message();
510
+ }
511
+ elseif (($optinforms_email_solution == 'optinforms_email_solution_option8') && (empty($optinforms_form_action_mailerlite))) {
512
  echo optinforms_configuration_message();
513
  }
514
  }
769
  } else if ( $optinforms_email_solution == 'optinforms_email_solution_option7' ) {
770
  $provider = 'ConvertKit';
771
  $privacy_url = 'https://convertkit.com/privacy/';
772
+ } else if ( $optinforms_email_solution == 'optinforms_email_solution_option8' ) {
773
+ $provider = 'MailerLite';
774
+ $privacy_url = 'https://www.mailerlite.com/legal/privacy-policy';
775
  }
776
 
777
  return $provider;
809
  } else if ( $optinforms_email_solution == 'optinforms_email_solution_option7' ) {
810
  $provider = 'ConvertKit';
811
  $privacy_url = 'https://convertkit.com/privacy/';
812
+ } else if ( $optinforms_email_solution == 'optinforms_email_solution_option8' ) {
813
+ $provider = 'MailerLite';
814
+ $privacy_url = 'https://www.mailerlite.com/legal/privacy-policy';
815
  }
816
 
817
  return $privacy_url;
includes/options-email-solution.php CHANGED
@@ -13,6 +13,7 @@
13
  <option value="optinforms_email_solution_option5" <?php if (get_option('optinforms_email_solution')== 'optinforms_email_solution_option5') { echo 'selected="selected"'; } ?>>Mad Mimi</option>
14
  <option value="optinforms_email_solution_option6" <?php if (get_option('optinforms_email_solution')== 'optinforms_email_solution_option6') { echo 'selected="selected"'; } ?>>Interspire Email Marketer</option>
15
  <option value="optinforms_email_solution_option7" <?php if (get_option('optinforms_email_solution')== 'optinforms_email_solution_option7') { echo 'selected="selected"'; } ?>>ConvertKit</option>
 
16
  </select>
17
  <script type="text/javascript">
18
  document.getElementById('optinforms_email_solution').onchange = function() {
@@ -491,5 +492,41 @@
491
  </div><!--optinforms-explain-error-convertkit-->
492
 
493
  </div><!--optinforms_email_solution_option7-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
494
  </div><!--optiongroup-->
495
  <?php ?>
13
  <option value="optinforms_email_solution_option5" <?php if (get_option('optinforms_email_solution')== 'optinforms_email_solution_option5') { echo 'selected="selected"'; } ?>>Mad Mimi</option>
14
  <option value="optinforms_email_solution_option6" <?php if (get_option('optinforms_email_solution')== 'optinforms_email_solution_option6') { echo 'selected="selected"'; } ?>>Interspire Email Marketer</option>
15
  <option value="optinforms_email_solution_option7" <?php if (get_option('optinforms_email_solution')== 'optinforms_email_solution_option7') { echo 'selected="selected"'; } ?>>ConvertKit</option>
16
+ <option value="optinforms_email_solution_option8" <?php if (get_option('optinforms_email_solution')== 'optinforms_email_solution_option8') { echo 'selected="selected"'; } ?>>MailerLite</option>
17
  </select>
18
  <script type="text/javascript">
19
  document.getElementById('optinforms_email_solution').onchange = function() {
492
  </div><!--optinforms-explain-error-convertkit-->
493
 
494
  </div><!--optinforms_email_solution_option7-->
495
+
496
+ <div id="optinforms_email_solution_option8" <?php if (get_option('optinforms_email_solution')== 'optinforms_email_solution_option8') { echo 'style="display:block;"'; } ?>>
497
+ <div class="optiongroup">
498
+ <div class="optionleft">
499
+ <label><a onclick="optinforms_explain_mailerlite()"><span class="explain">?</span></a></label> <label for="optinforms_form_action_mailerlite" class="nopointer"><?php echo __('Form action URL', 'optin-forms'); ?> <span class="required">*</span></label>
500
+ </div><!--optionleft-->
501
+ <div class="optionmiddle">
502
+ <input type="text" id="optinforms_form_action_mailerlite" name="optinforms_form_action_mailerlite" value="<?php echo optinforms_form_action_mailerlite(); ?>" />
503
+ </div><!--optionmiddle-->
504
+ <div class="clear"></div>
505
+ </div><!--optiongroup-->
506
+
507
+ <script type="text/javascript">
508
+ function optinforms_explain_mailerlite() {
509
+ // Get the DOM reference
510
+ var contentId = document.getElementById("optinforms-explain-mailerlite");
511
+ // Toggle
512
+ contentId.style.display == "block" ? contentId.style.display = "none" :
513
+ contentId.style.display = "block";
514
+ }
515
+ </script>
516
+ <div id="optinforms-explain-mailerlite" style="display:none;">
517
+ <div class="optinforms-step">
518
+ <h4><?php echo __('How to find your form action URL', 'optin-forms'); ?></h4>
519
+ <p><span class="step">1</span> <?php echo __('Log in to your MailerLite account', 'optin-forms'); ?></p>
520
+ <img src="<?php echo plugins_url(); ?>/optin-forms/images/support-mailerlite-001.jpg" class="step-image" />
521
+ <p><span class="step">2</span> <?php echo __('Click on Forms &rarr; Embedded Forms &rarr; Get Embed Code', 'optin-forms'); ?></p>
522
+ <img src="<?php echo plugins_url(); ?>/optin-forms/images/support-mailerlite-002.jpg" class="step-image" />
523
+ <p><span class="step">3</span> <?php echo __('Select "HTML code" and find &lt;form... in the code section', 'optin-forms'); ?></p>
524
+ <img src="<?php echo plugins_url(); ?>/optin-forms/images/support-mailerlite-003.jpg" class="step-image" />
525
+ <p><span class="step">4</span> <?php echo __('Copy the URL inside of the action ( just the URL, not the quotes )', 'optin-forms'); ?></p>
526
+ <img src="<?php echo plugins_url(); ?>/optin-forms/images/support-mailerlite-004.jpg" class="step-image" />
527
+ </div><!--optinforms-step-->
528
+ </div><!--optinforms-explain-mailerlite-->
529
+ </div><!--optinforms_email_solution_option8-->
530
+
531
  </div><!--optiongroup-->
532
  <?php ?>
includes/register-settings.php CHANGED
@@ -29,6 +29,7 @@ function optinforms_register_settings()
29
  register_setting( 'optinforms-settings-group', 'optinforms_email_solution' );
30
  register_setting( 'optinforms-settings-group', 'optinforms_form_action' );
31
  register_setting( 'optinforms-settings-group', 'optinforms_form_action_mailchimp' );
 
32
  register_setting( 'optinforms-settings-group', 'optinforms_form_action_madmimi' );
33
  register_setting( 'optinforms-settings-group', 'optinforms_form_action_interspire' );
34
 
29
  register_setting( 'optinforms-settings-group', 'optinforms_email_solution' );
30
  register_setting( 'optinforms-settings-group', 'optinforms_form_action' );
31
  register_setting( 'optinforms-settings-group', 'optinforms_form_action_mailchimp' );
32
+ register_setting( 'optinforms-settings-group', 'optinforms_form_action_mailerlite' );
33
  register_setting( 'optinforms-settings-group', 'optinforms_form_action_madmimi' );
34
  register_setting( 'optinforms-settings-group', 'optinforms_form_action_interspire' );
35
 
optin-forms.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Optin Forms
4
  Plugin URI: http://fancythemes.com/plugins/optin-forms/
5
  Description: Create beautiful optin forms with ease. Choose a form design, customize it, and add your form to your blog with a simple mouse-click.
6
  Author: FancyThemes
7
- Version: 1.2.9.2
8
  Author URI: http://www.fancythemes.com
9
  Text Domain: optin-forms
10
  Domain Path: /languages/
@@ -116,8 +116,8 @@ class Optin_Forms {
116
  */
117
  public function optinforms_scripts() {
118
  wp_enqueue_script('jquery');
119
- wp_enqueue_style('optinforms-stylesheet', plugins_url('/css/optinforms.css', __FILE__ ), array(), '1.2.9.2' );
120
- wp_enqueue_script('placeholder', plugins_url('/js/placeholder.js', __FILE__ ), array(), '1.2.9.2');
121
  if ( optinforms_used_fonts() !== '//fonts.googleapis.com/css?family=' ) {
122
  wp_enqueue_style('optinforms-googleFont', optinforms_used_fonts());
123
  }
4
  Plugin URI: http://fancythemes.com/plugins/optin-forms/
5
  Description: Create beautiful optin forms with ease. Choose a form design, customize it, and add your form to your blog with a simple mouse-click.
6
  Author: FancyThemes
7
+ Version: 1.2.9.3
8
  Author URI: http://www.fancythemes.com
9
  Text Domain: optin-forms
10
  Domain Path: /languages/
116
  */
117
  public function optinforms_scripts() {
118
  wp_enqueue_script('jquery');
119
+ wp_enqueue_style('optinforms-stylesheet', plugins_url('/css/optinforms.css', __FILE__ ), array(), '1.2.9.3' );
120
+ wp_enqueue_script('placeholder', plugins_url('/js/placeholder.js', __FILE__ ), array(), '1.2.9.3');
121
  if ( optinforms_used_fonts() !== '//fonts.googleapis.com/css?family=' ) {
122
  wp_enqueue_style('optinforms-googleFont', optinforms_used_fonts());
123
  }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: wpkube, FancyThemes
3
  Tags: optin, form, forms, aweber, email subscriber, icontact, mailchimp, getresponse, mad mimi, newsletter, mailchimp forms, mailchimp integrations, mailchimp plugin, getresponse forms, subscribe, aweber forms, after post optin form, after post optin form plugin, lead generation, mobile optin forms, mobile optins, sidebar form, sidebar optin form, wordpress after post optin form, wordpress lead generation, wordpress popups, optin locker, social locker, enter email to download, interspire, email marketer, email marketing, email, e-mail, list, list building, opt-in, newsletter, email list, autoresponder, popup, pop-up, mailing, mailing list, mail, webform, newsletter plugin, optin plugin, opt-in plugin, conversion, design, convertkit, convert, kit
4
  Requires at least: 3.2
5
- Tested up to: 5.1
6
- Stable tag: 1.2.9.2
7
 
8
  Create beautiful optin forms with ease. Choose a form design, customize it, and add your form to your blog with a simple mouse-click.
9
 
@@ -22,6 +22,7 @@ Optin Forms works with the following email solutions:
22
  * MadMimi
23
  * Interspire Email Marketer
24
  * ConvertKit
 
25
 
26
  **Optin Forms Comes With 5 Beautiful Form Designs!**
27
 
@@ -58,7 +59,10 @@ Having trouble with the plugin? Simply post your question to the [support forum]
58
  3. Add your form to your website with a simple mouse-click.
59
 
60
  == Changelog ==
61
- = 1.2.9.1 =
 
 
 
62
  * Minor fixes
63
 
64
  = 1.2.9.1 =
2
  Contributors: wpkube, FancyThemes
3
  Tags: optin, form, forms, aweber, email subscriber, icontact, mailchimp, getresponse, mad mimi, newsletter, mailchimp forms, mailchimp integrations, mailchimp plugin, getresponse forms, subscribe, aweber forms, after post optin form, after post optin form plugin, lead generation, mobile optin forms, mobile optins, sidebar form, sidebar optin form, wordpress after post optin form, wordpress lead generation, wordpress popups, optin locker, social locker, enter email to download, interspire, email marketer, email marketing, email, e-mail, list, list building, opt-in, newsletter, email list, autoresponder, popup, pop-up, mailing, mailing list, mail, webform, newsletter plugin, optin plugin, opt-in plugin, conversion, design, convertkit, convert, kit
4
  Requires at least: 3.2
5
+ Tested up to: 5.2
6
+ Stable tag: 1.2.9.3
7
 
8
  Create beautiful optin forms with ease. Choose a form design, customize it, and add your form to your blog with a simple mouse-click.
9
 
22
  * MadMimi
23
  * Interspire Email Marketer
24
  * ConvertKit
25
+ * MailerLite
26
 
27
  **Optin Forms Comes With 5 Beautiful Form Designs!**
28
 
59
  3. Add your form to your website with a simple mouse-click.
60
 
61
  == Changelog ==
62
+ = 1.2.9.3 ( May 28th, 2019) =
63
+ * MailerLite implementation
64
+
65
+ = 1.2.9.2 =
66
  * Minor fixes
67
 
68
  = 1.2.9.1 =