SendinBlue Subscribe Form And WP SMTP - Version 3.1.49

Version Description

  • Weve fixed the behaviour of the country flag attached to the SMS number field.
Download this release

Release Info

Developer gouravgupta24
Plugin Icon 128x128 SendinBlue Subscribe Form And WP SMTP
Version 3.1.49
Comparing to
See all releases

Code changes from version 3.1.48 to 3.1.49

Files changed (3) hide show
  1. inc/SendinblueApiClient.php +1 -1
  2. readme.txt +5 -1
  3. sendinblue.php +25 -1
inc/SendinblueApiClient.php CHANGED
@@ -14,7 +14,7 @@ class SendinblueApiClient
14
  const RESPONSE_CODE_CREATED = 201;
15
  const RESPONSE_CODE_ACCEPTED = 202;
16
  const RESPONSE_CODE_UNAUTHORIZED = 401;
17
- const PLUGIN_VERSION = '3.1.48';
18
  const USER_AGENT = 'sendinblue_plugins/wordpress';
19
 
20
  private $apiKey;
14
  const RESPONSE_CODE_CREATED = 201;
15
  const RESPONSE_CODE_ACCEPTED = 202;
16
  const RESPONSE_CODE_UNAUTHORIZED = 401;
17
+ const PLUGIN_VERSION = '3.1.49';
18
  const USER_AGENT = 'sendinblue_plugins/wordpress';
19
 
20
  private $apiKey;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: Email Marketing, Newsletter, Sendinblue, Forms, smtp, marketing automation
4
  Requires at least: 4.4
5
  Tested up to: 6.0.2
6
  Requires PHP: 5.6
7
- Stable tag: 3.1.48
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -116,6 +116,10 @@ In order to create a signup form, you need to:
116
 
117
  == Changelog ==
118
 
 
 
 
 
119
  = 3.1.48 =
120
  * An additional header is added for the technical improvement in the log tracking.
121
  * Enhanced the plugin to be compatible with WordPress version 6.0.2.
4
  Requires at least: 4.4
5
  Tested up to: 6.0.2
6
  Requires PHP: 5.6
7
+ Stable tag: 3.1.49
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
116
 
117
  == Changelog ==
118
 
119
+
120
+ = 3.1.49 =
121
+ * We’ve fixed the behaviour of the country flag attached to the SMS number field.
122
+
123
  = 3.1.48 =
124
  * An additional header is added for the technical improvement in the log tracking.
125
  * Enhanced the plugin to be compatible with WordPress version 6.0.2.
sendinblue.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue
4
  * Plugin URI: https://www.sendinblue.com/?r=wporg
5
  * Description: Manage your contact lists, subscription forms and all email and marketing-related topics from your wp panel, within one single plugin
6
- * Version: 3.1.48
7
  * Author: Sendinblue
8
  * Author URI: https://www.sendinblue.com/?r=wporg
9
  * License: GPLv2 or later
@@ -714,6 +714,30 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
714
  $formData['html']
715
  );
716
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
717
 
718
  echo wp_kses($formData['html'], SIB_Manager::wordpress_allowed_attributes());
719
  ?>
3
  * Plugin Name: Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue
4
  * Plugin URI: https://www.sendinblue.com/?r=wporg
5
  * Description: Manage your contact lists, subscription forms and all email and marketing-related topics from your wp panel, within one single plugin
6
+ * Version: 3.1.49
7
  * Author: Sendinblue
8
  * Author URI: https://www.sendinblue.com/?r=wporg
9
  * License: GPLv2 or later
714
  $formData['html']
715
  );
716
  }
717
+ //Flag update according to country code
718
+ if (str_contains($formData['html'], 'class="sib-sms-field"')) {
719
+ $sms_manager = new SIB_SMS_Code();
720
+ $country_list = $sms_manager->get_sms_code_list();
721
+
722
+ $stripStartPoint = strpos($formData['html'], '"sib-sms"');
723
+ $startPoint = $stripStartPoint + 18;
724
+ $endPoint = $startPoint + 1;
725
+ $stripData = substr($formData['html'], $startPoint, $endPoint);
726
+
727
+ $countryCodeString = explode('"', $stripData);
728
+ $countryCode = $countryCodeString[0];
729
+ foreach ($country_list as $item => $value) {
730
+ $checkCountryCode = $value['code'];
731
+ if ($checkCountryCode == $countryCode) {
732
+ $flg_url = plugins_url('img/flags/', __FILE__) . strtolower($item) . '.png';
733
+ $formData['html'] = str_replace(
734
+ 'class="sib-cflags"',
735
+ 'class="sib-cflags" id="' . $frmID . '" style="background-image: url(' . $flg_url . ');"',
736
+ $formData['html']
737
+ );
738
+ }
739
+ }
740
+ }
741
 
742
  echo wp_kses($formData['html'], SIB_Manager::wordpress_allowed_attributes());
743
  ?>