Contact Form7 Widget For Elementor Page Builder - Version 1.1.8

Version Description

  • Fix: Fatal error if folder renmaned / site migration is done
  • Fix: Compatiblity with latest WordPress version
  • Fix: Compatiblity with latest Elementor & Elementor pro
Download this release

Release Info

Developer voidcoders
Plugin Icon 128x128 Contact Form7 Widget For Elementor Page Builder
Version 1.1.8
Comparing to
See all releases

Code changes from version 1.1.7 to 1.1.8

assets/elemailer-promotion-2021.png ADDED
Binary file
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: voidthemes,voidcoders,soyket,shawon786
3
  Tags: page-builder, elementor, cf7, contact-form-7, contact-form-7 widget, widget, elementor add on, email, contact, form
4
  Requires at least: 4.4
5
- Tested up to: 5.8
6
- Stable tag: 1.1.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -28,8 +28,11 @@ For more details :[VOID CF7 Elementor Widget](https://voidcoders.com/product/con
28
  For our other elementor & WP works visit : [VOID CODERS](https://voidcoders.com).
29
 
30
  For updates follow us on : [Facebook](https://www.facebook.com/voidcoders).
 
31
 
32
  New updates ( Edit/Add contact from inside Elementor )
 
 
33
  [youtube https://youtu.be/ZI0GMJoESaw]
34
 
35
  Latest Version Preview
@@ -75,6 +78,10 @@ Our Contact Form7 Widget For Elementor Page Builder adds a new section in the el
75
  Update the plugin either via wp dashboard or via FTP. After update make sure you clear your browser cache.
76
 
77
  == Changelog ==
 
 
 
 
78
  = 1.1.7 =
79
  * Fix: Elementor compatiability added.
80
  * New: Added opt-in system for sending updates if needed
@@ -110,4 +117,4 @@ Update the plugin either via wp dashboard or via FTP. After update make sure you
110
  = 1.0.1 =
111
  * Custom CSS Adding option
112
  = 1.0.0 =
113
- * Initial Launch
2
  Contributors: voidthemes,voidcoders,soyket,shawon786
3
  Tags: page-builder, elementor, cf7, contact-form-7, contact-form-7 widget, widget, elementor add on, email, contact, form
4
  Requires at least: 4.4
5
+ Tested up to: 5.8.2
6
+ Stable tag: 1.1.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
28
  For our other elementor & WP works visit : [VOID CODERS](https://voidcoders.com).
29
 
30
  For updates follow us on : [Facebook](https://www.facebook.com/voidcoders).
31
+ <h3>Need to design Contact form 7 Emails with Elementor? </h3> 👉[Check Elemailer - A drag & drop email builder for WordPress](https://elemailer.com?utm_source=void-cf7-repo&utm_medium=wordpressrepo&utm_id=cf7-org).
32
 
33
  New updates ( Edit/Add contact from inside Elementor )
34
+
35
+
36
  [youtube https://youtu.be/ZI0GMJoESaw]
37
 
38
  Latest Version Preview
78
  Update the plugin either via wp dashboard or via FTP. After update make sure you clear your browser cache.
79
 
80
  == Changelog ==
81
+ = 1.1.8 =
82
+ * Fix: Fatal error if folder renmaned / site migration is done
83
+ * Fix: Compatiblity with latest WordPress version
84
+ * Fix: Compatiblity with latest Elementor & Elementor pro
85
  = 1.1.7 =
86
  * Fix: Elementor compatiability added.
87
  * New: Added opt-in system for sending updates if needed
117
  = 1.0.1 =
118
  * Custom CSS Adding option
119
  = 1.0.0 =
120
+ * Initial Release
void-cf7-widget-elementor.php CHANGED
@@ -3,13 +3,13 @@
3
  /**
4
  * Plugin Name: Void Contact Form 7 Widget For Elementor Page Builder
5
  * Description: Adds Contact Form 7 widget element to Elementor page builder for easy drag & drop the created contact forms with Contact Form 7
6
- * Version: 1.1.7
7
  * Author: voidCoders
8
  * Plugin URI: https://voidcoders.com/product/contact-form7-widget-for-elementor-free/
9
  * Author URI: https://voidcoders.com
10
  * Text Domain: void
11
- * Elementor tested up to: 3.3.0
12
- * Elementor Pro tested up to: 3.3.2
13
  */
14
 
15
  use Account\AccountDataFactory;
@@ -31,7 +31,7 @@ function void_cf7_widget()
31
  }
32
 
33
  // Check version required
34
- $elementor_version_required = '2.8.5';
35
  if (!version_compare(ELEMENTOR_VERSION, $elementor_version_required, '>=')) {
36
  return;
37
  }
@@ -144,6 +144,12 @@ function void_cf7_check_installation_time()
144
  add_action('admin_notices', 'void_cf7_display_admin_notice');
145
  }
146
  }
 
 
 
 
 
 
147
  }
148
  add_action('admin_init', 'void_cf7_check_installation_time');
149
 
@@ -156,22 +162,58 @@ function void_cf7_display_admin_notice()
156
  global $pagenow;
157
  if ($pagenow == 'index.php') {
158
 
159
- $dont_disturb = esc_url(get_admin_url() . '?spare_me2=1');
160
- $plugin_info = get_plugin_data(__FILE__, true, true);
161
- $reviewurl = esc_url('https://wordpress.org/support/plugin/cf7-widget-elementor/reviews/#new-post');
162
- $void_url = esc_url('https://voidcoders.com/shop/');
163
 
164
  printf(__('<div class="void-cf7-review wrap">You have been using <b> %s </b> for a while. We hope you liked it ! Please give us a quick rating, it works as a boost for us to keep working on the plugin ! Also you can visit our <a href="%s" target="_blank">site</a> to get more themes & Plugins<div class="void-cf7-review-btn"><a href="%s" class="button button-primary" target=
165
  "_blank">Rate Now!</a><a href="%s" class="void-cf7-review-done"> Already Done !</a></div></div>', $plugin_info['TextDomain']), $plugin_info['Name'], $void_url, $reviewurl, $dont_disturb);
166
  }
167
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  // remove the notice for the user if review already done or if the user does not want to
169
  function void_cf7_spare_me()
170
  {
171
  if (isset($_GET['spare_me2']) && !empty($_GET['spare_me2'])) {
172
  $spare_me = $_GET['spare_me2'];
173
  if ($spare_me == 1) {
174
- add_option('void_cf7_spare_me', TRUE);
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  }
176
  }
177
  }
@@ -205,6 +247,8 @@ function void_cf7_opt_in_user_data_track()
205
  $account_data_factory = AccountDataFactory::instance();
206
  // get account data by using datafactory object
207
  $account_data = $account_data_factory->getAccountDataByBasePath(plugin_basename( __FILE__ ));
 
 
208
  // account has private property
209
  // so, use this object to get those by it's public method
210
  $opted_in = $account_data->isOptedIn();
3
  /**
4
  * Plugin Name: Void Contact Form 7 Widget For Elementor Page Builder
5
  * Description: Adds Contact Form 7 widget element to Elementor page builder for easy drag & drop the created contact forms with Contact Form 7
6
+ * Version: 1.1.8
7
  * Author: voidCoders
8
  * Plugin URI: https://voidcoders.com/product/contact-form7-widget-for-elementor-free/
9
  * Author URI: https://voidcoders.com
10
  * Text Domain: void
11
+ * Elementor tested up to: 3.5
12
+ * Elementor Pro tested up to: 3.6
13
  */
14
 
15
  use Account\AccountDataFactory;
31
  }
32
 
33
  // Check version required
34
+ $elementor_version_required = '3.0';
35
  if (!version_compare(ELEMENTOR_VERSION, $elementor_version_required, '>=')) {
36
  return;
37
  }
144
  add_action('admin_notices', 'void_cf7_display_admin_notice');
145
  }
146
  }
147
+
148
+ if ( 'yes' !== get_option( 'void_cf7_elep_2021_never' ) ) {
149
+ if ( strtotime( '-3 days' ) >= get_option( 'void_cf7_elep_2021_temporary_time', strtotime( '-3 days' ) ) ) {
150
+ add_action( 'admin_notices', 'void_cf7_promotion_2021_admin_notice' );
151
+ }
152
+ }
153
  }
154
  add_action('admin_init', 'void_cf7_check_installation_time');
155
 
162
  global $pagenow;
163
  if ($pagenow == 'index.php') {
164
 
165
+ $dont_disturb = esc_url( get_admin_url() . '?spare_me2=1' );
166
+ $plugin_info = get_plugin_data( __FILE__, true, true );
167
+ $reviewurl = esc_url( 'https://wordpress.org/support/plugin/cf7-widget-elementor/reviews/#new-post' );
168
+ $void_url = esc_url( 'https://voidcoders.com/shop/' );
169
 
170
  printf(__('<div class="void-cf7-review wrap">You have been using <b> %s </b> for a while. We hope you liked it ! Please give us a quick rating, it works as a boost for us to keep working on the plugin ! Also you can visit our <a href="%s" target="_blank">site</a> to get more themes & Plugins<div class="void-cf7-review-btn"><a href="%s" class="button button-primary" target=
171
  "_blank">Rate Now!</a><a href="%s" class="void-cf7-review-done"> Already Done !</a></div></div>', $plugin_info['TextDomain']), $plugin_info['Name'], $void_url, $reviewurl, $dont_disturb);
172
  }
173
  }
174
+
175
+ /**
176
+ * Display Admin Notice, for elemailer promotion 2021
177
+ */
178
+ function void_cf7_promotion_2021_admin_notice()
179
+ {
180
+ $temporary_hide = esc_url( get_admin_url() . '?void_cf7_elep_2021_temporary=1' );
181
+ $dont_disturb = esc_url( get_admin_url() . '?void_cf7_elep_2021_never=1' );
182
+ $elemailer_link = esc_url( 'https://elemailer.com/promotions/black-friday-cyber-monday-discount-2021/?utm_source=void-cf7-dashboard&utm_medium=wpdashboard&utm_campaign=cybermonday&utm_id=cf7-cm-2021' );
183
+ $banner_url = CF7_WIDGET_E_PLUGIN_URL . '/assets/elemailer-promotion-2021.png';
184
+ ?>
185
+ <div class="notice" style="border: none; padding: 0px; position: relative;">
186
+ <a style="display:flex;" href="<?php echo $elemailer_link; ?>" target="_blank">
187
+ <img src="<?php echo esc_attr( $banner_url ); ?>" alt="elemailer-promotion-2021" style="width: 100%;">
188
+ </a>
189
+ <a href="<?php echo $temporary_hide; ?>">
190
+ <button type="button" class="notice-dismiss"><span class="screen-reader-text"> <?php esc_html_e( 'Dismiss this notice.', 'void' ); ?></span></button>
191
+ </a>
192
+ <a href="<?php echo $dont_disturb; ?>"><span class="void-cf7-elemailer-promotion-never-show" style="position: absolute; right: 10px; bottom: 10px; color: #696969a8;"><?php esc_html_e( 'Never show', 'void' ) ?></span></a>
193
+ </div>
194
+ <?php
195
+ }
196
+
197
  // remove the notice for the user if review already done or if the user does not want to
198
  function void_cf7_spare_me()
199
  {
200
  if (isset($_GET['spare_me2']) && !empty($_GET['spare_me2'])) {
201
  $spare_me = $_GET['spare_me2'];
202
  if ($spare_me == 1) {
203
+ update_option( 'void_cf7_spare_me', TRUE);
204
+ }
205
+ }
206
+
207
+ if ( isset( $_GET['void_cf7_elep_2021_temporary'] ) && ! empty( $_GET['void_cf7_elep_2021_temporary'] ) ) {
208
+ if ( 1 === absint( $_GET['void_cf7_elep_2021_temporary'] ) ) {
209
+ update_option( 'void_cf7_elep_2021_temporary', 'yes' );
210
+ update_option( 'void_cf7_elep_2021_temporary_time', strtotime("now") );
211
+ }
212
+ }
213
+
214
+ if ( isset( $_GET['void_cf7_elep_2021_never'] ) && ! empty( $_GET['void_cf7_elep_2021_never'] ) ) {
215
+ if ( 1 === absint( $_GET['void_cf7_elep_2021_never'] ) ) {
216
+ update_option( 'void_cf7_elep_2021_never', 'yes' );
217
  }
218
  }
219
  }
247
  $account_data_factory = AccountDataFactory::instance();
248
  // get account data by using datafactory object
249
  $account_data = $account_data_factory->getAccountDataByBasePath(plugin_basename( __FILE__ ));
250
+ // retrun if account data is not present for this folder
251
+ if(!isset($account_data)){ return; }
252
  // account has private property
253
  // so, use this object to get those by it's public method
254
  $opted_in = $account_data->isOptedIn();