Version Description
- Some Improvements
Download this release
Release Info
Developer | neeraj_slit |
Plugin | SendinBlue Subscribe Form And WP SMTP |
Version | 3.0.4 |
Comparing to | |
See all releases |
Code changes from version 3.0.3 to 3.0.4
- readme.txt +4 -1
- sendinblue.php +15 -5
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: neeraj_slit
|
3 |
Tags: sendinblue, marketing automation, email marketing, email campaign, newsletter, wordpress smtp, subscription form, phpmailer, SMTP, wp_mail, massive email, sendmail, ssl, tls, wp-phpmailer, mail smtp, mailchimp, newsletters, email plugin, signup form, email widget, widget, plugin, sidebar, shortcode
|
4 |
Requires at least: 4.4
|
5 |
-
Tested up to: 5.
|
6 |
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -112,6 +112,9 @@ In order to create a signup form, you need to:
|
|
112 |
2. Integrate the form in a sidebar using a widget from WP panel > Appearance > Widgets. The Sendinblue widget form should appear in your widgets list, you just to have to drag and drop the widget into the sidebar of your choice.
|
113 |
|
114 |
== Changelog ==
|
|
|
|
|
|
|
115 |
= 3.0.3 =
|
116 |
* Bug fixes & improvements
|
117 |
|
2 |
Contributors: neeraj_slit
|
3 |
Tags: sendinblue, marketing automation, email marketing, email campaign, newsletter, wordpress smtp, subscription form, phpmailer, SMTP, wp_mail, massive email, sendmail, ssl, tls, wp-phpmailer, mail smtp, mailchimp, newsletters, email plugin, signup form, email widget, widget, plugin, sidebar, shortcode
|
4 |
Requires at least: 4.4
|
5 |
+
Tested up to: 5.5
|
6 |
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
112 |
2. Integrate the form in a sidebar using a widget from WP panel > Appearance > Widgets. The Sendinblue widget form should appear in your widgets list, you just to have to drag and drop the widget into the sidebar of your choice.
|
113 |
|
114 |
== Changelog ==
|
115 |
+
= 3.0.4 =
|
116 |
+
* Some Improvements
|
117 |
+
|
118 |
= 3.0.3 =
|
119 |
* Bug fixes & improvements
|
120 |
|
sendinblue.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Sendinblue Subscribe Form And WP SMTP
|
4 |
* Plugin URI: https://www.sendinblue.com/?r=wporg
|
5 |
* Description: Easily send emails from your WordPress blog using Sendinblue SMTP and easily add a subscribe form to your site
|
6 |
-
* Version: 3.0.
|
7 |
* Author: Sendinblue
|
8 |
* Author URI: https://www.sendinblue.com/?r=wporg
|
9 |
* License: GPLv2 or later
|
@@ -182,7 +182,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
182 |
SIB_Forms::add_prefix();
|
183 |
SIB_Forms::modify_datatype();
|
184 |
|
185 |
-
if ( self::
|
186 |
add_shortcode( 'sibwp_form', array( &$this, 'sibwp_form_shortcode' ) );
|
187 |
// register widget.
|
188 |
add_action( 'widgets_init', array( &$this, 'sib_create_widget' ) );
|
@@ -440,7 +440,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
440 |
/**
|
441 |
* Check that have done validation process already.
|
442 |
*/
|
443 |
-
static function is_done_validation() {
|
444 |
if (self::is_api_key_set()) {
|
445 |
$apiClient = new SendinblueApiClient();
|
446 |
$response = $apiClient->getAccount();
|
@@ -448,8 +448,9 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
448 |
return true;
|
449 |
}
|
450 |
|
451 |
-
if (
|
452 |
-
|
|
|
453 |
}
|
454 |
}
|
455 |
|
@@ -622,6 +623,15 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
622 |
}
|
623 |
$formData = SIB_Forms::getForm( $formID );
|
624 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
if ( '0' != $formData['gCaptcha'] ) {
|
626 |
if ( ! isset( $_POST['g-recaptcha-response'] ) || empty( $_POST['g-recaptcha-response'] ) ) {
|
627 |
wp_send_json(
|
3 |
* Plugin Name: Sendinblue Subscribe Form And WP SMTP
|
4 |
* Plugin URI: https://www.sendinblue.com/?r=wporg
|
5 |
* Description: Easily send emails from your WordPress blog using Sendinblue SMTP and easily add a subscribe form to your site
|
6 |
+
* Version: 3.0.4
|
7 |
* Author: Sendinblue
|
8 |
* Author URI: https://www.sendinblue.com/?r=wporg
|
9 |
* License: GPLv2 or later
|
182 |
SIB_Forms::add_prefix();
|
183 |
SIB_Forms::modify_datatype();
|
184 |
|
185 |
+
if ( self::is_api_key_set() ) {
|
186 |
add_shortcode( 'sibwp_form', array( &$this, 'sibwp_form_shortcode' ) );
|
187 |
// register widget.
|
188 |
add_action( 'widgets_init', array( &$this, 'sib_create_widget' ) );
|
440 |
/**
|
441 |
* Check that have done validation process already.
|
442 |
*/
|
443 |
+
static function is_done_validation($redirect = true) {
|
444 |
if (self::is_api_key_set()) {
|
445 |
$apiClient = new SendinblueApiClient();
|
446 |
$response = $apiClient->getAccount();
|
448 |
return true;
|
449 |
}
|
450 |
|
451 |
+
if ($redirect) {
|
452 |
+
delete_option(SIB_Manager::API_KEY_V3_OPTION_NAME);
|
453 |
+
wp_safe_redirect(add_query_arg('page', SIB_Page_Home::PAGE_ID, admin_url('admin.php')));
|
454 |
}
|
455 |
}
|
456 |
|
623 |
}
|
624 |
$formData = SIB_Forms::getForm( $formID );
|
625 |
|
626 |
+
if (!SIB_Manager::is_done_validation(false) || 0 == count($formData)) {
|
627 |
+
wp_send_json(
|
628 |
+
array(
|
629 |
+
'status' => 'failure',
|
630 |
+
'msg' => array("errorMsg" => "Something wrong occurred"),
|
631 |
+
)
|
632 |
+
);
|
633 |
+
}
|
634 |
+
|
635 |
if ( '0' != $formData['gCaptcha'] ) {
|
636 |
if ( ! isset( $_POST['g-recaptcha-response'] ) || empty( $_POST['g-recaptcha-response'] ) ) {
|
637 |
wp_send_json(
|