Form Maker by WD – user-friendly drag & drop Form Builder plugin - Version 1.13.32

Version Description

  • Added: Dismissable notification about new offer by 10Web.
Download this release

Release Info

Developer 10web
Plugin Icon 128x128 Form Maker by WD – user-friendly drag & drop Form Builder plugin
Version 1.13.32
Comparing to
See all releases

Code changes from version 1.13.31 to 1.13.32

admin/controllers/Uninstall_fm.php CHANGED
@@ -26,7 +26,8 @@ class FMControllerUninstall_fm extends FMAdminController {
26
  global $fm_options;
27
  global $cfm_options;
28
  if ( !class_exists("TenWebNewLibConfig") ) {
29
- include_once(WDFMInstance(self::PLUGIN)->plugin_dir . "/wd/config.php");
 
30
  }
31
  $config = new TenWebNewLibConfig();
32
  $config->set_options(WDFMInstance(self::PLUGIN)->is_free == 1 ? $fm_options : $cfm_options);
26
  global $fm_options;
27
  global $cfm_options;
28
  if ( !class_exists("TenWebNewLibConfig") ) {
29
+ $plugin_dir = apply_filters('tenweb_new_free_users_lib_path', array('version' => '1.1.2', 'path' => WDFMInstance(self::PLUGIN)->plugin_dir));
30
+ include_once($plugin_dir['path'] . "/wd/config.php");
31
  }
32
  $config = new TenWebNewLibConfig();
33
  $config->set_options(WDFMInstance(self::PLUGIN)->is_free == 1 ? $fm_options : $cfm_options);
form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://10web.io/plugins/wordpress-form-maker/?utm_source=form_maker&utm_medium=free_plugin
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
- * Version: 1.13.31
7
  * Author: 10Web Form Builder Team
8
  * Author URI: https://10web.io/plugins/?utm_source=form_maker&utm_medium=free_plugin
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -98,8 +98,8 @@ final class WDFM {
98
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
99
  $this->front_urls = $this->get_front_urls();
100
  $this->main_file = plugin_basename(__FILE__);
101
- $this->plugin_version = '1.13.31';
102
- $this->db_version = '2.13.31';
103
  $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
104
  $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
105
  $this->menu_slug = 'manage' . $this->menu_postfix;
@@ -128,6 +128,7 @@ final class WDFM {
128
  * Add actions.
129
  */
130
  private function add_actions() {
 
131
  add_action('init', array($this, 'init'), 9);
132
  add_action('admin_menu', array( $this, 'form_maker_options_panel' ) );
133
 
@@ -421,6 +422,11 @@ final class WDFM {
421
  ob_start();
422
  $this->fm_overview();
423
 
 
 
 
 
 
424
  // Register fmemailverification post type
425
  $this->register_fmemailverification_cpt();
426
 
@@ -428,6 +434,10 @@ final class WDFM {
428
  $this->register_form_preview_cpt();
429
  }
430
 
 
 
 
 
431
  /**
432
  * Plugins loaded actions.
433
  */
@@ -1329,13 +1339,27 @@ final class WDFM {
1329
  }
1330
  }
1331
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1332
  /**
1333
  * Form maker overview.
1334
  */
1335
  public function fm_overview() {
1336
  if (is_admin() && !isset($_REQUEST['ajax'])) {
1337
  if (!class_exists("TenWebLibNew")) {
1338
- $plugin_dir = apply_filters('tenweb_free_users_lib_path', array('version' => '1.1.1', 'path' => $this->plugin_dir));
1339
  require_once($plugin_dir['path'] . '/wd/start.php');
1340
  }
1341
  global $fm_options;
@@ -1431,6 +1455,8 @@ final class WDFM {
1431
  "custom_post" => 'manage' . $this->menu_postfix,
1432
  "menu_position" => null,
1433
  "display_overview" => false,
 
 
1434
  );
1435
 
1436
  ten_web_new_lib_init($fm_options);
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://10web.io/plugins/wordpress-form-maker/?utm_source=form_maker&utm_medium=free_plugin
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
+ * Version: 1.13.32
7
  * Author: 10Web Form Builder Team
8
  * Author URI: https://10web.io/plugins/?utm_source=form_maker&utm_medium=free_plugin
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
98
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
99
  $this->front_urls = $this->get_front_urls();
100
  $this->main_file = plugin_basename(__FILE__);
101
+ $this->plugin_version = '1.13.32';
102
+ $this->db_version = '2.13.32';
103
  $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
104
  $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
105
  $this->menu_slug = 'manage' . $this->menu_postfix;
128
  * Add actions.
129
  */
130
  private function add_actions() {
131
+ add_action('init', array($this, 'init_free_users_lib'), 8);
132
  add_action('init', array($this, 'init'), 9);
133
  add_action('admin_menu', array( $this, 'form_maker_options_panel' ) );
134
 
422
  ob_start();
423
  $this->fm_overview();
424
 
425
+ $page = WDW_FM_Library(self::PLUGIN)->get('page');
426
+ if (($page != '') && (($page == 'manage' . $this->menu_postfix) || ($page == 'options' . $this->menu_postfix) || ($page == 'submissions' . $this->menu_postfix) || ($page == 'blocked_ips' . $this->menu_postfix) || ($page == 'themes' . $this->menu_postfix) || ($page == 'uninstall' . $this->menu_postfix))) {
427
+ $this->tenweb_speed();
428
+ }
429
+
430
  // Register fmemailverification post type
431
  $this->register_fmemailverification_cpt();
432
 
434
  $this->register_form_preview_cpt();
435
  }
436
 
437
+ public function tenweb_speed() {
438
+ do_action($this->handle_prefix . '_tenweb_speedOption_banner');
439
+ }
440
+
441
  /**
442
  * Plugins loaded actions.
443
  */
1339
  }
1340
  }
1341
 
1342
+ public function init_free_users_lib() {
1343
+ add_filter('tenweb_new_free_users_lib_path', array($this, 'tenweb_lib_path'));
1344
+ }
1345
+
1346
+ public function tenweb_lib_path($path) {
1347
+ // The version of WD Lib
1348
+ $version = '1.1.2';
1349
+ if (!isset($path['version']) || version_compare($path['version'], $version) === -1) {
1350
+ $path['version'] = $version;
1351
+ $path['path'] = $this->plugin_dir;
1352
+ }
1353
+ return $path;
1354
+ }
1355
+
1356
  /**
1357
  * Form maker overview.
1358
  */
1359
  public function fm_overview() {
1360
  if (is_admin() && !isset($_REQUEST['ajax'])) {
1361
  if (!class_exists("TenWebLibNew")) {
1362
+ $plugin_dir = apply_filters('tenweb_new_free_users_lib_path', array('version' => '1.1.2', 'path' => $this->plugin_dir));
1363
  require_once($plugin_dir['path'] . '/wd/start.php');
1364
  }
1365
  global $fm_options;
1455
  "custom_post" => 'manage' . $this->menu_postfix,
1456
  "menu_position" => null,
1457
  "display_overview" => false,
1458
+ "is_plugin_free" => $this->is_free,
1459
+ "utm_source" => "?utm_source=form_maker&utm_medium=free_plugin&utm_campaign=hosting_from_plugins",
1460
  );
1461
 
1462
  ten_web_new_lib_init($fm_options);
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,10web,wdsupport,formmakersupport
3
  Tags: form, forms, form builder, contact form, feedback, custom form, contact, web contact form, captcha, email, form manager, survey
4
  Requires at least: 4.6
5
  Tested up to: 5.4
6
- Stable tag: 1.13.31
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -562,6 +562,9 @@ Where **{{field_id}}** is the ID of the field you wish to prefill. Also, **{{par
562
 
563
  == Changelog ==
564
 
 
 
 
565
  = 1.13.31 =
566
  * Fixed: Bug on Google reCapthcha v3.
567
  * Fixed: Upload file broken link in post content (Post Generation extension).
3
  Tags: form, forms, form builder, contact form, feedback, custom form, contact, web contact form, captcha, email, form manager, survey
4
  Requires at least: 4.6
5
  Tested up to: 5.4
6
+ Stable tag: 1.13.32
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
562
 
563
  == Changelog ==
564
 
565
+ = 1.13.32 =
566
+ * Added: Dismissable notification about new offer by 10Web.
567
+
568
  = 1.13.31 =
569
  * Fixed: Bug on Google reCapthcha v3.
570
  * Fixed: Upload file broken link in post content (Post Generation extension).
wd/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Version: 1.1.1
2
 
3
 
4
  Usage:
1
+ Version: 1.1.2
2
 
3
 
4
  Usage:
wd/assets/css/img/close.png ADDED
Binary file
wd/assets/css/img/google_cloud.png ADDED
Binary file
wd/assets/css/img/optimizer_banner_1024.png ADDED
Binary file
wd/assets/css/img/optimizer_banner_1280.png ADDED
Binary file
wd/assets/css/img/optimizer_banner_1366.png ADDED
Binary file
wd/assets/css/img/optimizer_banner_1920.png ADDED
Binary file
wd/assets/css/img/optimizer_banner_768.png ADDED
Binary file
wd/assets/css/speedOptimizer_banner.css ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ img.google-cloud-mobile {
2
+ display: none;
3
+ }
4
+ img.google-cloud {
5
+ height: 38px;
6
+ }
7
+ .close-btn {
8
+ background-image: url(img/close.png);
9
+ background-repeat: no-repeat;
10
+ background-size: 14px;
11
+ display: inline-block;
12
+ width: 14px;
13
+ height: 14px;
14
+ position: absolute;
15
+ top: 20px;
16
+ right: 20px;
17
+ cursor: pointer;
18
+ }
19
+ .br-mobile {
20
+ display:none;
21
+ }
22
+ .free-plugins-banner-container {
23
+ position: relative;
24
+ font-family: Open Sans;
25
+ display: flex;
26
+ justify-content: space-between;
27
+ background-color: white;
28
+ box-shadow: 0px 5px 20px #E5E6E8CC;
29
+ border-radius: 15px;
30
+ height: 282px;
31
+ background-image: url(img/optimizer_banner_1920.png);
32
+ background-repeat: no-repeat;
33
+ padding-left: 410px;
34
+ margin: 40px 20px 20px 0;
35
+ }
36
+ .free-plugins-banner-container .banner-left-container {
37
+ padding: 40px 0;
38
+ }
39
+ .free-plugins-banner-container .banner-left-container .plugin-title {
40
+ font-size: 18px;
41
+ font-weight: 600;
42
+ margin: 0;
43
+ letter-spacing: 0;
44
+ }
45
+ .free-plugins-banner-container .banner-left-container .optimizer-banner-title {
46
+ font-size: 50px;
47
+ font-weight: 800;
48
+ margin: 0;
49
+ letter-spacing: 0.41;
50
+ padding: 15px 0 10px 0;
51
+ line-height: 1.3;
52
+ }
53
+ .free-plugins-banner-container .banner-left-container .banner-description {
54
+ font-size: 18px;
55
+ font-weight: 300;
56
+ margin: 0;
57
+ letter-spacing: 0;
58
+ padding: 0 0 20px 0;
59
+ }
60
+ .free-plugins-banner-container .banner-left-container .line {
61
+ width: 40px;
62
+ border-bottom: 2px solid #F8C332;
63
+ }
64
+ .free-plugins-banner-container .banner-right-container {
65
+ text-align: center;
66
+ margin: 111px 40px 81px 10px;
67
+ }
68
+ .free-plugins-banner-container .banner-right-container .button-div{
69
+ margin-bottom: 8px;
70
+ background: #F8C332;
71
+ border-radius: 30px;
72
+ padding: 20px 61px 19px 61px;
73
+ text-transform: uppercase;
74
+ }
75
+ .free-plugins-banner-container .banner-right-container a{
76
+ text-decoration: none;
77
+ color: white;
78
+ font-size: 20px;
79
+ font-weight: 600;
80
+ letter-spacing: 0.17px;
81
+ }
82
+ .free-plugins-banner-container .banner-right-container a:hover{
83
+ text-decoration: none;
84
+ }
85
+ .free-plugins-banner-container .banner-right-container .button-div:hover{
86
+ cursor: pointer;
87
+ background: #f9bb11;
88
+ }
89
+ .free-plugins-banner-container .banner-right-container p{
90
+ margin: 0;
91
+ font-size: 16px;
92
+ letter-spacing: 0.13px;
93
+ font-weight: 100;
94
+ }
95
+ @media screen and (max-width: 1660px) {
96
+ img.google-cloud {
97
+ height: 30px;
98
+ }
99
+ .free-plugins-banner-container {
100
+ height: 247px;
101
+ background-image: url(img/optimizer_banner_1366.png);
102
+ background-repeat: no-repeat;
103
+ padding-left: 300px;
104
+ }
105
+ .free-plugins-banner-container .banner-left-container .plugin-title,
106
+ .free-plugins-banner-container .banner-left-container .banner-description,
107
+ .free-plugins-banner-container .banner-right-container a {
108
+ font-size: 15px;
109
+ }
110
+ .free-plugins-banner-container .banner-right-container {
111
+ margin: 91px 30px 91px 5px;
112
+ }
113
+ .free-plugins-banner-container .banner-left-container .optimizer-banner-title {
114
+ font-size: 38px;
115
+ }
116
+ .free-plugins-banner-container .banner-right-container p{
117
+ font-size: 12px;
118
+ }
119
+ .free-plugins-banner-container .banner-right-container .button-div{
120
+ padding: 10px 27px;
121
+ }
122
+ }
123
+ @media screen and (max-width: 1281px) {
124
+ .free-plugins-banner-container {
125
+ background-image: url(img/optimizer_banner_1280.png);
126
+ background-repeat: no-repeat;
127
+ padding-left: 270px;
128
+ }
129
+ }
130
+ @media screen and (max-width: 1220px) {
131
+ .free-plugins-banner-container {
132
+ background-image: url(img/optimizer_banner_1024.png);
133
+ background-repeat: no-repeat;
134
+ height: 262px;
135
+ padding-bottom: 25px;
136
+ padding-left: 250px;
137
+ padding-right: 30px;
138
+ display: block;
139
+ }
140
+ .free-plugins-banner-container .banner-left-container {
141
+ padding: 25px 0 10px 0;
142
+ }
143
+ .free-plugins-banner-container .banner-left-container .plugin-title,
144
+ .free-plugins-banner-container .banner-left-container .banner-description {
145
+ font-size: 14px;
146
+ }
147
+ .free-plugins-banner-container .banner-left-container .optimizer-banner-title {
148
+ font-size: 36px;
149
+ }
150
+ .free-plugins-banner-container .banner-right-container {
151
+ text-align: center;
152
+ width: 150px;
153
+ float: right;
154
+ margin: 0;
155
+ }
156
+ .free-plugins-banner-container .banner-right-container .button-div{
157
+ width: 97px;
158
+ }
159
+ }
160
+ @media screen and (max-width: 1015px) {
161
+ .free-plugins-banner-container {
162
+ background-image: url(img/optimizer_banner_768.png);
163
+ background-repeat: no-repeat;
164
+ padding-left: 155px;
165
+ }
166
+ .free-plugins-banner-container .banner-right-container {
167
+ text-align: center;
168
+ width: 150px;
169
+ float: right;
170
+ margin: 0;
171
+ }
172
+ }
173
+ @media screen and (max-width: 750px) {
174
+ img.google-cloud {
175
+ display: none;
176
+ }
177
+ img.google-cloud-mobile {
178
+ display: block;
179
+ margin-left: auto;
180
+ padding-bottom: 20px;
181
+ height: 28px;
182
+ }
183
+ .close-btn {
184
+ background-size: 10px;
185
+ width: 10px;
186
+ height: 10px;
187
+ position: absolute;
188
+ top: 10px;
189
+ right: 10px;
190
+ }
191
+ .br-mobile {
192
+ display: block;
193
+ }
194
+ .free-plugins-banner-container {
195
+ background-image: unset;
196
+ padding: 30px 15px;
197
+ text-align: center;
198
+ height: auto;
199
+ margin: 10px 10px 10px 0;
200
+ }
201
+ .free-plugins-banner-container .banner-left-container {
202
+ padding: 0;
203
+ }
204
+ .free-plugins-banner-container .banner-left-container .line{
205
+ display: none;
206
+ }
207
+ .free-plugins-banner-container .banner-left-container .plugin-title,
208
+ .free-plugins-banner-container .banner-left-container .banner-description {
209
+ font-size: 16px;
210
+ }
211
+ .free-plugins-banner-container .banner-left-container .optimizer-banner-title {
212
+ font-size: 26px;
213
+ padding: 10px 0 5px 0;
214
+ }
215
+ .free-plugins-banner-container .banner-right-container {
216
+ text-align: center;
217
+ margin: 0 auto;
218
+ float: unset;
219
+ }
220
+ .free-plugins-banner-container .banner-right-container .button-div{
221
+ width: 97px;
222
+ margin-top: 10px;
223
+ }
224
+ }
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
wd/assets/js/speedOptimizer_banner.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function(){
2
+ jQuery(document).on("click", ".close-btn", function () {
3
+ jQuery(".free-plugins-banner-container").css( 'display', 'none' );
4
+ jQuery.ajax({
5
+ type: "POST",
6
+ url: ajaxurl,
7
+ data: {
8
+ action: 'wdSpeed_banner',
9
+ task: "closeBanner",
10
+ },
11
+ success: function (response) {
12
+ jQuery(".free-plugins-banner-container").remove();
13
+ },
14
+ error: function (jqXHR, textStatus, errorThrown) {
15
+ }
16
+ });
17
+ });
18
+ });
wd/config.php CHANGED
@@ -36,7 +36,8 @@ class TenWebNewLibConfig {
36
  public $menu_position = NULL;
37
  public $overview_welcome_image = NULL;
38
  public $display_overview = TRUE;
39
-
 
40
  public function set_options( $options ) {
41
 
42
  if ( isset($options["prefix"]) ) {
@@ -114,6 +115,12 @@ class TenWebNewLibConfig {
114
  if ( isset($options["display_overview"]) ) {
115
  $this->display_overview = $options["display_overview"];
116
  }
 
 
 
 
 
 
117
  // directories
118
  $this->wd_dir = dirname($this->plugin_main_file) . '/wd';
119
  $this->wd_dir_includes = $this->wd_dir . '/includes';
36
  public $menu_position = NULL;
37
  public $overview_welcome_image = NULL;
38
  public $display_overview = TRUE;
39
+ public $is_plugin_free = FALSE;
40
+ public $utm_source = NULL;
41
  public function set_options( $options ) {
42
 
43
  if ( isset($options["prefix"]) ) {
115
  if ( isset($options["display_overview"]) ) {
116
  $this->display_overview = $options["display_overview"];
117
  }
118
+ if ( isset($options["is_plugin_free"]) ) {
119
+ $this->is_plugin_free = $options["is_plugin_free"];
120
+ }
121
+ if ( isset($options["utm_source"]) ) {
122
+ $this->utm_source = $options["utm_source"];
123
+ }
124
  // directories
125
  $this->wd_dir = dirname($this->plugin_main_file) . '/wd';
126
  $this->wd_dir_includes = $this->wd_dir . '/includes';
wd/includes/speedOptimizer_banner.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined('ABSPATH') ) {
3
+ exit;
4
+ }
5
+
6
+ class speedOptimizer_banner {
7
+ public $config;
8
+ public $wd_speedOption_banner;
9
+ public $wd_prefix;
10
+
11
+ /**
12
+ * @param array $options
13
+ */
14
+ public function __construct( $options = array() ) {
15
+ if ( isset($this->wd_speedOption_banner) && $this->wd_speedOption_banner == 1 ) {
16
+ return;
17
+ }
18
+ $this->config = $options;
19
+ $this->wd_prefix = $options->prefix;
20
+ $this->speedOptimizer_banner_script_style();
21
+ $task = isset($_POST['task']) ? sanitize_text_field($_POST['task']) : '';
22
+ if( $task == 'closeBanner' ){
23
+ $this->closeBanner();
24
+ } else {
25
+ add_action('admin_notices', array( $this, 'wd_speedOptimizer_banner' ));
26
+ }
27
+ }
28
+
29
+ public function wd_speedOptimizer_banner(){
30
+ $config = $this->config;
31
+ ?>
32
+ <div class="free-plugins-banner-container container wrap">
33
+ <span class="close-btn"></span>
34
+ <div class="banner-left-container">
35
+ <p class="plugin-title"><?php echo $config->plugin_title; ?> created by 10Web</p>
36
+ <h2 class="optimizer-banner-title">Managed <br class ="br-mobile"> WordPress Hosting</h2>
37
+ <img class="google-cloud-mobile" src="<?php echo $config->wd_url_css . '/img/google_cloud.png'; ?>">
38
+ <p class="banner-description">Copy your website with 1click to 10Web & automatically get 95+ PageSpeed Score</p>
39
+ <div class="line"></div>
40
+ <img class="google-cloud" src="<?php echo $config->wd_url_css . '/img/google_cloud.png'; ?>">
41
+ </div>
42
+ <div class="banner-right-container">
43
+ <div class="button-div">
44
+ <a href="https://10web.io/<?php echo $config->utm_source;?>" target="_blank">learn more</a>
45
+ </div>
46
+ <p>14-Day Free Trial</p>
47
+ </div>
48
+ </div>
49
+
50
+ <?php
51
+ }
52
+
53
+ /* Include js and css */
54
+ public function speedOptimizer_banner_script_style() {
55
+ $wd_options = $this->config;
56
+ wp_register_script('speedOptimizer_banner_js', $wd_options->wd_url_js . '/speedOptimizer_banner.js', array( 'jquery' ));
57
+ wp_register_style('speedOptimizer_banner_css', $wd_options->wd_url_css . '/speedOptimizer_banner.css');
58
+ wp_enqueue_style('wd_speedOptimizer-open-sans', 'https://fonts.googleapis.com/css?family=Open+Sans:100,200,300,400,600,700,800&display=swap');
59
+ wp_enqueue_script('speedOptimizer_banner_js');
60
+ wp_enqueue_style('speedOptimizer_banner_css');
61
+ }
62
+
63
+ /* Close banner */
64
+ public function closeBanner() {
65
+ $this->wd_speedOption_banner = 1;
66
+ $wd_speedOption_banner = $this->wd_speedOption_banner;
67
+ update_option('wd_speedOption_banner', $wd_speedOption_banner);
68
+ }
69
+ }
wd/wd.php CHANGED
@@ -8,7 +8,7 @@ class TenWebLibNew {
8
  public $overview_instance;
9
  public $subscribe_instance;
10
  public $config;
11
- private $version = "1.1.1";
12
 
13
  public function __construct() {
14
  // Add menu for Overview page
@@ -23,11 +23,32 @@ class TenWebLibNew {
23
  $config = new TenWebNewLibConfig();
24
  $config->set_options($options);
25
  $this->config = $config;
 
26
  if ( !class_exists("TenWebNewLibApi") ) {
27
  $this->wd_includes();
28
  }
29
  $this->init_classes();
30
  $this->register_hooks();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  }
32
 
33
  // Create overview menu page
8
  public $overview_instance;
9
  public $subscribe_instance;
10
  public $config;
11
+ private $version = "1.1.2";
12
 
13
  public function __construct() {
14
  // Add menu for Overview page
23
  $config = new TenWebNewLibConfig();
24
  $config->set_options($options);
25
  $this->config = $config;
26
+ $is_free = $config->is_plugin_free;
27
  if ( !class_exists("TenWebNewLibApi") ) {
28
  $this->wd_includes();
29
  }
30
  $this->init_classes();
31
  $this->register_hooks();
32
+
33
+ if( $is_free ) {
34
+ $wd_speedOption_banner = get_option('wd_speedOption_banner');
35
+ if ( empty( $wd_speedOption_banner ) ) {
36
+ add_action('wp_ajax_wdSpeed_banner', array( $this, 'tenweb_speed__banner_ajax' )); // Banner for check site speed.
37
+ add_action( $this->config->prefix . '_tenweb_speedOption_banner', array( $this, 'tenweb_speedOption_banner_init' ), 8);
38
+ }
39
+ }
40
+
41
+ }
42
+
43
+ public function tenweb_speedOption_banner_init() {
44
+ if ( file_exists($this->config->wd_dir_includes . "/speedOptimizer_banner.php") && !class_exists("speedOptimizer_banner") ) {
45
+ require_once $this->config->wd_dir_includes . "/speedOptimizer_banner.php";
46
+ }
47
+ new speedOptimizer_banner($this->config);
48
+ }
49
+
50
+ public function tenweb_speed__banner_ajax() {
51
+ do_action( $this->config->prefix . '_tenweb_speedOption_banner' );
52
  }
53
 
54
  // Create overview menu page