Version Description
- 21.07.2022 =
- NEW: Compatibility with Yoast - Ability enable the sitemap with Yoast plugin activated.
- Update : We updated all functionality for wordpress 6.0.
- Update : BWS Panel section was updated.
- Bugfix : The issue with video sitemap has been fixed.
- PRO: Ability to edit title and meta description has been added.
- PRO : The issue with sitemap.xml on multisite has been fixed.
Download this release
Release Info
Developer | bestwebsoft |
Plugin | Google Sitemap by BestWebSoft |
Version | 3.2.6 |
Comparing to | |
See all releases |
Code changes from version 3.2.5 to 3.2.6
- bws_menu/bws_functions.php +551 -337
- bws_menu/bws_include.php +66 -54
- bws_menu/bws_menu.php +600 -434
- bws_menu/class-bws-settings.php +848 -725
- bws_menu/css/codemirror.css +117 -117
- bws_menu/css/general_style.css +538 -526
- bws_menu/css/jquery-ui-styles/1.9.2/jquery-ui.css +11 -11
- bws_menu/css/modal.css +73 -73
- bws_menu/css/style.css +280 -280
- bws_menu/deactivation-form.php +82 -71
- bws_menu/deprecated.php +152 -114
- bws_menu/js/bws_menu.js +52 -41
- bws_menu/js/bws_tooltip.js +101 -82
- bws_menu/js/c_o_o_k_i_e.js +96 -96
- bws_menu/js/general_script.js +204 -158
- bws_menu/js/shortcode-button.js +125 -111
- bws_menu/product_list.php +486 -485
- google-sitemap-plugin.php +30 -25
- includes/class-gglstmp-settings.php +27 -11
- includes/pro_banners.php +7 -0
- readme.txt +23 -8
bws_menu/bws_functions.php
CHANGED
@@ -1,19 +1,25 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
*
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
require_once( dirname( __FILE__ ) . '/deactivation-form.php' );
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
-
*
|
12 |
-
* @since 1.9.7
|
13 |
*/
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
function bws_get_mofile( $mofile, $domain ) {
|
16 |
-
if ( 'bestwebsoft'
|
17 |
$locale = get_locale();
|
18 |
return str_replace( $locale, "bestwebsoft-{$locale}", $mofile );
|
19 |
}
|
@@ -22,8 +28,12 @@ if ( ! function_exists ( 'bws_get_mofile' ) ) {
|
|
22 |
}
|
23 |
}
|
24 |
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
add_filter( 'load_textdomain_mofile', 'bws_get_mofile', 10, 2 );
|
28 |
load_theme_textdomain( 'bestwebsoft', get_stylesheet_directory() . '/inc/bws_menu/languages' );
|
29 |
remove_filter( 'load_textdomain_mofile', 'bws_get_mofile' );
|
@@ -36,15 +46,15 @@ if ( isset( $bws_menu_source ) && 'themes' == $bws_menu_source ) {
|
|
36 |
*
|
37 |
* @since 1.9.7
|
38 |
*/
|
39 |
-
if ( ! function_exists
|
40 |
-
if ( ! isset( $bws_menu_source ) || 'plugins'
|
41 |
function bws_menu_url( $path = '' ) {
|
42 |
return plugins_url( $path, __FILE__ );
|
43 |
}
|
44 |
} else {
|
45 |
function bws_menu_url( $path = '' ) {
|
46 |
$bws_menu_current_dir = str_replace( '\\', '/', dirname( __FILE__ ) );
|
47 |
-
$bws_menu_abspath
|
48 |
$bws_menu_current_url = site_url( str_replace( $bws_menu_abspath, '', $bws_menu_current_dir ) );
|
49 |
|
50 |
return sprintf( '%s/%s', $bws_menu_current_url, $path );
|
@@ -53,45 +63,55 @@ if ( ! function_exists ( 'bws_menu_url' ) ) {
|
|
53 |
}
|
54 |
|
55 |
/**
|
56 |
-
* Function check if plugin is compatible with current WP version
|
57 |
-
*
|
58 |
-
|
|
|
59 |
if ( ! function_exists( 'bws_wp_min_version_check' ) ) {
|
60 |
function bws_wp_min_version_check( $plugin_basename, $plugin_info, $require_wp, $min_wp = false ) {
|
61 |
global $wp_version, $bws_versions_notice_array;
|
62 |
-
if ( false
|
63 |
$min_wp = $require_wp;
|
64 |
-
|
65 |
-
|
|
|
66 |
if ( is_plugin_active( $plugin_basename ) ) {
|
67 |
deactivate_plugins( $plugin_basename );
|
68 |
$admin_url = ( function_exists( 'get_admin_url' ) ) ? get_admin_url( null, 'plugins.php' ) : esc_url( '/wp-admin/plugins.php' );
|
69 |
wp_die(
|
70 |
sprintf(
|
71 |
"<strong>%s</strong> %s <strong>WordPress %s</strong> %s <br /><br />%s <a href='%s'>%s</a>.",
|
72 |
-
$plugin_info['Name'],
|
73 |
-
|
74 |
-
$require_wp,
|
75 |
-
|
76 |
-
|
77 |
-
$admin_url,
|
78 |
-
|
79 |
)
|
80 |
);
|
81 |
}
|
82 |
-
} elseif ( version_compare( $wp_version, $require_wp,
|
83 |
-
$bws_versions_notice_array[] = array(
|
|
|
|
|
|
|
84 |
}
|
85 |
}
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
|
|
88 |
if ( ! function_exists( 'bws_plugin_reviews_block' ) ) {
|
89 |
function bws_plugin_reviews_block( $plugin_name, $plugin_slug ) { ?>
|
90 |
<div class="bws-plugin-reviews">
|
91 |
<div class="bws-plugin-reviews-rate">
|
92 |
-
<?php
|
93 |
-
<a href="https://wordpress.org/support/view/plugin-reviews/<?php echo esc_attr( $plugin_slug ); ?>?filter=5" target="_blank" title="<?php printf(
|
94 |
-
<?php
|
95 |
<span class="dashicons dashicons-star-filled"></span>
|
96 |
<span class="dashicons dashicons-star-filled"></span>
|
97 |
<span class="dashicons dashicons-star-filled"></span>
|
@@ -100,76 +120,89 @@ if ( ! function_exists( 'bws_plugin_reviews_block' ) ) {
|
|
100 |
</a>
|
101 |
</div>
|
102 |
<div class="bws-plugin-reviews-support">
|
103 |
-
<?php
|
104 |
-
<a href="https://support.bestwebsoft.com"><?php
|
105 |
</div>
|
106 |
<div class="bws-plugin-reviews-donate">
|
107 |
-
<?php
|
108 |
-
<a href="https://bestwebsoft.com/donate/"><?php
|
109 |
</div>
|
110 |
</div>
|
111 |
-
|
|
|
112 |
}
|
113 |
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
115 |
function bws_plugin_update_row( $plugin_key, $link_slug = false, $free_plugin_name = false ) {
|
116 |
global $bstwbsftwppdtplgns_options, $wp_version;
|
117 |
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
118 |
if ( isset( $bstwbsftwppdtplgns_options['wrong_license_key'][ $plugin_key ] ) ) {
|
119 |
$explode_plugin_key = explode( '/', $plugin_key );
|
120 |
-
$class
|
121 |
-
$style
|
122 |
-
$div_class
|
123 |
-
echo '<tr class="bws-plugin-update-tr plugin-update-tr ' . $class . '" id="' . esc_attr( $explode_plugin_key[0] ) . '-update" data-slug="' . esc_attr( $explode_plugin_key[0] ) . '" data-plugin="' . esc_attr( $plugin_key ) . '">
|
124 |
<td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange">
|
125 |
-
<div class="update-message' . $div_class . '"' . $style . '>';
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
if (
|
130 |
-
|
|
|
|
|
131 |
echo '</div>
|
132 |
</td>
|
133 |
</tr>';
|
134 |
-
} elseif ( isset( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) && strtotime( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) < strtotime(
|
135 |
$explode_plugin_key = explode( '/', $plugin_key );
|
136 |
-
$class
|
137 |
-
$style
|
138 |
-
$div_class
|
139 |
-
echo '<tr class="bws-plugin-update-tr plugin-update-tr ' . $class . '" id="' . esc_attr( $explode_plugin_key[0] ) . '-update" data-slug="' . esc_attr( $explode_plugin_key[0] ) . '" data-plugin="' . esc_attr( $plugin_key ) . '">
|
140 |
<td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange">
|
141 |
-
<div class="update-message' . $div_class . '"' . $style . '>';
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
|
|
|
|
152 |
</td>
|
153 |
</tr>';
|
154 |
} elseif ( isset( $bstwbsftwppdtplgns_options['trial'][ $plugin_key ] ) ) {
|
155 |
$explode_plugin_key = explode( '/', $plugin_key );
|
156 |
-
$class
|
157 |
-
$style
|
158 |
-
$div_class
|
159 |
-
echo '<tr class="bws-plugin-update-tr plugin-update-tr ' . $class . '" id="' . esc_attr( $explode_plugin_key[0] ) . '-update" data-slug="' . esc_attr( $explode_plugin_key[0] ) . '" data-plugin="' . esc_attr( $plugin_key ) . '">
|
160 |
<td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange">
|
161 |
-
<div class="update-message' . $div_class . '"' . $style . '>';
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
|
|
|
|
|
|
173 |
echo '</div>
|
174 |
</td>
|
175 |
</tr>';
|
@@ -177,6 +210,11 @@ if ( ! function_exists ( 'bws_plugin_update_row' ) ) {
|
|
177 |
}
|
178 |
}
|
179 |
|
|
|
|
|
|
|
|
|
|
|
180 |
if ( ! function_exists( 'bws_admin_notices' ) ) {
|
181 |
function bws_admin_notices() {
|
182 |
global $bws_versions_notice_array, $bws_plugin_banner_to_settings, $bstwbsftwppdtplgns_options, $bws_plugin_banner_go_pro, $bstwbsftwppdtplgns_banner_array, $bws_plugin_banner_timeout;
|
@@ -184,8 +222,8 @@ if ( ! function_exists( 'bws_admin_notices' ) ) {
|
|
184 |
/* bws_plugin_banner_go_pro */
|
185 |
if ( ! empty( $bws_plugin_banner_go_pro ) ) {
|
186 |
/* get $bws_plugins */
|
187 |
-
require
|
188 |
-
|
189 |
foreach ( $bstwbsftwppdtplgns_banner_array as $value ) {
|
190 |
if ( isset( $bws_plugin_banner_go_pro[ $value[0] ] ) && ! isset( $_COOKIE[ $value[0] ] ) ) {
|
191 |
|
@@ -193,78 +231,87 @@ if ( ! function_exists( 'bws_admin_notices' ) ) {
|
|
193 |
continue;
|
194 |
}
|
195 |
|
196 |
-
$single_banner_value = $bws_plugin_banner_go_pro[ $value[0] ];
|
|
|
197 |
<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
198 |
-
<div class="<?php echo $single_banner_value['prefix']; ?>_message bws_banner_on_plugin_page bws_go_pro_banner" style="display: none;">
|
199 |
-
<button class="<?php echo $single_banner_value['prefix']; ?>_close_icon close_icon notice-dismiss bws_hide_settings_notice" title="<?php
|
200 |
<div class="icon">
|
201 |
<img title="" src="<?php echo esc_attr( $single_banner_value['banner_url'] ); ?>" alt="" />
|
202 |
</div>
|
203 |
<div class="text">
|
204 |
-
<?php
|
205 |
-
<span><?php
|
206 |
</div>
|
207 |
<div class="button_div">
|
208 |
-
<a class="button" target="_blank" href="<?php echo $single_banner_value['bws_link']; ?>"><?php
|
209 |
</div>
|
210 |
</div>
|
211 |
</div>
|
212 |
-
<?php
|
|
|
213 |
}
|
214 |
}
|
215 |
}
|
216 |
|
217 |
/* $bws_plugin_banner_timeout */
|
218 |
if ( ! empty( $bws_plugin_banner_timeout ) ) {
|
219 |
-
foreach ( $bws_plugin_banner_timeout as $banner_value ) {
|
|
|
220 |
<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
221 |
-
<div class="<?php echo $banner_value['prefix']; ?>_message_timeout bws_banner_on_plugin_page bws_banner_timeout" style="display:none;">
|
222 |
-
<button class="<?php echo $banner_value['prefix']; ?>_close_icon close_icon notice-dismiss bws_hide_settings_notice" title="<?php
|
223 |
<div class="icon">
|
224 |
-
<img title="" src="<?php echo
|
225 |
</div>
|
226 |
-
<div class="text"><?php printf(
|
227 |
</div>
|
228 |
</div>
|
229 |
-
|
|
|
230 |
}
|
231 |
|
232 |
/* versions notice */
|
233 |
if ( ! empty( $bws_versions_notice_array ) ) {
|
234 |
-
foreach ( $bws_versions_notice_array as $key => $value ) {
|
|
|
235 |
<div class="update-nag">
|
236 |
-
<?php
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
|
|
|
|
243 |
</div>
|
244 |
-
|
|
|
245 |
}
|
246 |
|
247 |
/* banner_to_settings notice */
|
248 |
if ( ! empty( $bws_plugin_banner_to_settings ) ) {
|
249 |
-
if ( 1
|
|
|
250 |
<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
251 |
<div class="bws_banner_on_plugin_page bws_banner_to_settings">
|
252 |
<div class="icon">
|
253 |
-
<img title="" src="<?php echo
|
254 |
</div>
|
255 |
<div class="text">
|
256 |
-
<strong><?php printf(
|
257 |
<br />
|
258 |
-
<?php
|
259 |
-
<a href="<?php echo esc_url( self_admin_url( $bws_plugin_banner_to_settings[0]['settings_url'] ) ); ?>"><?php
|
260 |
-
<?php if ( false
|
261 |
-
<?php
|
262 |
-
<a href="<?php echo esc_url( self_admin_url( $bws_plugin_banner_to_settings[0]['post_type_url'] ) ); ?>"><?php
|
263 |
<?php } ?>
|
264 |
</div>
|
265 |
<form action="" method="post">
|
266 |
-
<button class="notice-dismiss bws_hide_settings_notice" title="<?php
|
267 |
-
<input type="hidden" name="bws_hide_settings_notice_<?php echo $bws_plugin_banner_to_settings[0]['plugin_options_name']; ?>" value="hide" />
|
268 |
<?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_settings_nonce_name' ); ?>
|
269 |
</form>
|
270 |
</div>
|
@@ -273,15 +320,15 @@ if ( ! function_exists( 'bws_admin_notices' ) ) {
|
|
273 |
<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
274 |
<div class="bws_banner_on_plugin_page bws_banner_to_settings_joint">
|
275 |
<form action="" method="post">
|
276 |
-
<button class="notice-dismiss bws_hide_settings_notice" title="<?php
|
277 |
<div class="bws-text">
|
278 |
<div class="icon">
|
279 |
<span class="dashicons dashicons-admin-plugins"></span>
|
280 |
</div>
|
281 |
-
<strong><?php
|
282 |
<div class="hide-if-no-js bws-more-links">
|
283 |
-
<a href="#" class="bws-more"><?php
|
284 |
-
<a href="#" class="bws-less hidden"><?php
|
285 |
</div>
|
286 |
<?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_settings_nonce_name' ); ?>
|
287 |
<div class="clear"></div>
|
@@ -289,98 +336,124 @@ if ( ! function_exists( 'bws_admin_notices' ) ) {
|
|
289 |
<div class="bws-details hide-if-js">
|
290 |
<?php foreach ( $bws_plugin_banner_to_settings as $value ) { ?>
|
291 |
<div>
|
292 |
-
<strong><?php echo str_replace( ' by BestWebSoft', '', $value['plugin_info']['Name'] ); ?></strong> <a href="<?php echo esc_url( self_admin_url( $value['settings_url'] ) ); ?>"><?php
|
293 |
-
<?php if ( false
|
294 |
-
 | <a target="_blank" href="<?php echo esc_url( self_admin_url( $value['post_type_url'] ) ); ?>"><?php
|
295 |
<?php } ?>
|
296 |
-
<input type="hidden" name="bws_hide_settings_notice_<?php echo $value['plugin_options_name']; ?>" value="hide" />
|
297 |
</div>
|
298 |
<?php } ?>
|
299 |
</div>
|
300 |
</div>
|
301 |
</form>
|
302 |
</div>
|
303 |
-
|
|
|
304 |
}
|
305 |
|
306 |
/**
|
307 |
-
*
|
|
|
308 |
* @since 1.9.8
|
309 |
*/
|
310 |
-
if ( ! empty( $bstwbsftwppdtplgns_options['deprecated_function'] ) ) {
|
|
|
311 |
<div class="update-nag">
|
312 |
-
<strong><?php
|
313 |
-
<?php
|
|
|
314 |
foreach ( $bstwbsftwppdtplgns_options['deprecated_function'] as $function_name => $attr ) {
|
315 |
-
if ( 1
|
316 |
echo ' ,';
|
|
|
317 |
if ( ! empty( $attr['product-name'] ) ) {
|
318 |
-
echo $attr['product-name'];
|
319 |
} elseif ( ! empty( $attr['file'] ) ) {
|
320 |
-
echo $attr['file'];
|
321 |
}
|
322 |
unset( $bstwbsftwppdtplgns_options['deprecated_function'][ $function_name ] );
|
323 |
$i++;
|
324 |
-
}
|
|
|
|
|
325 |
<br/>
|
326 |
-
<?php
|
327 |
</div>
|
328 |
-
<?php
|
|
|
329 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
330 |
-
else
|
331 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
|
|
332 |
}
|
333 |
}
|
334 |
}
|
335 |
|
|
|
|
|
|
|
|
|
|
|
336 |
if ( ! function_exists( 'bws_plugin_banner_go_pro' ) ) {
|
337 |
function bws_plugin_banner_go_pro( $plugin_options, $plugin_info, $this_banner_prefix, $bws_link_slug, $link_key, $link_pn, $banner_url_or_slug ) {
|
338 |
global $bws_plugin_banner_go_pro, $wp_version, $bstwbsftwppdtplgns_banner_array;
|
339 |
|
340 |
-
if ( ! isset( $plugin_options['first_install'] ) || strtotime( '-1 week' ) < $plugin_options['first_install'] )
|
341 |
return;
|
|
|
342 |
|
343 |
-
$bws_link = esc_url( 'https://bestwebsoft.com/products/wordpress/plugins/' . $bws_link_slug . '/?k=' . $link_key . '&pn=' . $link_pn . '&v=' . $plugin_info[
|
344 |
|
345 |
-
if ( false
|
346 |
$banner_url_or_slug = '//ps.w.org/' . $banner_url_or_slug . '/assets/icon-256x256.png';
|
347 |
}
|
348 |
|
349 |
$bws_plugin_banner_go_pro[ $this_banner_prefix . '_hide_banner_on_plugin_page' ] = array(
|
350 |
-
'plugin_info'
|
351 |
-
'prefix'
|
352 |
-
'bws_link'
|
353 |
-
'banner_url'
|
354 |
);
|
355 |
|
356 |
if ( empty( $bstwbsftwppdtplgns_banner_array ) ) {
|
357 |
-
if ( ! function_exists( 'bws_get_banner_array' ) )
|
358 |
-
require_once
|
|
|
359 |
bws_get_banner_array();
|
360 |
}
|
361 |
}
|
362 |
}
|
363 |
|
|
|
|
|
|
|
|
|
|
|
364 |
if ( ! function_exists( 'bws_add_plugin_banner_timeout' ) ) {
|
365 |
function bws_add_plugin_banner_timeout( $plugin_key, $plugin_prefix, $plugin_name, $banner_url_or_slug ) {
|
366 |
global $bws_plugin_banner_timeout;
|
367 |
|
368 |
-
if ( isset( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) && ( strtotime( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) < strtotime(
|
369 |
|
370 |
-
if ( false
|
371 |
$banner_url_or_slug = '//ps.w.org/' . $banner_url_or_slug . '/assets/icon-256x256.png';
|
372 |
}
|
373 |
|
374 |
$bws_plugin_banner_timeout[] = array(
|
375 |
-
'plugin_key'
|
376 |
-
'prefix'
|
377 |
-
'plugin_name'
|
378 |
-
'banner_url'
|
379 |
);
|
380 |
}
|
381 |
}
|
382 |
}
|
383 |
|
|
|
|
|
|
|
|
|
|
|
384 |
if ( ! function_exists( 'bws_plugin_banner_to_settings' ) ) {
|
385 |
function bws_plugin_banner_to_settings( $plugin_info, $plugin_options_name, $banner_url_or_slug, $settings_url, $post_type_url = false ) {
|
386 |
global $bws_plugin_banner_to_settings;
|
@@ -389,98 +462,116 @@ if ( ! function_exists( 'bws_plugin_banner_to_settings' ) ) {
|
|
389 |
|
390 |
$plugin_options = $is_network_admin ? get_site_option( $plugin_options_name ) : get_option( $plugin_options_name );
|
391 |
|
392 |
-
if ( isset( $plugin_options['display_settings_notice'] ) && 0
|
393 |
return;
|
|
|
394 |
|
395 |
-
if ( isset( $_POST['bws_hide_settings_notice_' . $plugin_options_name ] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_settings_nonce_name' )
|
396 |
$plugin_options['display_settings_notice'] = 0;
|
397 |
-
if ( $is_network_admin )
|
398 |
update_site_option( $plugin_options_name, $plugin_options );
|
399 |
-
else
|
400 |
update_option( $plugin_options_name, $plugin_options );
|
|
|
401 |
return;
|
402 |
}
|
403 |
|
404 |
-
if ( false
|
405 |
$banner_url_or_slug = '//ps.w.org/' . $banner_url_or_slug . '/assets/icon-256x256.png';
|
406 |
}
|
407 |
|
408 |
$bws_plugin_banner_to_settings[] = array(
|
409 |
-
'plugin_info'
|
410 |
-
'plugin_options_name'
|
411 |
-
'banner_url'
|
412 |
-
'settings_url'
|
413 |
-
'post_type_url'
|
414 |
);
|
415 |
}
|
416 |
}
|
417 |
|
|
|
|
|
|
|
|
|
|
|
418 |
if ( ! function_exists( 'bws_plugin_suggest_feature_banner' ) ) {
|
419 |
function bws_plugin_suggest_feature_banner( $plugin_info, $plugin_options_name, $banner_url_or_slug ) {
|
420 |
$is_network_admin = is_network_admin();
|
421 |
|
422 |
$plugin_options = $is_network_admin ? get_site_option( $plugin_options_name ) : get_option( $plugin_options_name );
|
423 |
|
424 |
-
if ( isset( $plugin_options['display_suggest_feature_banner'] ) && 0
|
425 |
return;
|
|
|
426 |
|
427 |
if ( ! isset( $plugin_options['first_install'] ) ) {
|
428 |
-
$plugin_options['first_install'] = strtotime(
|
429 |
-
$update_option
|
430 |
} elseif ( strtotime( '-2 week' ) < $plugin_options['first_install'] ) {
|
431 |
$return = true;
|
432 |
}
|
433 |
|
434 |
if ( ! isset( $plugin_options['go_settings_counter'] ) ) {
|
435 |
$plugin_options['go_settings_counter'] = 1;
|
436 |
-
$update_option
|
437 |
} elseif ( 20 > $plugin_options['go_settings_counter'] ) {
|
438 |
$plugin_options['go_settings_counter'] = $plugin_options['go_settings_counter'] + 1;
|
439 |
-
$update_option
|
440 |
}
|
441 |
|
442 |
if ( isset( $update_option ) ) {
|
443 |
-
if ( $is_network_admin )
|
444 |
update_site_option( $plugin_options_name, $plugin_options );
|
445 |
-
else
|
446 |
update_option( $plugin_options_name, $plugin_options );
|
|
|
447 |
}
|
448 |
|
449 |
-
if ( isset( $return ) )
|
450 |
return;
|
|
|
451 |
|
452 |
-
if ( isset( $_POST['bws_hide_suggest_feature_banner_' . $plugin_options_name ] ) && check_admin_referer( $plugin_info['Name'], 'bws_settings_nonce_name' )
|
453 |
$plugin_options['display_suggest_feature_banner'] = 0;
|
454 |
-
if ( $is_network_admin )
|
455 |
update_site_option( $plugin_options_name, $plugin_options );
|
456 |
-
else
|
457 |
update_option( $plugin_options_name, $plugin_options );
|
|
|
458 |
return;
|
459 |
}
|
460 |
|
461 |
-
if ( false
|
462 |
$banner_url_or_slug = '//ps.w.org/' . $banner_url_or_slug . '/assets/icon-256x256.png';
|
463 |
-
}
|
|
|
464 |
<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
465 |
<div class="bws_banner_on_plugin_page bws_suggest_feature_banner">
|
466 |
<div class="icon">
|
467 |
-
<img title="" src="<?php echo
|
468 |
</div>
|
469 |
<div class="text">
|
470 |
-
<strong><?php printf(
|
471 |
-
<?php
|
472 |
-
<a target="_blank" href="https://support.bestwebsoft.com/hc/en-us/requests/new"><?php
|
473 |
</div>
|
474 |
<form action="" method="post">
|
475 |
-
<button class="notice-dismiss bws_hide_settings_notice" title="<?php
|
476 |
-
<input type="hidden" name="bws_hide_suggest_feature_banner_<?php echo $plugin_options_name; ?>" value="hide" />
|
477 |
<?php wp_nonce_field( $plugin_info['Name'], 'bws_settings_nonce_name' ); ?>
|
478 |
</form>
|
479 |
</div>
|
480 |
</div>
|
481 |
-
|
|
|
482 |
}
|
483 |
|
|
|
|
|
|
|
|
|
|
|
484 |
if ( ! function_exists( 'bws_affiliate_postbox' ) ) {
|
485 |
function bws_affiliate_postbox() {
|
486 |
|
@@ -490,12 +581,13 @@ if ( ! function_exists( 'bws_affiliate_postbox' ) ) {
|
|
490 |
return;
|
491 |
}
|
492 |
|
493 |
-
if ( isset( $_POST['bws_hide_affiliate_banner'
|
494 |
update_user_meta( get_current_user_id(), '_bws_affiliate_postbox_dismissed', strtotime( 'now' ) );
|
495 |
return;
|
496 |
}
|
497 |
|
498 |
-
$bws_link = esc_url( 'https://bestwebsoft.com/affiliate/?utm_source=plugin&utm_medium=settings&utm_campaign=affiliate_program' );
|
|
|
499 |
<div id="bws-affiliate-postbox" class="postbox">
|
500 |
<form action="" method="post">
|
501 |
<button class="notice-dismiss bws_hide_settings_notice" title="<?php esc_html_e( 'Close notice', 'bestwebsoft' ); ?>"></button>
|
@@ -508,73 +600,97 @@ if ( ! function_exists( 'bws_affiliate_postbox' ) ) {
|
|
508 |
<div><?php esc_html_e( 'from each BestWebSoft plugin and theme sale you refer', 'bestwebsoft' ); ?></div>
|
509 |
<div class="bws-row">
|
510 |
<div class="bws-cell">
|
511 |
-
<img src="<?php echo bws_menu_url(
|
512 |
<div><?php esc_html_e( 'Join affiliate program', 'bestwebsoft' ); ?></div>
|
513 |
</div>
|
514 |
<div class="bws-cell">
|
515 |
-
<img src="<?php echo bws_menu_url(
|
516 |
<div><?php esc_html_e( 'Promote and sell products', 'bestwebsoft' ); ?></div>
|
517 |
</div>
|
518 |
<div class="bws-cell">
|
519 |
-
<img src="<?php echo bws_menu_url(
|
520 |
<div><?php esc_html_e( 'Get commission!', 'bestwebsoft' ); ?></div>
|
521 |
</div>
|
522 |
</div>
|
523 |
<div class="clear"></div>
|
524 |
<p>
|
525 |
-
<a class="button" href="<?php echo $bws_link; ?>" target="_blank"><?php esc_html_e( 'Start Now', 'bestwebsoft' ); ?></a>
|
526 |
</p>
|
527 |
</div>
|
528 |
-
|
|
|
529 |
}
|
530 |
|
|
|
|
|
|
|
|
|
|
|
531 |
if ( ! function_exists( 'bws_show_settings_notice' ) ) {
|
532 |
-
function bws_show_settings_notice() {
|
|
|
533 |
<div id="bws_save_settings_notice" class="updated fade below-h2" style="display:none;">
|
534 |
<p>
|
535 |
-
<strong><?php
|
536 |
-
<a class="bws_save_anchor" href="#bws-submit-button"><?php
|
537 |
</p>
|
538 |
</div>
|
539 |
-
|
|
|
540 |
}
|
541 |
|
|
|
|
|
|
|
|
|
|
|
542 |
if ( ! function_exists( 'bws_hide_premium_options' ) ) {
|
543 |
function bws_hide_premium_options( $options ) {
|
544 |
-
if ( ! isset( $options['hide_premium_options'] ) || ! is_array( $options['hide_premium_options'] ) )
|
545 |
$options['hide_premium_options'] = array();
|
|
|
546 |
|
547 |
$options['hide_premium_options'][] = get_current_user_id();
|
548 |
|
549 |
return array(
|
550 |
-
|
551 |
-
|
|
|
552 |
}
|
553 |
}
|
554 |
|
|
|
|
|
|
|
|
|
|
|
555 |
if ( ! function_exists( 'bws_hide_premium_options_check' ) ) {
|
556 |
function bws_hide_premium_options_check( $options ) {
|
557 |
-
if ( ! empty( $options['hide_premium_options'] ) && in_array( get_current_user_id(), $options['hide_premium_options'] ) )
|
558 |
return true;
|
559 |
-
else
|
560 |
return false;
|
|
|
561 |
}
|
562 |
}
|
563 |
|
564 |
-
|
|
|
|
|
|
|
565 |
function bws_plugins_admin_init() {
|
566 |
-
$page = isset( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : '';
|
567 |
-
if ( isset( $_GET['bws_activate_plugin'] ) && check_admin_referer( 'bws_activate_plugin' . $_GET['bws_activate_plugin'] ) ) {
|
568 |
|
569 |
-
$plugin = isset( $_GET['bws_activate_plugin'] ) ? sanitize_text_field( $_GET['bws_activate_plugin'] ) : '';
|
570 |
$result = activate_plugin( $plugin, '', is_network_admin() );
|
571 |
if ( is_wp_error( $result ) ) {
|
572 |
-
if ( 'unexpected_output'
|
573 |
$redirect = self_admin_url( 'admin.php?page=bws_panel&error=true&charsout=' . strlen( $result->get_error_data() ) . '&plugin=' . $plugin );
|
574 |
-
|
575 |
exit();
|
576 |
} else {
|
577 |
-
wp_die( $result );
|
578 |
}
|
579 |
}
|
580 |
|
@@ -591,52 +707,62 @@ if ( ! function_exists ( 'bws_plugins_admin_init' ) ) {
|
|
591 |
* @deprecated 1.9.8 (15.12.2016)
|
592 |
*/
|
593 |
$is_main_page = in_array( $page, array( 'bws_panel', 'bws_themes', 'bws_system_status' ) );
|
594 |
-
$tab
|
595 |
|
596 |
-
if ( $is_main_page )
|
597 |
$current_page = 'admin.php?page=' . $page;
|
598 |
-
else
|
599 |
$current_page = isset( $_GET['tab'] ) ? 'admin.php?page=' . $page . '&tab=' . $tab : 'admin.php?page=' . $page;
|
|
|
600 |
/*end deprecated */
|
601 |
|
602 |
-
|
603 |
exit();
|
604 |
}
|
605 |
|
606 |
-
if (
|
607 |
-
if ( ! session_id() )
|
608 |
@session_start();
|
|
|
609 |
}
|
610 |
|
611 |
bws_add_editor_buttons();
|
612 |
}
|
613 |
}
|
614 |
|
615 |
-
|
|
|
|
|
|
|
616 |
function bws_admin_enqueue_scripts() {
|
617 |
global $wp_scripts, $hook_suffix,
|
618 |
$post_type,
|
619 |
$bws_plugin_banner_go_pro, $bws_plugin_banner_timeout, $bstwbsftwppdtplgns_banner_array,
|
620 |
-
$bws_shortcode_list
|
|
|
621 |
|
622 |
-
$page = isset( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : '';
|
623 |
|
624 |
$jquery_ui_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.12.1';
|
625 |
-
|
626 |
-
|
|
|
|
|
|
|
|
|
627 |
}
|
628 |
-
wp_enqueue_style( 'bws-admin-css', bws_menu_url( 'css/general_style.css' ) );
|
629 |
wp_enqueue_script( 'bws-admin-scripts', bws_menu_url( 'js/general_script.js' ), array( 'jquery', 'jquery-ui-tooltip' ) );
|
630 |
|
631 |
if ( in_array( $page, array( 'bws_panel', 'bws_themes', 'bws_system_status' ) ) || strpos( $page, '-bws-panel' ) ) {
|
632 |
-
wp_enqueue_style( 'bws_menu_style', bws_menu_url( 'css/style.css' ) );
|
633 |
-
wp_enqueue_script( 'bws_menu_script', bws_menu_url( 'js/bws_menu.js' ) );
|
634 |
wp_enqueue_script( 'theme-install' );
|
635 |
add_thickbox();
|
636 |
wp_enqueue_script( 'plugin-install' );
|
637 |
}
|
638 |
|
639 |
-
if ( 'plugins.php'
|
640 |
if ( ! empty( $bws_plugin_banner_go_pro ) || ! empty( $bws_plugin_banner_timeout ) ) {
|
641 |
wp_enqueue_script( 'bws_menu_cookie', bws_menu_url( 'js/c_o_o_k_i_e.js' ) );
|
642 |
|
@@ -649,7 +775,7 @@ if ( ! function_exists ( 'bws_admin_enqueue_scripts' ) ) {
|
|
649 |
$script = "(function($) {
|
650 |
$(document).ready( function() {
|
651 |
var hide_message = $.cookie( '" . $prefix . "_hide_banner_on_plugin_page' );
|
652 |
-
if ( hide_message
|
653 |
$( '." . $prefix . "_message' ).css( 'display', 'none' );
|
654 |
} else {
|
655 |
$( '." . $prefix . "_message' ).css( 'display', 'block' );
|
@@ -675,7 +801,7 @@ if ( ! function_exists ( 'bws_admin_enqueue_scripts' ) ) {
|
|
675 |
|
676 |
foreach ( $bws_plugin_banner_timeout as $banner_value ) {
|
677 |
$script .= "var hide_message = $.cookie( '" . $banner_value['prefix'] . "_timeout_hide_banner_on_plugin_page' );
|
678 |
-
if ( hide_message
|
679 |
$( '." . $banner_value['prefix'] . "_message_timeout' ).css( 'display', 'none' );
|
680 |
} else {
|
681 |
$( '." . $banner_value['prefix'] . "_message_timeout' ).css( 'display', 'block' );
|
@@ -686,8 +812,8 @@ if ( ! function_exists ( 'bws_admin_enqueue_scripts' ) ) {
|
|
686 |
});";
|
687 |
}
|
688 |
|
689 |
-
$script .=
|
690 |
-
})(jQuery);
|
691 |
|
692 |
wp_register_script( 'plugin_banner_timeout_hide', '' );
|
693 |
wp_enqueue_script( 'plugin_banner_timeout_hide' );
|
@@ -705,15 +831,16 @@ if ( ! function_exists ( 'bws_admin_enqueue_scripts' ) ) {
|
|
705 |
if ( ! empty( $bws_shortcode_list ) ) {
|
706 |
/* TinyMCE Shortcode Plugin */
|
707 |
$script = "var bws_shortcode_button = {
|
708 |
-
'label': '" . esc_attr__(
|
709 |
-
'title': '" . esc_attr__(
|
710 |
'function_name': [";
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
|
|
717 |
wp_register_script( 'bws_shortcode_button', '' );
|
718 |
wp_enqueue_script( 'bws_shortcode_button' );
|
719 |
wp_add_inline_script( 'bws_shortcode_button', sprintf( $script ) );
|
@@ -721,17 +848,17 @@ if ( ! function_exists ( 'bws_admin_enqueue_scripts' ) ) {
|
|
721 |
/* TinyMCE Shortcode Plugin */
|
722 |
if ( isset( $post_type ) && in_array( $post_type, array( 'post', 'page' ) ) ) {
|
723 |
$tooltip_args = array(
|
724 |
-
'tooltip_id'
|
725 |
-
'css_selector'
|
726 |
-
'actions'
|
727 |
-
'click'
|
728 |
-
'onload'
|
729 |
),
|
730 |
-
'content'
|
731 |
-
'position'
|
732 |
-
'edge'
|
733 |
),
|
734 |
-
'set_timeout'
|
735 |
);
|
736 |
bws_add_tooltip_in_admin( $tooltip_args );
|
737 |
}
|
@@ -748,15 +875,21 @@ if ( ! function_exists( 'bws_enqueue_settings_scripts' ) ) {
|
|
748 |
function bws_enqueue_settings_scripts() {
|
749 |
wp_enqueue_script( 'jquery-ui-resizable' );
|
750 |
wp_enqueue_script( 'jquery-ui-tabs' );
|
751 |
-
wp_enqueue_style( 'bws-modal-css', bws_menu_url( 'css/modal.css' ) );
|
752 |
}
|
753 |
}
|
754 |
|
755 |
-
|
|
|
|
|
|
|
|
|
|
|
756 |
function bws_plugins_admin_head() {
|
757 |
-
$page = isset( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : '';
|
758 |
|
759 |
-
if ( $page
|
|
|
760 |
<noscript>
|
761 |
<style type="text/css">
|
762 |
.bws_product_button {
|
@@ -764,28 +897,39 @@ if ( ! function_exists ( 'bws_plugins_admin_head' ) ) {
|
|
764 |
}
|
765 |
</style>
|
766 |
</noscript>
|
767 |
-
|
768 |
-
|
|
|
769 |
}
|
770 |
|
771 |
-
|
|
|
|
|
|
|
|
|
|
|
772 |
function bws_plugins_admin_footer() {
|
773 |
bws_shortcode_media_button_popup();
|
774 |
}
|
775 |
}
|
776 |
|
777 |
-
|
|
|
|
|
|
|
|
|
|
|
778 |
function bws_plugins_include_codemirror() {
|
779 |
global $wp_version;
|
780 |
-
if ( version_compare( $wp_version, '4.9.0',
|
781 |
wp_enqueue_style( 'wp-codemirror' );
|
782 |
wp_enqueue_script( 'wp-codemirror' );
|
783 |
-
|
784 |
-
wp_enqueue_style( 'codemirror.css', bws_menu_url( 'css/codemirror.css' ) );
|
785 |
-
wp_enqueue_script( 'codemirror.js', bws_menu_url( 'js/codemirror.js' ), array( 'jquery' ) );
|
786 |
-
|
787 |
|
788 |
-
|
789 |
}
|
790 |
|
791 |
/**
|
@@ -793,12 +937,17 @@ if ( ! function_exists ( 'bws_plugins_include_codemirror' ) ) {
|
|
793 |
*/
|
794 |
if ( ! function_exists( 'bws_add_tooltip_in_admin' ) ) {
|
795 |
function bws_add_tooltip_in_admin( $tooltip_args = array() ) {
|
796 |
-
new
|
797 |
}
|
798 |
}
|
799 |
|
800 |
-
|
801 |
-
|
|
|
|
|
|
|
|
|
|
|
802 |
private $tooltip_args;
|
803 |
|
804 |
public function __construct( $tooltip_args ) {
|
@@ -806,32 +955,32 @@ if ( ! class_exists( 'BWS_admin_tooltip' ) ) {
|
|
806 |
|
807 |
/* Default arguments */
|
808 |
$tooltip_args_default = array(
|
809 |
-
'tooltip_id'
|
810 |
-
'css_selector'
|
811 |
-
'actions'
|
812 |
-
'click'
|
813 |
-
'onload'
|
814 |
),
|
815 |
-
'buttons'
|
816 |
-
'close'
|
817 |
'type' => 'dismiss',
|
818 |
-
'text' =>
|
819 |
),
|
820 |
),
|
821 |
-
'position'
|
822 |
-
'edge'
|
823 |
-
'align'
|
824 |
-
'pos-left'
|
825 |
-
'pos-top'
|
826 |
-
'zindex'
|
827 |
),
|
828 |
-
'set_timeout'
|
829 |
);
|
830 |
-
$tooltip_args
|
831 |
/* Check that our merged array has default values */
|
832 |
foreach ( $tooltip_args_default as $arg_key => $arg_value ) {
|
833 |
if ( is_array( $arg_value ) ) {
|
834 |
-
foreach ( $arg_value as $key => $value) {
|
835 |
if ( ! isset( $tooltip_args[ $arg_key ][ $key ] ) ) {
|
836 |
$tooltip_args[ $arg_key ][ $key ] = $tooltip_args_default[ $arg_key ][ $key ];
|
837 |
}
|
@@ -850,7 +999,7 @@ if ( ! class_exists( 'BWS_admin_tooltip' ) ) {
|
|
850 |
return;
|
851 |
} else {
|
852 |
/* check position */
|
853 |
-
if ( ! in_array( $tooltip_args['position']['edge'], array( 'left', 'right', 'top', 'bottom' ) )
|
854 |
$tooltip_args['position']['edge'] = 'top';
|
855 |
}
|
856 |
if ( ! in_array( $tooltip_args['position']['align'], array( 'top', 'bottom', 'left', 'right', 'center' ) ) ) {
|
@@ -870,7 +1019,7 @@ if ( ! class_exists( 'BWS_admin_tooltip' ) ) {
|
|
870 |
break;
|
871 |
case 'top':
|
872 |
case 'bottom':
|
873 |
-
if ( $tooltip_args['position']['align']
|
874 |
$tooltip_args['position']['pos-left'] -= 65;
|
875 |
}
|
876 |
break;
|
@@ -881,16 +1030,16 @@ if ( ! class_exists( 'BWS_admin_tooltip' ) ) {
|
|
881 |
wp_enqueue_script( 'wp-pointer' );
|
882 |
/* add script that displays our tooltip */
|
883 |
if ( ! isset( $bstwbsftwppdtplgns_tooltip_script_add ) ) {
|
884 |
-
wp_enqueue_script( 'bws-tooltip-script', bws_menu_url( 'js/bws_tooltip.js' ) );
|
885 |
$bstwbsftwppdtplgns_tooltip_script_add = true;
|
886 |
}
|
887 |
$tooltip_args = $this->tooltip_args;
|
888 |
|
889 |
-
$script =
|
890 |
$(document).ready( function() {
|
891 |
-
$.bwsTooltip(
|
892 |
})
|
893 |
-
})(jQuery);
|
894 |
wp_register_script( 'bws-tooltip-script-single-' . $this->tooltip_args['tooltip_id'], '' );
|
895 |
wp_enqueue_script( 'bws-tooltip-script-single-' . $this->tooltip_args['tooltip_id'] );
|
896 |
wp_add_inline_script( 'bws-tooltip-script-single-' . $this->tooltip_args['tooltip_id'], sprintf( $script ) );
|
@@ -898,22 +1047,33 @@ if ( ! class_exists( 'BWS_admin_tooltip' ) ) {
|
|
898 |
}
|
899 |
}
|
900 |
|
901 |
-
|
902 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
903 |
<div>
|
904 |
-
<p><?php
|
905 |
<form method="post" action="">
|
906 |
<p>
|
907 |
-
<button class="button button-primary" name="bws_restore_confirm"><?php
|
908 |
-
<button class="button" name="bws_restore_deny"><?php
|
909 |
<?php wp_nonce_field( $plugin_basename, 'bws_settings_nonce_name' ); ?>
|
910 |
</p>
|
911 |
</form>
|
912 |
</div>
|
913 |
-
|
|
|
914 |
}
|
915 |
|
916 |
-
|
|
|
|
|
|
|
|
|
917 |
if ( ! function_exists( 'bws_add_editor_buttons' ) ) {
|
918 |
function bws_add_editor_buttons() {
|
919 |
global $bws_shortcode_list;
|
@@ -924,13 +1084,23 @@ if ( ! function_exists( 'bws_add_editor_buttons' ) ) {
|
|
924 |
}
|
925 |
}
|
926 |
|
927 |
-
|
|
|
|
|
|
|
|
|
|
|
928 |
function bws_add_buttons( $plugin_array ) {
|
929 |
$plugin_array['add_bws_shortcode'] = bws_menu_url( 'js/shortcode-button.js' );
|
930 |
return $plugin_array;
|
931 |
}
|
932 |
}
|
933 |
|
|
|
|
|
|
|
|
|
|
|
934 |
if ( ! function_exists( 'bws_register_buttons' ) ) {
|
935 |
function bws_register_buttons( $buttons ) {
|
936 |
array_push( $buttons, 'add_bws_shortcode' ); /* dropcap', 'recentposts */
|
@@ -938,50 +1108,60 @@ if ( ! function_exists( 'bws_register_buttons' ) ) {
|
|
938 |
}
|
939 |
}
|
940 |
|
941 |
-
|
|
|
|
|
|
|
|
|
942 |
if ( ! function_exists( 'bws_shortcode_media_button_popup' ) ) {
|
943 |
function bws_shortcode_media_button_popup() {
|
944 |
global $bws_shortcode_list;
|
945 |
|
946 |
-
if ( ! empty( $bws_shortcode_list ) ) {
|
|
|
947 |
<div id="bws_shortcode_popup" style="display:none;">
|
948 |
<div id="bws_shortcode_popup_block">
|
949 |
<div id="bws_shortcode_select_plugin">
|
950 |
-
<h4><?php
|
951 |
<select name="bws_shortcode_select" id="bws_shortcode_select">
|
952 |
<?php foreach ( $bws_shortcode_list as $key => $value ) { ?>
|
953 |
-
<option value="<?php echo esc_attr( $key ); ?>"><?php echo $value['name']; ?></option>
|
954 |
<?php } ?>
|
955 |
</select>
|
956 |
</div>
|
957 |
<div class="clear"></div>
|
958 |
<div id="bws_shortcode_content">
|
959 |
-
<h4><?php
|
960 |
-
<?php echo apply_filters( 'bws_shortcode_button_content', '' ); ?>
|
961 |
</div>
|
962 |
<div class="clear"></div>
|
963 |
<div id="bws_shortcode_content_bottom">
|
964 |
-
<p><?php
|
965 |
<div id="bws_shortcode_block"><div id="bws_shortcode_display"></div></div>
|
966 |
</div>
|
967 |
</div>
|
968 |
</div>
|
969 |
-
|
|
|
970 |
}
|
971 |
}
|
972 |
|
973 |
/**
|
974 |
-
*
|
|
|
975 |
* @since 1.9.8
|
976 |
*/
|
977 |
if ( ! function_exists( 'bws_shortcode_output' ) ) {
|
978 |
-
function bws_shortcode_output( $shortcode ) {
|
979 |
-
|
980 |
-
|
|
|
|
|
981 |
}
|
982 |
|
983 |
/**
|
984 |
-
*
|
|
|
985 |
* @since 1.9.8
|
986 |
* @param string $content - HTML content for the tooltip
|
987 |
* @param string $class - Can be standart "bws-hide-for-mobile" (tooltip will be hidden in 782px) and "bws-auto-width" (need for img) or some custom class.
|
@@ -994,7 +1174,11 @@ if ( ! function_exists( 'bws_add_help_box' ) ) {
|
|
994 |
}
|
995 |
}
|
996 |
|
997 |
-
|
|
|
|
|
|
|
|
|
998 |
if ( ! function_exists( 'bws_help_tab' ) ) {
|
999 |
function bws_help_tab( $screen, $args ) {
|
1000 |
$url = ( ! empty( $args['section'] ) ) ? 'https://support.bestwebsoft.com/hc/en-us/sections/' . $args['section'] : 'https://support.bestwebsoft.com/';
|
@@ -1004,113 +1188,143 @@ if ( ! function_exists( 'bws_help_tab' ) ) {
|
|
1004 |
$screen->add_help_tab(
|
1005 |
array(
|
1006 |
'id' => $args['id'] . '_help_tab',
|
1007 |
-
'title' =>
|
1008 |
-
'content' => $content
|
1009 |
)
|
1010 |
);
|
1011 |
|
1012 |
$screen->set_help_sidebar(
|
1013 |
-
'<p><strong>' .
|
1014 |
-
'<p><a href="https://bestwebsoft.com/documentation/" target="_blank">' .
|
1015 |
-
'<p><a href="https://www.youtube.com/user/bestwebsoft/playlists?flow=grid&sort=da&view=1" target="_blank">' .
|
1016 |
-
'<p><a href="https://support.bestwebsoft.com/hc/en-us/requests/new" target="_blank">' .
|
1017 |
);
|
1018 |
}
|
1019 |
}
|
1020 |
|
|
|
|
|
|
|
|
|
|
|
1021 |
if ( ! function_exists( 'bws_enqueue_custom_code_css_js' ) ) {
|
1022 |
function bws_enqueue_custom_code_css_js() {
|
1023 |
global $bstwbsftwppdtplgns_options;
|
1024 |
|
1025 |
-
if ( ! isset( $bstwbsftwppdtplgns_options ) )
|
1026 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
|
|
1027 |
|
1028 |
if ( ! empty( $bstwbsftwppdtplgns_options['custom_code'] ) ) {
|
1029 |
$is_multisite = is_multisite();
|
1030 |
-
if ( $is_multisite )
|
1031 |
$blog_id = get_current_blog_id();
|
|
|
1032 |
|
1033 |
-
if ( ! $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.css'] ) )
|
1034 |
-
wp_enqueue_style( 'bws-custom-style', $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.css'] );
|
1035 |
-
elseif ( $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.css'] ) )
|
1036 |
-
wp_enqueue_style( 'bws-custom-style', $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.css'] );
|
|
|
1037 |
|
1038 |
-
if ( ! $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.js'] ) )
|
1039 |
-
wp_enqueue_script( 'bws-custom-style', $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.js'] );
|
1040 |
-
elseif ( $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.js'] ) )
|
1041 |
-
wp_enqueue_script( 'bws-custom-style', $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.js'] );
|
|
|
1042 |
}
|
1043 |
}
|
1044 |
}
|
1045 |
|
|
|
|
|
|
|
|
|
|
|
1046 |
if ( ! function_exists( 'bws_enqueue_custom_code_php' ) ) {
|
1047 |
function bws_enqueue_custom_code_php() {
|
1048 |
-
if ( is_admin() )
|
1049 |
return;
|
|
|
1050 |
|
1051 |
global $bstwbsftwppdtplgns_options;
|
1052 |
|
1053 |
-
if ( ! isset( $bstwbsftwppdtplgns_options ) )
|
1054 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
|
|
1055 |
|
1056 |
if ( ! empty( $bstwbsftwppdtplgns_options['custom_code'] ) ) {
|
1057 |
|
1058 |
$is_multisite = is_multisite();
|
1059 |
-
if ( $is_multisite )
|
1060 |
$blog_id = get_current_blog_id();
|
|
|
1061 |
|
1062 |
if ( ! $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.php'] ) ) {
|
1063 |
if ( file_exists( $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.php'] ) ) {
|
1064 |
-
if ( ! defined( 'BWS_GLOBAL' ) )
|
1065 |
define( 'BWS_GLOBAL', true );
|
1066 |
-
|
|
|
1067 |
} else {
|
1068 |
unset( $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.php'] );
|
1069 |
-
if ( $is_multisite )
|
1070 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1071 |
-
else
|
1072 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
|
|
1073 |
}
|
1074 |
} elseif ( $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.php'] ) ) {
|
1075 |
if ( file_exists( $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.php'] ) ) {
|
1076 |
-
if ( ! defined( 'BWS_GLOBAL' ) )
|
1077 |
define( 'BWS_GLOBAL', true );
|
1078 |
-
|
|
|
1079 |
} else {
|
1080 |
unset( $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.php'] );
|
1081 |
-
if ( $is_multisite )
|
1082 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1083 |
-
else
|
1084 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
|
|
1085 |
}
|
1086 |
}
|
1087 |
}
|
1088 |
}
|
1089 |
}
|
1090 |
|
|
|
|
|
|
|
|
|
|
|
1091 |
if ( ! function_exists( 'bws_delete_plugin' ) ) {
|
1092 |
function bws_delete_plugin( $basename ) {
|
1093 |
global $bstwbsftwppdtplgns_options;
|
1094 |
|
1095 |
$is_multisite = is_multisite();
|
1096 |
-
if ( $is_multisite )
|
1097 |
$blog_id = get_current_blog_id();
|
|
|
1098 |
|
1099 |
-
if ( ! isset( $bstwbsftwppdtplgns_options ) )
|
1100 |
$bstwbsftwppdtplgns_options = ( $is_multisite ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
|
|
1101 |
|
1102 |
/* remove bws_menu versions */
|
1103 |
unset( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $basename ] );
|
1104 |
/* remove track usage data */
|
1105 |
-
if ( isset( $bstwbsftwppdtplgns_options['bws_menu']['track_usage']['products'][ $basename ] ) )
|
1106 |
unset( $bstwbsftwppdtplgns_options['bws_menu']['track_usage']['products'][ $basename ] );
|
|
|
1107 |
/* if empty ['bws_menu']['version'] - there is no other bws plugins - delete all */
|
1108 |
if ( empty( $bstwbsftwppdtplgns_options['bws_menu']['version'] ) ) {
|
1109 |
/* remove options */
|
1110 |
-
if ( $is_multisite )
|
1111 |
delete_site_option( 'bstwbsftwppdtplgns_options' );
|
1112 |
-
else
|
1113 |
delete_option( 'bstwbsftwppdtplgns_options' );
|
|
|
1114 |
|
1115 |
/* remove custom_code */
|
1116 |
if ( $is_multisite ) {
|
@@ -1121,7 +1335,7 @@ if ( ! function_exists( 'bws_delete_plugin' ) ) {
|
|
1121 |
foreach ( $blogids as $blog_id ) {
|
1122 |
switch_to_blog( $blog_id );
|
1123 |
$upload_dir = wp_upload_dir();
|
1124 |
-
$folder
|
1125 |
if ( file_exists( $folder ) && is_dir( $folder ) ) {
|
1126 |
array_map( 'unlink', glob( "$folder/*" ) );
|
1127 |
rmdir( $folder );
|
@@ -1130,7 +1344,7 @@ if ( ! function_exists( 'bws_delete_plugin' ) ) {
|
|
1130 |
switch_to_blog( $old_blog );
|
1131 |
} else {
|
1132 |
$upload_dir = wp_upload_dir();
|
1133 |
-
$folder
|
1134 |
if ( file_exists( $folder ) && is_dir( $folder ) ) {
|
1135 |
array_map( 'unlink', glob( "$folder/*" ) );
|
1136 |
rmdir( $folder );
|
@@ -1143,7 +1357,7 @@ if ( ! function_exists( 'bws_delete_plugin' ) ) {
|
|
1143 |
add_action( 'admin_init', 'bws_plugins_admin_init' );
|
1144 |
add_action( 'admin_enqueue_scripts', 'bws_admin_enqueue_scripts' );
|
1145 |
add_action( 'admin_head', 'bws_plugins_admin_head' );
|
1146 |
-
add_action( 'admin_footer','bws_plugins_admin_footer' );
|
1147 |
|
1148 |
add_action( 'admin_notices', 'bws_admin_notices', 30 );
|
1149 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* @package BWS Menu
|
4 |
+
* @version 2.4.2
|
5 |
+
* Main functions
|
6 |
+
*/
|
|
|
7 |
|
8 |
/**
|
9 |
+
* General functions for BestWebSoft plugins
|
|
|
|
|
10 |
*/
|
11 |
+
require dirname( __FILE__ ) . '/deprecated.php';
|
12 |
+
require_once dirname( __FILE__ ) . '/deactivation-form.php';
|
13 |
+
|
14 |
+
|
15 |
+
if ( ! function_exists( 'bws_get_mofile' ) ) {
|
16 |
+
/**
|
17 |
+
* Function to add 'bestwebsoft' slug for BWS_Menu MO file if BWS_Menu loaded from theme.
|
18 |
+
*
|
19 |
+
* @since 1.9.7
|
20 |
+
*/
|
21 |
function bws_get_mofile( $mofile, $domain ) {
|
22 |
+
if ( 'bestwebsoft' === $domain ) {
|
23 |
$locale = get_locale();
|
24 |
return str_replace( $locale, "bestwebsoft-{$locale}", $mofile );
|
25 |
}
|
28 |
}
|
29 |
}
|
30 |
|
31 |
+
/**
|
32 |
+
* Internationalization, first(!)
|
33 |
+
*
|
34 |
+
* @since 1.9.7
|
35 |
+
*/
|
36 |
+
if ( isset( $bws_menu_source ) && 'themes' === $bws_menu_source ) {
|
37 |
add_filter( 'load_textdomain_mofile', 'bws_get_mofile', 10, 2 );
|
38 |
load_theme_textdomain( 'bestwebsoft', get_stylesheet_directory() . '/inc/bws_menu/languages' );
|
39 |
remove_filter( 'load_textdomain_mofile', 'bws_get_mofile' );
|
46 |
*
|
47 |
* @since 1.9.7
|
48 |
*/
|
49 |
+
if ( ! function_exists( 'bws_menu_url' ) ) {
|
50 |
+
if ( ! isset( $bws_menu_source ) || 'plugins' === $bws_menu_source ) {
|
51 |
function bws_menu_url( $path = '' ) {
|
52 |
return plugins_url( $path, __FILE__ );
|
53 |
}
|
54 |
} else {
|
55 |
function bws_menu_url( $path = '' ) {
|
56 |
$bws_menu_current_dir = str_replace( '\\', '/', dirname( __FILE__ ) );
|
57 |
+
$bws_menu_abspath = str_replace( '\\', '/', ABSPATH );
|
58 |
$bws_menu_current_url = site_url( str_replace( $bws_menu_abspath, '', $bws_menu_current_dir ) );
|
59 |
|
60 |
return sprintf( '%s/%s', $bws_menu_current_url, $path );
|
63 |
}
|
64 |
|
65 |
/**
|
66 |
+
* Function check if plugin is compatible with current WP version
|
67 |
+
*
|
68 |
+
* @return void
|
69 |
+
*/
|
70 |
if ( ! function_exists( 'bws_wp_min_version_check' ) ) {
|
71 |
function bws_wp_min_version_check( $plugin_basename, $plugin_info, $require_wp, $min_wp = false ) {
|
72 |
global $wp_version, $bws_versions_notice_array;
|
73 |
+
if ( false === $min_wp ) {
|
74 |
$min_wp = $require_wp;
|
75 |
+
}
|
76 |
+
if ( version_compare( $wp_version, $min_wp, '<' ) ) {
|
77 |
+
include_once ABSPATH . 'wp-admin/includes/plugin.php';
|
78 |
if ( is_plugin_active( $plugin_basename ) ) {
|
79 |
deactivate_plugins( $plugin_basename );
|
80 |
$admin_url = ( function_exists( 'get_admin_url' ) ) ? get_admin_url( null, 'plugins.php' ) : esc_url( '/wp-admin/plugins.php' );
|
81 |
wp_die(
|
82 |
sprintf(
|
83 |
"<strong>%s</strong> %s <strong>WordPress %s</strong> %s <br /><br />%s <a href='%s'>%s</a>.",
|
84 |
+
esc_html( $plugin_info['Name'] ),
|
85 |
+
esc_html__( 'requires', 'bestwebsoft' ),
|
86 |
+
esc_html( $require_wp ),
|
87 |
+
esc_html__( 'or higher, that is why it has been deactivated! Please upgrade WordPress and try again.', 'bestwebsoft' ),
|
88 |
+
esc_html__( 'Back to the WordPress', 'bestwebsoft' ),
|
89 |
+
esc_url( $admin_url ),
|
90 |
+
esc_html__( 'Plugins page', 'bestwebsoft' )
|
91 |
)
|
92 |
);
|
93 |
}
|
94 |
+
} elseif ( version_compare( $wp_version, $require_wp, '<' ) ) {
|
95 |
+
$bws_versions_notice_array[] = array(
|
96 |
+
'name' => $plugin_info['Name'],
|
97 |
+
'version' => $require_wp,
|
98 |
+
);
|
99 |
}
|
100 |
}
|
101 |
}
|
102 |
|
103 |
+
/**
|
104 |
+
* Function display review block
|
105 |
+
*
|
106 |
+
* @echo string
|
107 |
+
*/
|
108 |
if ( ! function_exists( 'bws_plugin_reviews_block' ) ) {
|
109 |
function bws_plugin_reviews_block( $plugin_name, $plugin_slug ) { ?>
|
110 |
<div class="bws-plugin-reviews">
|
111 |
<div class="bws-plugin-reviews-rate">
|
112 |
+
<?php esc_html_e( 'Like the plugin?', 'bestwebsoft' ); ?>
|
113 |
+
<a href="https://wordpress.org/support/view/plugin-reviews/<?php echo esc_attr( $plugin_slug ); ?>?filter=5" target="_blank" title="<?php printf( esc_html__( '%s reviews', 'bestwebsoft' ), esc_html( sanitize_text_field( $plugin_name ) ) ); ?>">
|
114 |
+
<?php esc_html_e( 'Rate it', 'bestwebsoft' ); ?>
|
115 |
<span class="dashicons dashicons-star-filled"></span>
|
116 |
<span class="dashicons dashicons-star-filled"></span>
|
117 |
<span class="dashicons dashicons-star-filled"></span>
|
120 |
</a>
|
121 |
</div>
|
122 |
<div class="bws-plugin-reviews-support">
|
123 |
+
<?php esc_html_e( 'Need help?', 'bestwebsoft' ); ?>
|
124 |
+
<a href="https://support.bestwebsoft.com"><?php esc_html_e( 'Visit Help Center', 'bestwebsoft' ); ?></a>
|
125 |
</div>
|
126 |
<div class="bws-plugin-reviews-donate">
|
127 |
+
<?php esc_html_e( 'Want to support the plugin?', 'bestwebsoft' ); ?>
|
128 |
+
<a href="https://bestwebsoft.com/donate/"><?php esc_html_e( 'Donate', 'bestwebsoft' ); ?></a>
|
129 |
</div>
|
130 |
</div>
|
131 |
+
<?php
|
132 |
+
}
|
133 |
}
|
134 |
|
135 |
+
/**
|
136 |
+
* Function display license notification
|
137 |
+
*
|
138 |
+
* @echo string
|
139 |
+
*/
|
140 |
+
if ( ! function_exists( 'bws_plugin_update_row' ) ) {
|
141 |
function bws_plugin_update_row( $plugin_key, $link_slug = false, $free_plugin_name = false ) {
|
142 |
global $bstwbsftwppdtplgns_options, $wp_version;
|
143 |
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
144 |
if ( isset( $bstwbsftwppdtplgns_options['wrong_license_key'][ $plugin_key ] ) ) {
|
145 |
$explode_plugin_key = explode( '/', $plugin_key );
|
146 |
+
$class = ( $wp_version >= 4.6 ) ? 'active' : '';
|
147 |
+
$style = ( $wp_version < 4.6 ) ? ' style="background-color: #FFEBE8;border-color: #CC0000;"' : '';
|
148 |
+
$div_class = ( $wp_version >= 4.6 ) ? ' notice inline notice-warning notice-alt' : '';
|
149 |
+
echo '<tr class="bws-plugin-update-tr plugin-update-tr ' . esc_attr( $class ) . '" id="' . esc_attr( $explode_plugin_key[0] ) . '-update" data-slug="' . esc_attr( $explode_plugin_key[0] ) . '" data-plugin="' . esc_attr( $plugin_key ) . '">
|
150 |
<td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange">
|
151 |
+
<div class="update-message' . esc_attr( $div_class ) . '"' . wp_kses_post( $style ) . '>';
|
152 |
+
if ( $wp_version >= 4.6 ) {
|
153 |
+
echo '<p>';
|
154 |
+
}
|
155 |
+
echo '<strong>' . esc_html__( 'WARNING: Illegal use notification', 'bestwebsoft' ) . '.</strong> ' . esc_html__( 'You can use one license of the Pro plugin for one domain only. Please check and edit your license or domain if necessary using your personal Client Area. We strongly recommend you to solve the problem within 24 hours, otherwise the Pro plugin will be deactivated.', 'bestwebsoft' ) . ' <a target="_blank" href="https://support.bestwebsoft.com/hc/en-us/articles/204240089">' . esc_html__( 'Learn More', 'bestwebsoft' ) . '</a>';
|
156 |
+
if ( $wp_version >= 4.6 ) {
|
157 |
+
echo '</p>';
|
158 |
+
}
|
159 |
echo '</div>
|
160 |
</td>
|
161 |
</tr>';
|
162 |
+
} elseif ( isset( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) && strtotime( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) < strtotime( gmdate( 'm/d/Y' ) ) ) {
|
163 |
$explode_plugin_key = explode( '/', $plugin_key );
|
164 |
+
$class = ( $wp_version >= 4.6 ) ? 'active' : '';
|
165 |
+
$style = ( $wp_version < 4.6 ) ? ' style="color: #8C0000;"' : '';
|
166 |
+
$div_class = ( $wp_version >= 4.6 ) ? ' notice inline notice-warning notice-alt' : '';
|
167 |
+
echo '<tr class="bws-plugin-update-tr plugin-update-tr ' . esc_attr( $class ) . '" id="' . esc_attr( $explode_plugin_key[0] ) . '-update" data-slug="' . esc_attr( $explode_plugin_key[0] ) . '" data-plugin="' . esc_attr( $plugin_key ) . '">
|
168 |
<td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange">
|
169 |
+
<div class="update-message' . esc_attr( $div_class ) . '"' . wp_kses_post( $style ) . '>';
|
170 |
+
if ( $wp_version >= 4.6 ) {
|
171 |
+
echo '<p>';
|
172 |
+
}
|
173 |
+
if ( isset( $bstwbsftwppdtplgns_options['trial'][ $plugin_key ] ) && false !== $link_slug ) {
|
174 |
+
echo esc_html__( 'Notice: Your Pro Trial license has expired. To continue using the plugin, you should buy a Pro license', 'bestwebsoft' ) . ' - <a href="https://bestwebsoft.com/products/wordpress/plugins/' . esc_attr( $link_slug ) . '/">https://bestwebsoft.com/products/wordpress/plugins/' . esc_attr( $link_slug ) . '/</a>';
|
175 |
+
} else {
|
176 |
+
echo esc_html__( 'Your license has expired. To continue getting top-priority support and plugin updates, you should extend it.', 'bestwebsoft' ) . ' <a target="_new" href="https://support.bestwebsoft.com/entries/53487136">' . esc_html__( 'Learn more', 'bestwebsoft' ) . '</a>';
|
177 |
+
}
|
178 |
+
if ( $wp_version >= 4.6 ) {
|
179 |
+
echo '</p>';
|
180 |
+
}
|
181 |
+
echo '</div>
|
182 |
</td>
|
183 |
</tr>';
|
184 |
} elseif ( isset( $bstwbsftwppdtplgns_options['trial'][ $plugin_key ] ) ) {
|
185 |
$explode_plugin_key = explode( '/', $plugin_key );
|
186 |
+
$class = ( $wp_version >= 4.6 ) ? 'active' : '';
|
187 |
+
$style = ( $wp_version < 4.6 ) ? ' style="color: #8C0000;"' : '';
|
188 |
+
$div_class = ( $wp_version >= 4.6 ) ? ' notice inline notice-warning notice-alt' : '';
|
189 |
+
echo '<tr class="bws-plugin-update-tr plugin-update-tr ' . esc_attr( $class ) . '" id="' . esc_attr( $explode_plugin_key[0] ) . '-update" data-slug="' . esc_attr( $explode_plugin_key[0] ) . '" data-plugin="' . esc_attr( $plugin_key ) . '">
|
190 |
<td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange">
|
191 |
+
<div class="update-message' . esc_attr( $div_class ) . '"' . wp_kses_post( $style ) . '>';
|
192 |
+
if ( $wp_version >= 4.6 ) {
|
193 |
+
echo '<p>';
|
194 |
+
}
|
195 |
+
if ( false !== $free_plugin_name ) {
|
196 |
+
printf( esc_html__( 'Notice: You are using the Pro Trial license of %s plugin.', 'bestwebsoft' ), esc_html( $free_plugin_name ) );
|
197 |
+
} else {
|
198 |
+
esc_html_e( 'Notice: You are using the Pro Trial license of plugin.', 'bestwebsoft' );
|
199 |
+
}
|
200 |
+
if ( isset( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) ) {
|
201 |
+
echo ' ' . esc_html__( 'The Pro Trial license will expire on', 'bestwebsoft' ) . ' ' . esc_html( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) . '.';
|
202 |
+
}
|
203 |
+
if ( $wp_version >= 4.6 ) {
|
204 |
+
echo '</p>';
|
205 |
+
}
|
206 |
echo '</div>
|
207 |
</td>
|
208 |
</tr>';
|
210 |
}
|
211 |
}
|
212 |
|
213 |
+
/**
|
214 |
+
* Function display admin notices
|
215 |
+
*
|
216 |
+
* @echo string
|
217 |
+
*/
|
218 |
if ( ! function_exists( 'bws_admin_notices' ) ) {
|
219 |
function bws_admin_notices() {
|
220 |
global $bws_versions_notice_array, $bws_plugin_banner_to_settings, $bstwbsftwppdtplgns_options, $bws_plugin_banner_go_pro, $bstwbsftwppdtplgns_banner_array, $bws_plugin_banner_timeout;
|
222 |
/* bws_plugin_banner_go_pro */
|
223 |
if ( ! empty( $bws_plugin_banner_go_pro ) ) {
|
224 |
/* get $bws_plugins */
|
225 |
+
require dirname( __FILE__ ) . '/product_list.php';
|
226 |
+
|
227 |
foreach ( $bstwbsftwppdtplgns_banner_array as $value ) {
|
228 |
if ( isset( $bws_plugin_banner_go_pro[ $value[0] ] ) && ! isset( $_COOKIE[ $value[0] ] ) ) {
|
229 |
|
231 |
continue;
|
232 |
}
|
233 |
|
234 |
+
$single_banner_value = $bws_plugin_banner_go_pro[ $value[0] ];
|
235 |
+
?>
|
236 |
<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
237 |
+
<div class="<?php echo esc_attr( $single_banner_value['prefix'] ); ?>_message bws_banner_on_plugin_page bws_go_pro_banner" style="display: none;">
|
238 |
+
<button class="<?php echo esc_attr( $single_banner_value['prefix'] ); ?>_close_icon close_icon notice-dismiss bws_hide_settings_notice" title="<?php esc_html_e( 'Close notice', 'bestwebsoft' ); ?>"></button>
|
239 |
<div class="icon">
|
240 |
<img title="" src="<?php echo esc_attr( $single_banner_value['banner_url'] ); ?>" alt="" />
|
241 |
</div>
|
242 |
<div class="text">
|
243 |
+
<?php esc_html_e( 'It’s time to upgrade your', 'bestwebsoft' ); ?> <strong><?php echo esc_html( $single_banner_value['plugin_info']['Name'] ); ?> plugin</strong> <?php esc_html_e( 'to', 'bestwebsoft' ); ?> <strong>Pro</strong> <?php esc_html_e( 'version!', 'bestwebsoft' ); ?><br />
|
244 |
+
<span><?php esc_html_e( 'Extend standard plugin functionality with new great options.', 'bestwebsoft' ); ?></span>
|
245 |
</div>
|
246 |
<div class="button_div">
|
247 |
+
<a class="button" target="_blank" href="<?php echo esc_url( $single_banner_value['bws_link'] ); ?>"><?php esc_html_e( 'Learn More', 'bestwebsoft' ); ?></a>
|
248 |
</div>
|
249 |
</div>
|
250 |
</div>
|
251 |
+
<?php
|
252 |
+
break;
|
253 |
}
|
254 |
}
|
255 |
}
|
256 |
|
257 |
/* $bws_plugin_banner_timeout */
|
258 |
if ( ! empty( $bws_plugin_banner_timeout ) ) {
|
259 |
+
foreach ( $bws_plugin_banner_timeout as $banner_value ) {
|
260 |
+
?>
|
261 |
<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
262 |
+
<div class="<?php echo esc_attr( $banner_value['prefix'] ); ?>_message_timeout bws_banner_on_plugin_page bws_banner_timeout" style="display:none;">
|
263 |
+
<button class="<?php echo esc_attr( $banner_value['prefix'] ); ?>_close_icon close_icon notice-dismiss bws_hide_settings_notice" title="<?php esc_html_e( 'Close notice', 'bestwebsoft' ); ?>"></button>
|
264 |
<div class="icon">
|
265 |
+
<img title="" src="<?php echo esc_url( $banner_value['banner_url'] ); ?>" alt="" />
|
266 |
</div>
|
267 |
+
<div class="text"><?php printf( esc_html__( "Your license key for %1\$s expires on %2\$s and you won't be granted TOP-PRIORITY SUPPORT or UPDATES.", 'bestwebsoft' ), '<strong>' . esc_html__( $banner_value['plugin_name'] ) . '</strong>', esc_html__( $bstwbsftwppdtplgns_options['time_out'][ $banner_value['plugin_key'] ] ) ); ?> <a target="_new" href="https://support.bestwebsoft.com/entries/53487136"><?php esc_html_e( 'Learn more', 'bestwebsoft' ); ?></a></div>
|
268 |
</div>
|
269 |
</div>
|
270 |
+
<?php
|
271 |
+
}
|
272 |
}
|
273 |
|
274 |
/* versions notice */
|
275 |
if ( ! empty( $bws_versions_notice_array ) ) {
|
276 |
+
foreach ( $bws_versions_notice_array as $key => $value ) {
|
277 |
+
?>
|
278 |
<div class="update-nag">
|
279 |
+
<?php
|
280 |
+
printf(
|
281 |
+
'<strong>%s</strong> %s <strong>WordPress %s</strong> %s',
|
282 |
+
esc_html__( $value['name'] ),
|
283 |
+
esc_html__( 'requires', 'bestwebsoft' ),
|
284 |
+
esc_html__( $value['version'] ),
|
285 |
+
esc_html__( 'or higher! We do not guarantee that our plugin will work correctly. Please upgrade to WordPress latest version.', 'bestwebsoft' )
|
286 |
+
);
|
287 |
+
?>
|
288 |
</div>
|
289 |
+
<?php
|
290 |
+
}
|
291 |
}
|
292 |
|
293 |
/* banner_to_settings notice */
|
294 |
if ( ! empty( $bws_plugin_banner_to_settings ) ) {
|
295 |
+
if ( 1 === count( $bws_plugin_banner_to_settings ) ) {
|
296 |
+
?>
|
297 |
<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
298 |
<div class="bws_banner_on_plugin_page bws_banner_to_settings">
|
299 |
<div class="icon">
|
300 |
+
<img title="" src="<?php echo esc_url( $bws_plugin_banner_to_settings[0]['banner_url'] ); ?>" alt="" />
|
301 |
</div>
|
302 |
<div class="text">
|
303 |
+
<strong><?php printf( esc_html__( 'Thank you for installing %s plugin!', 'bestwebsoft' ), esc_html( $bws_plugin_banner_to_settings[0]['plugin_info']['Name'] ) ); ?></strong>
|
304 |
<br />
|
305 |
+
<?php esc_html_e( "Let's get started", 'bestwebsoft' ); ?>:
|
306 |
+
<a href="<?php echo esc_url( self_admin_url( $bws_plugin_banner_to_settings[0]['settings_url'] ) ); ?>"><?php esc_html_e( 'Settings', 'bestwebsoft' ); ?></a>
|
307 |
+
<?php if ( false !== $bws_plugin_banner_to_settings[0]['post_type_url'] ) { ?>
|
308 |
+
<?php esc_html_e( 'or', 'bestwebsoft' ); ?>
|
309 |
+
<a href="<?php echo esc_url( self_admin_url( $bws_plugin_banner_to_settings[0]['post_type_url'] ) ); ?>"><?php esc_html_e( 'Add New', 'bestwebsoft' ); ?></a>
|
310 |
<?php } ?>
|
311 |
</div>
|
312 |
<form action="" method="post">
|
313 |
+
<button class="notice-dismiss bws_hide_settings_notice" title="<?php esc_html_e( 'Close notice', 'bestwebsoft' ); ?>"></button>
|
314 |
+
<input type="hidden" name="bws_hide_settings_notice_<?php echo esc_html( $bws_plugin_banner_to_settings[0]['plugin_options_name'] ); ?>" value="hide" />
|
315 |
<?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_settings_nonce_name' ); ?>
|
316 |
</form>
|
317 |
</div>
|
320 |
<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
321 |
<div class="bws_banner_on_plugin_page bws_banner_to_settings_joint">
|
322 |
<form action="" method="post">
|
323 |
+
<button class="notice-dismiss bws_hide_settings_notice" title="<?php esc_html_e( 'Close notice', 'bestwebsoft' ); ?>"></button>
|
324 |
<div class="bws-text">
|
325 |
<div class="icon">
|
326 |
<span class="dashicons dashicons-admin-plugins"></span>
|
327 |
</div>
|
328 |
+
<strong><?php esc_html_e( 'Thank you for installing plugins by BestWebSoft!', 'bestwebsoft' ); ?></strong>
|
329 |
<div class="hide-if-no-js bws-more-links">
|
330 |
+
<a href="#" class="bws-more"><?php esc_html_e( 'More Details', 'bestwebsoft' ); ?></a>
|
331 |
+
<a href="#" class="bws-less hidden"><?php esc_html_e( 'Less Details', 'bestwebsoft' ); ?></a>
|
332 |
</div>
|
333 |
<?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_settings_nonce_name' ); ?>
|
334 |
<div class="clear"></div>
|
336 |
<div class="bws-details hide-if-js">
|
337 |
<?php foreach ( $bws_plugin_banner_to_settings as $value ) { ?>
|
338 |
<div>
|
339 |
+
<strong><?php echo esc_html( str_replace( ' by BestWebSoft', '', $value['plugin_info']['Name'] ) ); ?></strong> <a href="<?php echo esc_url( self_admin_url( $value['settings_url'] ) ); ?>"><?php esc_html_e( 'Settings', 'bestwebsoft' ); ?></a>
|
340 |
+
<?php if ( false !== $value['post_type_url'] ) { ?>
|
341 |
+
 | <a target="_blank" href="<?php echo esc_url( self_admin_url( $value['post_type_url'] ) ); ?>"><?php esc_html_e( 'Add New', 'bestwebsoft' ); ?></a>
|
342 |
<?php } ?>
|
343 |
+
<input type="hidden" name="bws_hide_settings_notice_<?php echo esc_html( $value['plugin_options_name'] ); ?>" value="hide" />
|
344 |
</div>
|
345 |
<?php } ?>
|
346 |
</div>
|
347 |
</div>
|
348 |
</form>
|
349 |
</div>
|
350 |
+
<?php
|
351 |
+
}
|
352 |
}
|
353 |
|
354 |
/**
|
355 |
+
* Show notices about deprecated_function
|
356 |
+
*
|
357 |
* @since 1.9.8
|
358 |
*/
|
359 |
+
if ( ! empty( $bstwbsftwppdtplgns_options['deprecated_function'] ) ) {
|
360 |
+
?>
|
361 |
<div class="update-nag">
|
362 |
+
<strong><?php esc_html_e( 'Deprecated function(-s) is used on the site here:', 'bestwebsoft' ); ?></strong>
|
363 |
+
<?php
|
364 |
+
$i = 1;
|
365 |
foreach ( $bstwbsftwppdtplgns_options['deprecated_function'] as $function_name => $attr ) {
|
366 |
+
if ( 1 !== $i ) {
|
367 |
echo ' ,';
|
368 |
+
}
|
369 |
if ( ! empty( $attr['product-name'] ) ) {
|
370 |
+
echo esc_html( $attr['product-name'] );
|
371 |
} elseif ( ! empty( $attr['file'] ) ) {
|
372 |
+
echo esc_url( $attr['file'] );
|
373 |
}
|
374 |
unset( $bstwbsftwppdtplgns_options['deprecated_function'][ $function_name ] );
|
375 |
$i++;
|
376 |
+
}
|
377 |
+
?>
|
378 |
+
.
|
379 |
<br/>
|
380 |
+
<?php esc_html_e( 'This function(-s) will be removed over time. Please update the product(-s).', 'bestwebsoft' ); ?>
|
381 |
</div>
|
382 |
+
<?php
|
383 |
+
if ( is_multisite() ) {
|
384 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
385 |
+
} else {
|
386 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
387 |
+
}
|
388 |
}
|
389 |
}
|
390 |
}
|
391 |
|
392 |
+
/**
|
393 |
+
* Function display banner
|
394 |
+
*
|
395 |
+
* @return array
|
396 |
+
*/
|
397 |
if ( ! function_exists( 'bws_plugin_banner_go_pro' ) ) {
|
398 |
function bws_plugin_banner_go_pro( $plugin_options, $plugin_info, $this_banner_prefix, $bws_link_slug, $link_key, $link_pn, $banner_url_or_slug ) {
|
399 |
global $bws_plugin_banner_go_pro, $wp_version, $bstwbsftwppdtplgns_banner_array;
|
400 |
|
401 |
+
if ( ! isset( $plugin_options['first_install'] ) || strtotime( '-1 week' ) < $plugin_options['first_install'] ) {
|
402 |
return;
|
403 |
+
}
|
404 |
|
405 |
+
$bws_link = esc_url( 'https://bestwebsoft.com/products/wordpress/plugins/' . $bws_link_slug . '/?k=' . $link_key . '&pn=' . $link_pn . '&v=' . $plugin_info['Version'] . '&wp_v=' . $wp_version );
|
406 |
|
407 |
+
if ( false === strrpos( $banner_url_or_slug, '/' ) ) {
|
408 |
$banner_url_or_slug = '//ps.w.org/' . $banner_url_or_slug . '/assets/icon-256x256.png';
|
409 |
}
|
410 |
|
411 |
$bws_plugin_banner_go_pro[ $this_banner_prefix . '_hide_banner_on_plugin_page' ] = array(
|
412 |
+
'plugin_info' => $plugin_info,
|
413 |
+
'prefix' => $this_banner_prefix,
|
414 |
+
'bws_link' => $bws_link,
|
415 |
+
'banner_url' => $banner_url_or_slug,
|
416 |
);
|
417 |
|
418 |
if ( empty( $bstwbsftwppdtplgns_banner_array ) ) {
|
419 |
+
if ( ! function_exists( 'bws_get_banner_array' ) ) {
|
420 |
+
require_once dirname( __FILE__ ) . '/bws_menu.php';
|
421 |
+
}
|
422 |
bws_get_banner_array();
|
423 |
}
|
424 |
}
|
425 |
}
|
426 |
|
427 |
+
/**
|
428 |
+
* Function update banner params
|
429 |
+
*
|
430 |
+
* @return global array
|
431 |
+
*/
|
432 |
if ( ! function_exists( 'bws_add_plugin_banner_timeout' ) ) {
|
433 |
function bws_add_plugin_banner_timeout( $plugin_key, $plugin_prefix, $plugin_name, $banner_url_or_slug ) {
|
434 |
global $bws_plugin_banner_timeout;
|
435 |
|
436 |
+
if ( isset( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) && ( strtotime( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) < strtotime( gmdate( 'm/d/Y' ) . '+1 month' ) ) && ( strtotime( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) > strtotime( gmdate( 'm/d/Y' ) ) ) ) {
|
437 |
|
438 |
+
if ( false === strrpos( $banner_url_or_slug, '/' ) ) {
|
439 |
$banner_url_or_slug = '//ps.w.org/' . $banner_url_or_slug . '/assets/icon-256x256.png';
|
440 |
}
|
441 |
|
442 |
$bws_plugin_banner_timeout[] = array(
|
443 |
+
'plugin_key' => $plugin_key,
|
444 |
+
'prefix' => $plugin_prefix,
|
445 |
+
'plugin_name' => $plugin_name,
|
446 |
+
'banner_url' => $banner_url_or_slug,
|
447 |
);
|
448 |
}
|
449 |
}
|
450 |
}
|
451 |
|
452 |
+
/**
|
453 |
+
* Function settings for banner
|
454 |
+
*
|
455 |
+
* @return global array
|
456 |
+
*/
|
457 |
if ( ! function_exists( 'bws_plugin_banner_to_settings' ) ) {
|
458 |
function bws_plugin_banner_to_settings( $plugin_info, $plugin_options_name, $banner_url_or_slug, $settings_url, $post_type_url = false ) {
|
459 |
global $bws_plugin_banner_to_settings;
|
462 |
|
463 |
$plugin_options = $is_network_admin ? get_site_option( $plugin_options_name ) : get_option( $plugin_options_name );
|
464 |
|
465 |
+
if ( isset( $plugin_options['display_settings_notice'] ) && 0 === $plugin_options['display_settings_notice'] ) {
|
466 |
return;
|
467 |
+
}
|
468 |
|
469 |
+
if ( isset( $_POST[ 'bws_hide_settings_notice_' . $plugin_options_name ] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_settings_nonce_name' ) ) {
|
470 |
$plugin_options['display_settings_notice'] = 0;
|
471 |
+
if ( $is_network_admin ) {
|
472 |
update_site_option( $plugin_options_name, $plugin_options );
|
473 |
+
} else {
|
474 |
update_option( $plugin_options_name, $plugin_options );
|
475 |
+
}
|
476 |
return;
|
477 |
}
|
478 |
|
479 |
+
if ( false === strrpos( $banner_url_or_slug, '/' ) ) {
|
480 |
$banner_url_or_slug = '//ps.w.org/' . $banner_url_or_slug . '/assets/icon-256x256.png';
|
481 |
}
|
482 |
|
483 |
$bws_plugin_banner_to_settings[] = array(
|
484 |
+
'plugin_info' => $plugin_info,
|
485 |
+
'plugin_options_name' => $plugin_options_name,
|
486 |
+
'banner_url' => $banner_url_or_slug,
|
487 |
+
'settings_url' => $settings_url,
|
488 |
+
'post_type_url' => $post_type_url,
|
489 |
);
|
490 |
}
|
491 |
}
|
492 |
|
493 |
+
/**
|
494 |
+
* Function display for feature banner
|
495 |
+
*
|
496 |
+
* @echo string
|
497 |
+
*/
|
498 |
if ( ! function_exists( 'bws_plugin_suggest_feature_banner' ) ) {
|
499 |
function bws_plugin_suggest_feature_banner( $plugin_info, $plugin_options_name, $banner_url_or_slug ) {
|
500 |
$is_network_admin = is_network_admin();
|
501 |
|
502 |
$plugin_options = $is_network_admin ? get_site_option( $plugin_options_name ) : get_option( $plugin_options_name );
|
503 |
|
504 |
+
if ( isset( $plugin_options['display_suggest_feature_banner'] ) && 0 === $plugin_options['display_suggest_feature_banner'] ) {
|
505 |
return;
|
506 |
+
}
|
507 |
|
508 |
if ( ! isset( $plugin_options['first_install'] ) ) {
|
509 |
+
$plugin_options['first_install'] = strtotime( 'now' );
|
510 |
+
$update_option = $return = true;
|
511 |
} elseif ( strtotime( '-2 week' ) < $plugin_options['first_install'] ) {
|
512 |
$return = true;
|
513 |
}
|
514 |
|
515 |
if ( ! isset( $plugin_options['go_settings_counter'] ) ) {
|
516 |
$plugin_options['go_settings_counter'] = 1;
|
517 |
+
$update_option = $return = true;
|
518 |
} elseif ( 20 > $plugin_options['go_settings_counter'] ) {
|
519 |
$plugin_options['go_settings_counter'] = $plugin_options['go_settings_counter'] + 1;
|
520 |
+
$update_option = $return = true;
|
521 |
}
|
522 |
|
523 |
if ( isset( $update_option ) ) {
|
524 |
+
if ( $is_network_admin ) {
|
525 |
update_site_option( $plugin_options_name, $plugin_options );
|
526 |
+
} else {
|
527 |
update_option( $plugin_options_name, $plugin_options );
|
528 |
+
}
|
529 |
}
|
530 |
|
531 |
+
if ( isset( $return ) ) {
|
532 |
return;
|
533 |
+
}
|
534 |
|
535 |
+
if ( isset( $_POST[ 'bws_hide_suggest_feature_banner_' . $plugin_options_name ] ) && check_admin_referer( $plugin_info['Name'], 'bws_settings_nonce_name' ) ) {
|
536 |
$plugin_options['display_suggest_feature_banner'] = 0;
|
537 |
+
if ( $is_network_admin ) {
|
538 |
update_site_option( $plugin_options_name, $plugin_options );
|
539 |
+
} else {
|
540 |
update_option( $plugin_options_name, $plugin_options );
|
541 |
+
}
|
542 |
return;
|
543 |
}
|
544 |
|
545 |
+
if ( false === strrpos( $banner_url_or_slug, '/' ) ) {
|
546 |
$banner_url_or_slug = '//ps.w.org/' . $banner_url_or_slug . '/assets/icon-256x256.png';
|
547 |
+
}
|
548 |
+
?>
|
549 |
<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
550 |
<div class="bws_banner_on_plugin_page bws_suggest_feature_banner">
|
551 |
<div class="icon">
|
552 |
+
<img title="" src="<?php echo esc_url( $banner_url_or_slug ); ?>" alt="" />
|
553 |
</div>
|
554 |
<div class="text">
|
555 |
+
<strong><?php printf( esc_html__( 'Thank you for choosing %s plugin!', 'bestwebsoft' ), esc_html( $plugin_info['Name'] ) ); ?></strong><br />
|
556 |
+
<?php esc_html_e( "If you have a feature, suggestion or idea you'd like to see in the plugin, we'd love to hear about it!", 'bestwebsoft' ); ?>
|
557 |
+
<a target="_blank" href="https://support.bestwebsoft.com/hc/en-us/requests/new"><?php esc_html_e( 'Suggest a Feature', 'bestwebsoft' ); ?></a>
|
558 |
</div>
|
559 |
<form action="" method="post">
|
560 |
+
<button class="notice-dismiss bws_hide_settings_notice" title="<?php esc_html_e( 'Close notice', 'bestwebsoft' ); ?>"></button>
|
561 |
+
<input type="hidden" name="bws_hide_suggest_feature_banner_<?php echo esc_html( $plugin_options_name ); ?>" value="hide" />
|
562 |
<?php wp_nonce_field( $plugin_info['Name'], 'bws_settings_nonce_name' ); ?>
|
563 |
</form>
|
564 |
</div>
|
565 |
</div>
|
566 |
+
<?php
|
567 |
+
}
|
568 |
}
|
569 |
|
570 |
+
/**
|
571 |
+
* Function display affiliate postbox
|
572 |
+
*
|
573 |
+
* @echo string
|
574 |
+
*/
|
575 |
if ( ! function_exists( 'bws_affiliate_postbox' ) ) {
|
576 |
function bws_affiliate_postbox() {
|
577 |
|
581 |
return;
|
582 |
}
|
583 |
|
584 |
+
if ( isset( $_POST['bws_hide_affiliate_banner'] ) && check_admin_referer( 'bws_affiliate_postbox', 'bws_settings_nonce_name' ) ) {
|
585 |
update_user_meta( get_current_user_id(), '_bws_affiliate_postbox_dismissed', strtotime( 'now' ) );
|
586 |
return;
|
587 |
}
|
588 |
|
589 |
+
$bws_link = esc_url( 'https://bestwebsoft.com/affiliate/?utm_source=plugin&utm_medium=settings&utm_campaign=affiliate_program' );
|
590 |
+
?>
|
591 |
<div id="bws-affiliate-postbox" class="postbox">
|
592 |
<form action="" method="post">
|
593 |
<button class="notice-dismiss bws_hide_settings_notice" title="<?php esc_html_e( 'Close notice', 'bestwebsoft' ); ?>"></button>
|
600 |
<div><?php esc_html_e( 'from each BestWebSoft plugin and theme sale you refer', 'bestwebsoft' ); ?></div>
|
601 |
<div class="bws-row">
|
602 |
<div class="bws-cell">
|
603 |
+
<img src="<?php echo esc_url( bws_menu_url( 'images/join-icon.svg' ) ); ?>" alt="" />
|
604 |
<div><?php esc_html_e( 'Join affiliate program', 'bestwebsoft' ); ?></div>
|
605 |
</div>
|
606 |
<div class="bws-cell">
|
607 |
+
<img src="<?php echo esc_url( bws_menu_url( 'images/promote-icon.svg' ) ); ?>" alt="" />
|
608 |
<div><?php esc_html_e( 'Promote and sell products', 'bestwebsoft' ); ?></div>
|
609 |
</div>
|
610 |
<div class="bws-cell">
|
611 |
+
<img src="<?php echo esc_url( bws_menu_url( 'images/earn-icon.svg' ) ); ?>" alt="" />
|
612 |
<div><?php esc_html_e( 'Get commission!', 'bestwebsoft' ); ?></div>
|
613 |
</div>
|
614 |
</div>
|
615 |
<div class="clear"></div>
|
616 |
<p>
|
617 |
+
<a class="button" href="<?php echo esc_url( $bws_link ); ?>" target="_blank"><?php esc_html_e( 'Start Now', 'bestwebsoft' ); ?></a>
|
618 |
</p>
|
619 |
</div>
|
620 |
+
<?php
|
621 |
+
}
|
622 |
}
|
623 |
|
624 |
+
/**
|
625 |
+
* Function display settings notice
|
626 |
+
*
|
627 |
+
* @echo string
|
628 |
+
*/
|
629 |
if ( ! function_exists( 'bws_show_settings_notice' ) ) {
|
630 |
+
function bws_show_settings_notice() {
|
631 |
+
?>
|
632 |
<div id="bws_save_settings_notice" class="updated fade below-h2" style="display:none;">
|
633 |
<p>
|
634 |
+
<strong><?php esc_html_e( 'Notice', 'bestwebsoft' ); ?></strong>: <?php esc_html_e( "The plugin's settings have been changed.", 'bestwebsoft' ); ?>
|
635 |
+
<a class="bws_save_anchor" href="#bws-submit-button"><?php esc_html_e( 'Save Changes', 'bestwebsoft' ); ?></a>
|
636 |
</p>
|
637 |
</div>
|
638 |
+
<?php
|
639 |
+
}
|
640 |
}
|
641 |
|
642 |
+
/**
|
643 |
+
* Function for hide premium options
|
644 |
+
*
|
645 |
+
* @echo string
|
646 |
+
*/
|
647 |
if ( ! function_exists( 'bws_hide_premium_options' ) ) {
|
648 |
function bws_hide_premium_options( $options ) {
|
649 |
+
if ( ! isset( $options['hide_premium_options'] ) || ! is_array( $options['hide_premium_options'] ) ) {
|
650 |
$options['hide_premium_options'] = array();
|
651 |
+
}
|
652 |
|
653 |
$options['hide_premium_options'][] = get_current_user_id();
|
654 |
|
655 |
return array(
|
656 |
+
'message' => esc_html__( 'You can always look at premium options by checking the "Pro Options" in the "Misc" tab.', 'bestwebsoft' ),
|
657 |
+
'options' => $options,
|
658 |
+
);
|
659 |
}
|
660 |
}
|
661 |
|
662 |
+
/**
|
663 |
+
* Function for check checkbox for hide premium options
|
664 |
+
*
|
665 |
+
* @return bool
|
666 |
+
*/
|
667 |
if ( ! function_exists( 'bws_hide_premium_options_check' ) ) {
|
668 |
function bws_hide_premium_options_check( $options ) {
|
669 |
+
if ( ! empty( $options['hide_premium_options'] ) && in_array( get_current_user_id(), $options['hide_premium_options'] ) ) {
|
670 |
return true;
|
671 |
+
} else {
|
672 |
return false;
|
673 |
+
}
|
674 |
}
|
675 |
}
|
676 |
|
677 |
+
/**
|
678 |
+
* Function init fir dashboard
|
679 |
+
*/
|
680 |
+
if ( ! function_exists( 'bws_plugins_admin_init' ) ) {
|
681 |
function bws_plugins_admin_init() {
|
682 |
+
$page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
|
683 |
+
if ( isset( $_GET['bws_activate_plugin'] ) && check_admin_referer( 'bws_activate_plugin' . sanitize_text_field( wp_unslash( $_GET['bws_activate_plugin'] ) ) ) ) {
|
684 |
|
685 |
+
$plugin = isset( $_GET['bws_activate_plugin'] ) ? sanitize_text_field( wp_unslash( $_GET['bws_activate_plugin'] ) ) : '';
|
686 |
$result = activate_plugin( $plugin, '', is_network_admin() );
|
687 |
if ( is_wp_error( $result ) ) {
|
688 |
+
if ( 'unexpected_output' === $result->get_error_code() ) {
|
689 |
$redirect = self_admin_url( 'admin.php?page=bws_panel&error=true&charsout=' . strlen( $result->get_error_data() ) . '&plugin=' . $plugin );
|
690 |
+
wp_safe_redirect( add_query_arg( '_error_nonce', wp_create_nonce( 'plugin-activation-error_' . $plugin ), $redirect ) );
|
691 |
exit();
|
692 |
} else {
|
693 |
+
wp_die( esc_html( $result ) );
|
694 |
}
|
695 |
}
|
696 |
|
707 |
* @deprecated 1.9.8 (15.12.2016)
|
708 |
*/
|
709 |
$is_main_page = in_array( $page, array( 'bws_panel', 'bws_themes', 'bws_system_status' ) );
|
710 |
+
$tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : '';
|
711 |
|
712 |
+
if ( $is_main_page ) {
|
713 |
$current_page = 'admin.php?page=' . $page;
|
714 |
+
} else {
|
715 |
$current_page = isset( $_GET['tab'] ) ? 'admin.php?page=' . $page . '&tab=' . $tab : 'admin.php?page=' . $page;
|
716 |
+
}
|
717 |
/*end deprecated */
|
718 |
|
719 |
+
wp_safe_redirect( self_admin_url( esc_url( $current_page . '&activate=true' ) ) );
|
720 |
exit();
|
721 |
}
|
722 |
|
723 |
+
if ( 'bws_panel' === $page || strpos( $page, '-bws-panel' ) ) {
|
724 |
+
if ( ! session_id() ) {
|
725 |
@session_start();
|
726 |
+
}
|
727 |
}
|
728 |
|
729 |
bws_add_editor_buttons();
|
730 |
}
|
731 |
}
|
732 |
|
733 |
+
/**
|
734 |
+
* Function add scripts ans syles for dashboard
|
735 |
+
*/
|
736 |
+
if ( ! function_exists( 'bws_admin_enqueue_scripts' ) ) {
|
737 |
function bws_admin_enqueue_scripts() {
|
738 |
global $wp_scripts, $hook_suffix,
|
739 |
$post_type,
|
740 |
$bws_plugin_banner_go_pro, $bws_plugin_banner_timeout, $bstwbsftwppdtplgns_banner_array,
|
741 |
+
$bws_shortcode_list,
|
742 |
+
$wp_filesystem;
|
743 |
|
744 |
+
$page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
|
745 |
|
746 |
$jquery_ui_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.12.1';
|
747 |
+
WP_Filesystem();
|
748 |
+
if ( ! $wp_filesystem->exists( dirname( __FILE__ ) . '/css/jquery-ui-styles/' . $jquery_ui_version . '/' ) ) {
|
749 |
+
$jquery_ui_version = '1.12.1';
|
750 |
+
}
|
751 |
+
if ( 'et_divi_options' !== $page ) {
|
752 |
+
wp_enqueue_style( 'jquery-ui-style', bws_menu_url( 'css/jquery-ui-styles/' . $jquery_ui_version . '/jquery-ui.css', array(), $jquery_ui_version ) );
|
753 |
}
|
754 |
+
wp_enqueue_style( 'bws-admin-css', bws_menu_url( 'css/general_style.css' ), array(), '2.4.2' );
|
755 |
wp_enqueue_script( 'bws-admin-scripts', bws_menu_url( 'js/general_script.js' ), array( 'jquery', 'jquery-ui-tooltip' ) );
|
756 |
|
757 |
if ( in_array( $page, array( 'bws_panel', 'bws_themes', 'bws_system_status' ) ) || strpos( $page, '-bws-panel' ) ) {
|
758 |
+
wp_enqueue_style( 'bws_menu_style', bws_menu_url( 'css/style.css' ), array(), '2.4.2' );
|
759 |
+
wp_enqueue_script( 'bws_menu_script', bws_menu_url( 'js/bws_menu.js' ), array(), '2.4.2', true );
|
760 |
wp_enqueue_script( 'theme-install' );
|
761 |
add_thickbox();
|
762 |
wp_enqueue_script( 'plugin-install' );
|
763 |
}
|
764 |
|
765 |
+
if ( 'plugins.php' === $hook_suffix ) {
|
766 |
if ( ! empty( $bws_plugin_banner_go_pro ) || ! empty( $bws_plugin_banner_timeout ) ) {
|
767 |
wp_enqueue_script( 'bws_menu_cookie', bws_menu_url( 'js/c_o_o_k_i_e.js' ) );
|
768 |
|
775 |
$script = "(function($) {
|
776 |
$(document).ready( function() {
|
777 |
var hide_message = $.cookie( '" . $prefix . "_hide_banner_on_plugin_page' );
|
778 |
+
if ( hide_message === 'true' ) {
|
779 |
$( '." . $prefix . "_message' ).css( 'display', 'none' );
|
780 |
} else {
|
781 |
$( '." . $prefix . "_message' ).css( 'display', 'block' );
|
801 |
|
802 |
foreach ( $bws_plugin_banner_timeout as $banner_value ) {
|
803 |
$script .= "var hide_message = $.cookie( '" . $banner_value['prefix'] . "_timeout_hide_banner_on_plugin_page' );
|
804 |
+
if ( hide_message === 'true' ) {
|
805 |
$( '." . $banner_value['prefix'] . "_message_timeout' ).css( 'display', 'none' );
|
806 |
} else {
|
807 |
$( '." . $banner_value['prefix'] . "_message_timeout' ).css( 'display', 'block' );
|
812 |
});";
|
813 |
}
|
814 |
|
815 |
+
$script .= '});
|
816 |
+
})(jQuery);';
|
817 |
|
818 |
wp_register_script( 'plugin_banner_timeout_hide', '' );
|
819 |
wp_enqueue_script( 'plugin_banner_timeout_hide' );
|
831 |
if ( ! empty( $bws_shortcode_list ) ) {
|
832 |
/* TinyMCE Shortcode Plugin */
|
833 |
$script = "var bws_shortcode_button = {
|
834 |
+
'label': '" . esc_attr__( 'Add BWS Shortcode', 'bestwebsoft' ) . "',
|
835 |
+
'title': '" . esc_attr__( 'Add BWS Plugins Shortcode', 'bestwebsoft' ) . "',
|
836 |
'function_name': [";
|
837 |
+
foreach ( $bws_shortcode_list as $value ) {
|
838 |
+
if ( isset( $value['js_function'] ) ) {
|
839 |
+
$script .= "'" . $value['js_function'] . "',";
|
840 |
+
}
|
841 |
+
}
|
842 |
+
$script .= ']
|
843 |
+
};';
|
844 |
wp_register_script( 'bws_shortcode_button', '' );
|
845 |
wp_enqueue_script( 'bws_shortcode_button' );
|
846 |
wp_add_inline_script( 'bws_shortcode_button', sprintf( $script ) );
|
848 |
/* TinyMCE Shortcode Plugin */
|
849 |
if ( isset( $post_type ) && in_array( $post_type, array( 'post', 'page' ) ) ) {
|
850 |
$tooltip_args = array(
|
851 |
+
'tooltip_id' => 'bws_shortcode_button_tooltip',
|
852 |
+
'css_selector' => '.mce-bws_shortcode_button',
|
853 |
+
'actions' => array(
|
854 |
+
'click' => false,
|
855 |
+
'onload' => true,
|
856 |
),
|
857 |
+
'content' => '<h3>' . esc_html__( 'Add shortcode', 'bestwebsoft' ) . '</h3><p>' . esc_html__( "Add BestWebSoft plugins' shortcodes using this button.", 'bestwebsoft' ) . '</p>',
|
858 |
+
'position' => array(
|
859 |
+
'edge' => 'right',
|
860 |
),
|
861 |
+
'set_timeout' => 2000,
|
862 |
);
|
863 |
bws_add_tooltip_in_admin( $tooltip_args );
|
864 |
}
|
875 |
function bws_enqueue_settings_scripts() {
|
876 |
wp_enqueue_script( 'jquery-ui-resizable' );
|
877 |
wp_enqueue_script( 'jquery-ui-tabs' );
|
878 |
+
wp_enqueue_style( 'bws-modal-css', bws_menu_url( 'css/modal.css' ), array(), '2.4.2' );
|
879 |
}
|
880 |
}
|
881 |
|
882 |
+
/**
|
883 |
+
* Function add syles into admin head
|
884 |
+
*
|
885 |
+
* @since 1.9.8
|
886 |
+
*/
|
887 |
+
if ( ! function_exists( 'bws_plugins_admin_head' ) ) {
|
888 |
function bws_plugins_admin_head() {
|
889 |
+
$page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
|
890 |
|
891 |
+
if ( $page === 'bws_panel' ) {
|
892 |
+
?>
|
893 |
<noscript>
|
894 |
<style type="text/css">
|
895 |
.bws_product_button {
|
897 |
}
|
898 |
</style>
|
899 |
</noscript>
|
900 |
+
<?php
|
901 |
+
}
|
902 |
+
}
|
903 |
}
|
904 |
|
905 |
+
/**
|
906 |
+
* Function add syles into admin footer
|
907 |
+
*
|
908 |
+
* @since 1.9.8
|
909 |
+
*/
|
910 |
+
if ( ! function_exists( 'bws_plugins_admin_footer' ) ) {
|
911 |
function bws_plugins_admin_footer() {
|
912 |
bws_shortcode_media_button_popup();
|
913 |
}
|
914 |
}
|
915 |
|
916 |
+
/**
|
917 |
+
* Function add style and scripts for older version
|
918 |
+
*
|
919 |
+
* @since 1.9.8
|
920 |
+
*/
|
921 |
+
if ( ! function_exists( 'bws_plugins_include_codemirror' ) ) {
|
922 |
function bws_plugins_include_codemirror() {
|
923 |
global $wp_version;
|
924 |
+
if ( version_compare( $wp_version, '4.9.0', '>=' ) ) {
|
925 |
wp_enqueue_style( 'wp-codemirror' );
|
926 |
wp_enqueue_script( 'wp-codemirror' );
|
927 |
+
} else {
|
928 |
+
wp_enqueue_style( 'codemirror.css', bws_menu_url( 'css/codemirror.css' ), array(), '2.4.2' );
|
929 |
+
wp_enqueue_script( 'codemirror.js', bws_menu_url( 'js/codemirror.js' ), array( 'jquery' ), '2.4.2' );
|
930 |
+
}
|
931 |
|
932 |
+
}
|
933 |
}
|
934 |
|
935 |
/**
|
937 |
*/
|
938 |
if ( ! function_exists( 'bws_add_tooltip_in_admin' ) ) {
|
939 |
function bws_add_tooltip_in_admin( $tooltip_args = array() ) {
|
940 |
+
new BWS_Admin_Tooltip( $tooltip_args );
|
941 |
}
|
942 |
}
|
943 |
|
944 |
+
/**
|
945 |
+
* Class for Tooltip
|
946 |
+
*
|
947 |
+
* @since 1.9.8
|
948 |
+
*/
|
949 |
+
if ( ! class_exists( 'BWS_Admin_Tooltip' ) ) {
|
950 |
+
class BWS_Admin_Tooltip {
|
951 |
private $tooltip_args;
|
952 |
|
953 |
public function __construct( $tooltip_args ) {
|
955 |
|
956 |
/* Default arguments */
|
957 |
$tooltip_args_default = array(
|
958 |
+
'tooltip_id' => false,
|
959 |
+
'css_selector' => false,
|
960 |
+
'actions' => array(
|
961 |
+
'click' => true,
|
962 |
+
'onload' => false,
|
963 |
),
|
964 |
+
'buttons' => array(
|
965 |
+
'close' => array(
|
966 |
'type' => 'dismiss',
|
967 |
+
'text' => esc_html__( 'Close', 'bestwebsoft' ),
|
968 |
),
|
969 |
),
|
970 |
+
'position' => array(
|
971 |
+
'edge' => 'top',
|
972 |
+
'align' => 'center',
|
973 |
+
'pos-left' => 0,
|
974 |
+
'pos-top' => 0,
|
975 |
+
'zindex' => 10000,
|
976 |
),
|
977 |
+
'set_timeout' => 0,
|
978 |
);
|
979 |
+
$tooltip_args = array_merge( $tooltip_args_default, $tooltip_args );
|
980 |
/* Check that our merged array has default values */
|
981 |
foreach ( $tooltip_args_default as $arg_key => $arg_value ) {
|
982 |
if ( is_array( $arg_value ) ) {
|
983 |
+
foreach ( $arg_value as $key => $value ) {
|
984 |
if ( ! isset( $tooltip_args[ $arg_key ][ $key ] ) ) {
|
985 |
$tooltip_args[ $arg_key ][ $key ] = $tooltip_args_default[ $arg_key ][ $key ];
|
986 |
}
|
999 |
return;
|
1000 |
} else {
|
1001 |
/* check position */
|
1002 |
+
if ( ! in_array( $tooltip_args['position']['edge'], array( 'left', 'right', 'top', 'bottom' ) ) ) {
|
1003 |
$tooltip_args['position']['edge'] = 'top';
|
1004 |
}
|
1005 |
if ( ! in_array( $tooltip_args['position']['align'], array( 'top', 'bottom', 'left', 'right', 'center' ) ) ) {
|
1019 |
break;
|
1020 |
case 'top':
|
1021 |
case 'bottom':
|
1022 |
+
if ( 'left' === $tooltip_args['position']['align'] ) {
|
1023 |
$tooltip_args['position']['pos-left'] -= 65;
|
1024 |
}
|
1025 |
break;
|
1030 |
wp_enqueue_script( 'wp-pointer' );
|
1031 |
/* add script that displays our tooltip */
|
1032 |
if ( ! isset( $bstwbsftwppdtplgns_tooltip_script_add ) ) {
|
1033 |
+
wp_enqueue_script( 'bws-tooltip-script', bws_menu_url( 'js/bws_tooltip.js' ), array(), '2.4.2' );
|
1034 |
$bstwbsftwppdtplgns_tooltip_script_add = true;
|
1035 |
}
|
1036 |
$tooltip_args = $this->tooltip_args;
|
1037 |
|
1038 |
+
$script = '(function($) {
|
1039 |
$(document).ready( function() {
|
1040 |
+
$.bwsTooltip( ' . wp_json_encode( $tooltip_args ) . ' );
|
1041 |
})
|
1042 |
+
})(jQuery);';
|
1043 |
wp_register_script( 'bws-tooltip-script-single-' . $this->tooltip_args['tooltip_id'], '' );
|
1044 |
wp_enqueue_script( 'bws-tooltip-script-single-' . $this->tooltip_args['tooltip_id'] );
|
1045 |
wp_add_inline_script( 'bws-tooltip-script-single-' . $this->tooltip_args['tooltip_id'], sprintf( $script ) );
|
1047 |
}
|
1048 |
}
|
1049 |
|
1050 |
+
/**
|
1051 |
+
* Function display confirm
|
1052 |
+
*
|
1053 |
+
* @since 1.9.8
|
1054 |
+
*/
|
1055 |
+
if ( ! function_exists( 'bws_form_restore_default_confirm' ) ) {
|
1056 |
+
function bws_form_restore_default_confirm( $plugin_basename ) {
|
1057 |
+
?>
|
1058 |
<div>
|
1059 |
+
<p><?php esc_html_e( 'Are you sure you want to restore default settings?', 'bestwebsoft' ); ?></p>
|
1060 |
<form method="post" action="">
|
1061 |
<p>
|
1062 |
+
<button class="button button-primary" name="bws_restore_confirm"><?php esc_html_e( 'Yes, restore all settings', 'bestwebsoft' ); ?></button>
|
1063 |
+
<button class="button" name="bws_restore_deny"><?php esc_html_e( 'No, go back to the settings page', 'bestwebsoft' ); ?></button>
|
1064 |
<?php wp_nonce_field( $plugin_basename, 'bws_settings_nonce_name' ); ?>
|
1065 |
</p>
|
1066 |
</form>
|
1067 |
</div>
|
1068 |
+
<?php
|
1069 |
+
}
|
1070 |
}
|
1071 |
|
1072 |
+
/**
|
1073 |
+
* Function for shortcode
|
1074 |
+
*
|
1075 |
+
* @since 1.9.8
|
1076 |
+
*/
|
1077 |
if ( ! function_exists( 'bws_add_editor_buttons' ) ) {
|
1078 |
function bws_add_editor_buttons() {
|
1079 |
global $bws_shortcode_list;
|
1084 |
}
|
1085 |
}
|
1086 |
|
1087 |
+
/**
|
1088 |
+
* Function add button for editor
|
1089 |
+
*
|
1090 |
+
* @since 1.9.8
|
1091 |
+
*/
|
1092 |
+
if ( ! function_exists( 'bws_add_buttons' ) ) {
|
1093 |
function bws_add_buttons( $plugin_array ) {
|
1094 |
$plugin_array['add_bws_shortcode'] = bws_menu_url( 'js/shortcode-button.js' );
|
1095 |
return $plugin_array;
|
1096 |
}
|
1097 |
}
|
1098 |
|
1099 |
+
/**
|
1100 |
+
* Function register button for editor
|
1101 |
+
*
|
1102 |
+
* @since 1.9.8
|
1103 |
+
*/
|
1104 |
if ( ! function_exists( 'bws_register_buttons' ) ) {
|
1105 |
function bws_register_buttons( $buttons ) {
|
1106 |
array_push( $buttons, 'add_bws_shortcode' ); /* dropcap', 'recentposts */
|
1108 |
}
|
1109 |
}
|
1110 |
|
1111 |
+
/**
|
1112 |
+
* Function Generate inline content for the popup window when the "bws shortcode" button is clicked
|
1113 |
+
*
|
1114 |
+
* @since 1.9.8
|
1115 |
+
*/
|
1116 |
if ( ! function_exists( 'bws_shortcode_media_button_popup' ) ) {
|
1117 |
function bws_shortcode_media_button_popup() {
|
1118 |
global $bws_shortcode_list;
|
1119 |
|
1120 |
+
if ( ! empty( $bws_shortcode_list ) ) {
|
1121 |
+
?>
|
1122 |
<div id="bws_shortcode_popup" style="display:none;">
|
1123 |
<div id="bws_shortcode_popup_block">
|
1124 |
<div id="bws_shortcode_select_plugin">
|
1125 |
+
<h4><?php esc_html_e( 'Plugin', 'bestwebsoft' ); ?></h4>
|
1126 |
<select name="bws_shortcode_select" id="bws_shortcode_select">
|
1127 |
<?php foreach ( $bws_shortcode_list as $key => $value ) { ?>
|
1128 |
+
<option value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $value['name'] ); ?></option>
|
1129 |
<?php } ?>
|
1130 |
</select>
|
1131 |
</div>
|
1132 |
<div class="clear"></div>
|
1133 |
<div id="bws_shortcode_content">
|
1134 |
+
<h4><?php esc_html_e( 'Shortcode settings', 'bestwebsoft' ); ?></h4>
|
1135 |
+
<?php echo wp_kses_post( apply_filters( 'bws_shortcode_button_content', '' ) ); ?>
|
1136 |
</div>
|
1137 |
<div class="clear"></div>
|
1138 |
<div id="bws_shortcode_content_bottom">
|
1139 |
+
<p><?php esc_html_e( 'The shortcode will be inserted', 'bestwebsoft' ); ?></p>
|
1140 |
<div id="bws_shortcode_block"><div id="bws_shortcode_display"></div></div>
|
1141 |
</div>
|
1142 |
</div>
|
1143 |
</div>
|
1144 |
+
<?php
|
1145 |
+
}
|
1146 |
}
|
1147 |
}
|
1148 |
|
1149 |
/**
|
1150 |
+
* Output shortcode in a special block
|
1151 |
+
*
|
1152 |
* @since 1.9.8
|
1153 |
*/
|
1154 |
if ( ! function_exists( 'bws_shortcode_output' ) ) {
|
1155 |
+
function bws_shortcode_output( $shortcode ) {
|
1156 |
+
?>
|
1157 |
+
<span class="bws_shortcode_output"><input type="text" onfocus="this.select();" readonly="readonly" value="<?php echo esc_attr( $shortcode ); ?>" class="large-text bws_no_bind_notice"></span>
|
1158 |
+
<?php
|
1159 |
+
}
|
1160 |
}
|
1161 |
|
1162 |
/**
|
1163 |
+
* Output tooltip
|
1164 |
+
*
|
1165 |
* @since 1.9.8
|
1166 |
* @param string $content - HTML content for the tooltip
|
1167 |
* @param string $class - Can be standart "bws-hide-for-mobile" (tooltip will be hidden in 782px) and "bws-auto-width" (need for img) or some custom class.
|
1174 |
}
|
1175 |
}
|
1176 |
|
1177 |
+
/**
|
1178 |
+
* Function add help tab
|
1179 |
+
*
|
1180 |
+
* @since 1.9.8
|
1181 |
+
*/
|
1182 |
if ( ! function_exists( 'bws_help_tab' ) ) {
|
1183 |
function bws_help_tab( $screen, $args ) {
|
1184 |
$url = ( ! empty( $args['section'] ) ) ? 'https://support.bestwebsoft.com/hc/en-us/sections/' . $args['section'] : 'https://support.bestwebsoft.com/';
|
1188 |
$screen->add_help_tab(
|
1189 |
array(
|
1190 |
'id' => $args['id'] . '_help_tab',
|
1191 |
+
'title' => esc_html__( 'FAQ', 'bestwebsoft' ),
|
1192 |
+
'content' => wp_kses_post( $content ),
|
1193 |
)
|
1194 |
);
|
1195 |
|
1196 |
$screen->set_help_sidebar(
|
1197 |
+
'<p><strong>' . esc_html__( 'For more information:', 'bestwebsoft' ) . '</strong></p>' .
|
1198 |
+
'<p><a href="https://bestwebsoft.com/documentation/" target="_blank">' . esc_html__( 'Documentation', 'bestwebsoft' ) . '</a></p>' .
|
1199 |
+
'<p><a href="https://www.youtube.com/user/bestwebsoft/playlists?flow=grid&sort=da&view=1" target="_blank">' . esc_html__( 'Video Instructions', 'bestwebsoft' ) . '</a></p>' .
|
1200 |
+
'<p><a href="https://support.bestwebsoft.com/hc/en-us/requests/new" target="_blank">' . esc_html__( 'Submit a Request', 'bestwebsoft' ) . '</a></p>'
|
1201 |
);
|
1202 |
}
|
1203 |
}
|
1204 |
|
1205 |
+
/**
|
1206 |
+
* Function add css and js
|
1207 |
+
*
|
1208 |
+
* @since 1.9.8
|
1209 |
+
*/
|
1210 |
if ( ! function_exists( 'bws_enqueue_custom_code_css_js' ) ) {
|
1211 |
function bws_enqueue_custom_code_css_js() {
|
1212 |
global $bstwbsftwppdtplgns_options;
|
1213 |
|
1214 |
+
if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
|
1215 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
1216 |
+
}
|
1217 |
|
1218 |
if ( ! empty( $bstwbsftwppdtplgns_options['custom_code'] ) ) {
|
1219 |
$is_multisite = is_multisite();
|
1220 |
+
if ( $is_multisite ) {
|
1221 |
$blog_id = get_current_blog_id();
|
1222 |
+
}
|
1223 |
|
1224 |
+
if ( ! $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.css'] ) ) {
|
1225 |
+
wp_enqueue_style( 'bws-custom-style', $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.css'], array(), '2.4.2' );
|
1226 |
+
} elseif ( $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.css'] ) ) {
|
1227 |
+
wp_enqueue_style( 'bws-custom-style', $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.css'], array(), '2.4.2' );
|
1228 |
+
}
|
1229 |
|
1230 |
+
if ( ! $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.js'] ) ) {
|
1231 |
+
wp_enqueue_script( 'bws-custom-style', $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.js'], array(), '2.4.2' );
|
1232 |
+
} elseif ( $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.js'] ) ) {
|
1233 |
+
wp_enqueue_script( 'bws-custom-style', $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.js'], array(), '2.4.2' );
|
1234 |
+
}
|
1235 |
}
|
1236 |
}
|
1237 |
}
|
1238 |
|
1239 |
+
/**
|
1240 |
+
* Function add custom php code
|
1241 |
+
*
|
1242 |
+
* @since 1.9.8
|
1243 |
+
*/
|
1244 |
if ( ! function_exists( 'bws_enqueue_custom_code_php' ) ) {
|
1245 |
function bws_enqueue_custom_code_php() {
|
1246 |
+
if ( is_admin() ) {
|
1247 |
return;
|
1248 |
+
}
|
1249 |
|
1250 |
global $bstwbsftwppdtplgns_options;
|
1251 |
|
1252 |
+
if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
|
1253 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
1254 |
+
}
|
1255 |
|
1256 |
if ( ! empty( $bstwbsftwppdtplgns_options['custom_code'] ) ) {
|
1257 |
|
1258 |
$is_multisite = is_multisite();
|
1259 |
+
if ( $is_multisite ) {
|
1260 |
$blog_id = get_current_blog_id();
|
1261 |
+
}
|
1262 |
|
1263 |
if ( ! $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.php'] ) ) {
|
1264 |
if ( file_exists( $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.php'] ) ) {
|
1265 |
+
if ( ! defined( 'BWS_GLOBAL' ) ) {
|
1266 |
define( 'BWS_GLOBAL', true );
|
1267 |
+
}
|
1268 |
+
require_once $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.php'];
|
1269 |
} else {
|
1270 |
unset( $bstwbsftwppdtplgns_options['custom_code']['bws-custom-code.php'] );
|
1271 |
+
if ( $is_multisite ) {
|
1272 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1273 |
+
} else {
|
1274 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1275 |
+
}
|
1276 |
}
|
1277 |
} elseif ( $is_multisite && ! empty( $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.php'] ) ) {
|
1278 |
if ( file_exists( $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.php'] ) ) {
|
1279 |
+
if ( ! defined( 'BWS_GLOBAL' ) ) {
|
1280 |
define( 'BWS_GLOBAL', true );
|
1281 |
+
}
|
1282 |
+
require_once $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.php'];
|
1283 |
} else {
|
1284 |
unset( $bstwbsftwppdtplgns_options['custom_code'][ $blog_id ]['bws-custom-code.php'] );
|
1285 |
+
if ( $is_multisite ) {
|
1286 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1287 |
+
} else {
|
1288 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1289 |
+
}
|
1290 |
}
|
1291 |
}
|
1292 |
}
|
1293 |
}
|
1294 |
}
|
1295 |
|
1296 |
+
/**
|
1297 |
+
* Function delete plugin
|
1298 |
+
*
|
1299 |
+
* @since 1.9.8
|
1300 |
+
*/
|
1301 |
if ( ! function_exists( 'bws_delete_plugin' ) ) {
|
1302 |
function bws_delete_plugin( $basename ) {
|
1303 |
global $bstwbsftwppdtplgns_options;
|
1304 |
|
1305 |
$is_multisite = is_multisite();
|
1306 |
+
if ( $is_multisite ) {
|
1307 |
$blog_id = get_current_blog_id();
|
1308 |
+
}
|
1309 |
|
1310 |
+
if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
|
1311 |
$bstwbsftwppdtplgns_options = ( $is_multisite ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
1312 |
+
}
|
1313 |
|
1314 |
/* remove bws_menu versions */
|
1315 |
unset( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $basename ] );
|
1316 |
/* remove track usage data */
|
1317 |
+
if ( isset( $bstwbsftwppdtplgns_options['bws_menu']['track_usage']['products'][ $basename ] ) ) {
|
1318 |
unset( $bstwbsftwppdtplgns_options['bws_menu']['track_usage']['products'][ $basename ] );
|
1319 |
+
}
|
1320 |
/* if empty ['bws_menu']['version'] - there is no other bws plugins - delete all */
|
1321 |
if ( empty( $bstwbsftwppdtplgns_options['bws_menu']['version'] ) ) {
|
1322 |
/* remove options */
|
1323 |
+
if ( $is_multisite ) {
|
1324 |
delete_site_option( 'bstwbsftwppdtplgns_options' );
|
1325 |
+
} else {
|
1326 |
delete_option( 'bstwbsftwppdtplgns_options' );
|
1327 |
+
}
|
1328 |
|
1329 |
/* remove custom_code */
|
1330 |
if ( $is_multisite ) {
|
1335 |
foreach ( $blogids as $blog_id ) {
|
1336 |
switch_to_blog( $blog_id );
|
1337 |
$upload_dir = wp_upload_dir();
|
1338 |
+
$folder = $upload_dir['basedir'] . '/bws-custom-code';
|
1339 |
if ( file_exists( $folder ) && is_dir( $folder ) ) {
|
1340 |
array_map( 'unlink', glob( "$folder/*" ) );
|
1341 |
rmdir( $folder );
|
1344 |
switch_to_blog( $old_blog );
|
1345 |
} else {
|
1346 |
$upload_dir = wp_upload_dir();
|
1347 |
+
$folder = $upload_dir['basedir'] . '/bws-custom-code';
|
1348 |
if ( file_exists( $folder ) && is_dir( $folder ) ) {
|
1349 |
array_map( 'unlink', glob( "$folder/*" ) );
|
1350 |
rmdir( $folder );
|
1357 |
add_action( 'admin_init', 'bws_plugins_admin_init' );
|
1358 |
add_action( 'admin_enqueue_scripts', 'bws_admin_enqueue_scripts' );
|
1359 |
add_action( 'admin_head', 'bws_plugins_admin_head' );
|
1360 |
+
add_action( 'admin_footer', 'bws_plugins_admin_footer' );
|
1361 |
|
1362 |
add_action( 'admin_notices', 'bws_admin_notices', 30 );
|
1363 |
|
bws_menu/bws_include.php
CHANGED
@@ -1,19 +1,20 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
* Get latest version
|
4 |
-
*/
|
5 |
|
6 |
if ( ! function_exists( 'bws_include_init' ) ) {
|
7 |
function bws_include_init( $base, $bws_menu_source = 'plugins' ) {
|
8 |
global $bstwbsftwppdtplgns_options, $bstwbsftwppdtplgns_added_menu, $bstwbsftwppdtplgns_active_plugins;
|
9 |
-
if ( ! function_exists( 'get_plugin_data' ) )
|
10 |
-
require_once
|
|
|
11 |
|
12 |
$wp_content_dir = defined( 'WP_CONTENT_DIR' ) ? WP_CONTENT_DIR : ABSPATH . 'wp-content';
|
13 |
$wp_plugins_dir = defined( 'WP_PLUGIN_DIR' ) ? WP_PLUGIN_DIR : $wp_content_dir . '/plugins';
|
14 |
|
15 |
-
if (
|
16 |
-
$bws_menu_dir
|
17 |
$bstwbsftwppdtplgns_active_plugins[ $base ] = get_plugin_data( $wp_plugins_dir . '/' . $base );
|
18 |
} else {
|
19 |
$bws_menu_dir = $wp_content_dir . '/themes/' . $base . '/inc/bws_menu/bws_menu.php';
|
@@ -21,17 +22,19 @@ if ( ! function_exists( 'bws_include_init' ) ) {
|
|
21 |
|
22 |
$bws_menu_info = get_plugin_data( $bws_menu_dir );
|
23 |
|
24 |
-
$is_pro_bws_menu
|
25 |
-
$bws_menu_version = str_replace( '-pro', '', $bws_menu_info[
|
26 |
|
27 |
if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
|
28 |
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
29 |
-
if ( ! get_site_option( 'bstwbsftwppdtplgns_options' ) )
|
30 |
add_site_option( 'bstwbsftwppdtplgns_options', array() );
|
|
|
31 |
$bstwbsftwppdtplgns_options = get_site_option( 'bstwbsftwppdtplgns_options' );
|
32 |
} else {
|
33 |
-
if ( ! get_option( 'bstwbsftwppdtplgns_options' ) )
|
34 |
add_option( 'bstwbsftwppdtplgns_options', array() );
|
|
|
35 |
$bstwbsftwppdtplgns_options = get_option( 'bstwbsftwppdtplgns_options' );
|
36 |
}
|
37 |
}
|
@@ -39,55 +42,61 @@ if ( ! function_exists( 'bws_include_init' ) ) {
|
|
39 |
if ( isset( $bstwbsftwppdtplgns_options['bws_menu_version'] ) ) {
|
40 |
$bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] = $bws_menu_version;
|
41 |
unset( $bstwbsftwppdtplgns_options['bws_menu_version'] );
|
42 |
-
if ( function_exists( 'is_multisite' ) && is_multisite() )
|
43 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
44 |
-
else
|
45 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
46 |
-
|
47 |
-
require_once
|
48 |
-
require_once
|
49 |
-
|
|
|
50 |
$bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] = $bws_menu_version;
|
51 |
-
if ( function_exists( 'is_multisite' ) && is_multisite() )
|
52 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
53 |
-
else
|
54 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
55 |
-
|
56 |
-
require_once
|
57 |
-
require_once
|
58 |
-
|
|
|
59 |
$bstwbsftwppdtplgns_options['bws_menu']['version_pro'][ $base ] = $bws_menu_version;
|
60 |
-
|
61 |
-
if ( isset( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] ) )
|
62 |
unset( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] );
|
63 |
-
|
64 |
-
|
|
|
65 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
66 |
-
else
|
67 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
68 |
-
|
69 |
-
require_once
|
70 |
-
require_once
|
71 |
-
|
|
|
72 |
|
73 |
$all_plugins = get_plugins();
|
74 |
-
$all_themes
|
75 |
|
76 |
if ( ! empty( $bstwbsftwppdtplgns_options['bws_menu']['version_pro'] ) ) {
|
77 |
foreach ( $bstwbsftwppdtplgns_options['bws_menu']['version_pro'] as $key => $value ) {
|
78 |
if ( array_key_exists( $key, $all_plugins ) || array_key_exists( $key, $all_themes ) ) {
|
79 |
-
if ( $bws_menu_version
|
80 |
-
if ( ! isset( $product_with_newer_menu ) )
|
81 |
$product_with_newer_menu = $key;
|
82 |
-
elseif ( $bstwbsftwppdtplgns_options['bws_menu']['version_pro'][ $product_with_newer_menu ]
|
83 |
$product_with_newer_menu = $key;
|
|
|
84 |
}
|
85 |
} else {
|
86 |
unset( $bstwbsftwppdtplgns_options['bws_menu']['version_pro'][ $key ] );
|
87 |
-
if ( function_exists( 'is_multisite' ) && is_multisite() )
|
88 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
89 |
-
else
|
90 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
|
|
91 |
}
|
92 |
}
|
93 |
}
|
@@ -98,49 +107,52 @@ if ( ! function_exists( 'bws_include_init' ) ) {
|
|
98 |
} else {
|
99 |
foreach ( $bstwbsftwppdtplgns_options['bws_menu']['version'] as $key => $value ) {
|
100 |
if ( array_key_exists( $key, $all_plugins ) || array_key_exists( $key, $all_themes ) ) {
|
101 |
-
if ( $bws_menu_version
|
102 |
-
if ( ! isset( $product_with_newer_menu ) )
|
103 |
$product_with_newer_menu = $key;
|
104 |
-
elseif ( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $product_with_newer_menu ]
|
105 |
$product_with_newer_menu = $key;
|
|
|
106 |
}
|
107 |
} else {
|
108 |
unset( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $key ] );
|
109 |
-
if ( function_exists( 'is_multisite' ) && is_multisite() )
|
110 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
111 |
-
else
|
112 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
|
|
113 |
}
|
114 |
}
|
115 |
}
|
116 |
}
|
117 |
|
118 |
-
if ( ! isset( $product_with_newer_menu ) )
|
119 |
$product_with_newer_menu = $base;
|
|
|
120 |
|
121 |
$folder_with_newer_menu = explode( '/', $product_with_newer_menu );
|
122 |
|
123 |
if ( array_key_exists( $product_with_newer_menu, $all_plugins ) ) {
|
124 |
-
$bws_menu_source
|
125 |
$bws_menu_new_dir = $wp_plugins_dir . '/' . $folder_with_newer_menu[0];
|
126 |
-
}
|
127 |
-
$bws_menu_source
|
128 |
$bws_menu_new_dir = $wp_content_dir . '/themes/' . $folder_with_newer_menu[0] . '/inc';
|
129 |
} else {
|
130 |
$bws_menu_new_dir = '';
|
131 |
}
|
132 |
|
133 |
if ( file_exists( $bws_menu_new_dir . '/bws_menu/bws_functions.php' ) ) {
|
134 |
-
require_once
|
135 |
-
require_once
|
136 |
-
require_once
|
137 |
} else {
|
138 |
-
require_once
|
139 |
-
require_once
|
140 |
-
require_once
|
141 |
}
|
142 |
|
143 |
$bstwbsftwppdtplgns_added_menu = true;
|
144 |
}
|
145 |
}
|
146 |
-
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Get latest version
|
4 |
+
*/
|
5 |
|
6 |
if ( ! function_exists( 'bws_include_init' ) ) {
|
7 |
function bws_include_init( $base, $bws_menu_source = 'plugins' ) {
|
8 |
global $bstwbsftwppdtplgns_options, $bstwbsftwppdtplgns_added_menu, $bstwbsftwppdtplgns_active_plugins;
|
9 |
+
if ( ! function_exists( 'get_plugin_data' ) ) {
|
10 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
11 |
+
}
|
12 |
|
13 |
$wp_content_dir = defined( 'WP_CONTENT_DIR' ) ? WP_CONTENT_DIR : ABSPATH . 'wp-content';
|
14 |
$wp_plugins_dir = defined( 'WP_PLUGIN_DIR' ) ? WP_PLUGIN_DIR : $wp_content_dir . '/plugins';
|
15 |
|
16 |
+
if ( 'plugins' === $bws_menu_source ) {
|
17 |
+
$bws_menu_dir = $wp_plugins_dir . '/' . dirname( $base ) . '/bws_menu/bws_menu.php';
|
18 |
$bstwbsftwppdtplgns_active_plugins[ $base ] = get_plugin_data( $wp_plugins_dir . '/' . $base );
|
19 |
} else {
|
20 |
$bws_menu_dir = $wp_content_dir . '/themes/' . $base . '/inc/bws_menu/bws_menu.php';
|
22 |
|
23 |
$bws_menu_info = get_plugin_data( $bws_menu_dir );
|
24 |
|
25 |
+
$is_pro_bws_menu = ( strpos( $bws_menu_info['Version'], 'pro' ) !== false );
|
26 |
+
$bws_menu_version = str_replace( '-pro', '', $bws_menu_info['Version'] );
|
27 |
|
28 |
if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
|
29 |
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
30 |
+
if ( ! get_site_option( 'bstwbsftwppdtplgns_options' ) ) {
|
31 |
add_site_option( 'bstwbsftwppdtplgns_options', array() );
|
32 |
+
}
|
33 |
$bstwbsftwppdtplgns_options = get_site_option( 'bstwbsftwppdtplgns_options' );
|
34 |
} else {
|
35 |
+
if ( ! get_option( 'bstwbsftwppdtplgns_options' ) ) {
|
36 |
add_option( 'bstwbsftwppdtplgns_options', array() );
|
37 |
+
}
|
38 |
$bstwbsftwppdtplgns_options = get_option( 'bstwbsftwppdtplgns_options' );
|
39 |
}
|
40 |
}
|
42 |
if ( isset( $bstwbsftwppdtplgns_options['bws_menu_version'] ) ) {
|
43 |
$bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] = $bws_menu_version;
|
44 |
unset( $bstwbsftwppdtplgns_options['bws_menu_version'] );
|
45 |
+
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
46 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
47 |
+
} else {
|
48 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
49 |
+
}
|
50 |
+
require_once dirname( __FILE__ ) . '/bws_menu.php';
|
51 |
+
require_once dirname( __FILE__ ) . '/bws_functions.php';
|
52 |
+
require_once dirname( __FILE__ ) . '/class-bws-settings.php';
|
53 |
+
} elseif ( ! $is_pro_bws_menu && ( ! isset( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] ) || $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] !== $bws_menu_version ) ) {
|
54 |
$bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] = $bws_menu_version;
|
55 |
+
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
56 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
57 |
+
} else {
|
58 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
59 |
+
}
|
60 |
+
require_once dirname( __FILE__ ) . '/bws_menu.php';
|
61 |
+
require_once dirname( __FILE__ ) . '/bws_functions.php';
|
62 |
+
require_once dirname( __FILE__ ) . '/class-bws-settings.php';
|
63 |
+
} elseif ( $is_pro_bws_menu && ( ! isset( $bstwbsftwppdtplgns_options['bws_menu']['version_pro'][ $base ] ) || $bstwbsftwppdtplgns_options['bws_menu']['version_pro'][ $base ] !== $bws_menu_version ) ) {
|
64 |
$bstwbsftwppdtplgns_options['bws_menu']['version_pro'][ $base ] = $bws_menu_version;
|
65 |
+
|
66 |
+
if ( isset( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] ) ) {
|
67 |
unset( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] );
|
68 |
+
}
|
69 |
+
|
70 |
+
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
71 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
72 |
+
} else {
|
73 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
74 |
+
}
|
75 |
+
require_once dirname( __FILE__ ) . '/bws_menu.php';
|
76 |
+
require_once dirname( __FILE__ ) . '/bws_functions.php';
|
77 |
+
require_once dirname( __FILE__ ) . '/class-bws-settings.php';
|
78 |
+
} elseif ( ! isset( $bstwbsftwppdtplgns_added_menu ) ) {
|
79 |
|
80 |
$all_plugins = get_plugins();
|
81 |
+
$all_themes = wp_get_themes();
|
82 |
|
83 |
if ( ! empty( $bstwbsftwppdtplgns_options['bws_menu']['version_pro'] ) ) {
|
84 |
foreach ( $bstwbsftwppdtplgns_options['bws_menu']['version_pro'] as $key => $value ) {
|
85 |
if ( array_key_exists( $key, $all_plugins ) || array_key_exists( $key, $all_themes ) ) {
|
86 |
+
if ( $bws_menu_version <= $value && ( is_plugin_active( $key ) || preg_match( '|' . $key . '$|', get_template_directory() ) ) ) {
|
87 |
+
if ( ! isset( $product_with_newer_menu ) ) {
|
88 |
$product_with_newer_menu = $key;
|
89 |
+
} elseif ( $bstwbsftwppdtplgns_options['bws_menu']['version_pro'][ $product_with_newer_menu ] <= $bstwbsftwppdtplgns_options['bws_menu']['version_pro'][ $key ] ) {
|
90 |
$product_with_newer_menu = $key;
|
91 |
+
}
|
92 |
}
|
93 |
} else {
|
94 |
unset( $bstwbsftwppdtplgns_options['bws_menu']['version_pro'][ $key ] );
|
95 |
+
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
96 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
97 |
+
} else {
|
98 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
99 |
+
}
|
100 |
}
|
101 |
}
|
102 |
}
|
107 |
} else {
|
108 |
foreach ( $bstwbsftwppdtplgns_options['bws_menu']['version'] as $key => $value ) {
|
109 |
if ( array_key_exists( $key, $all_plugins ) || array_key_exists( $key, $all_themes ) ) {
|
110 |
+
if ( $bws_menu_version <= $value && ( is_plugin_active( $key ) || preg_match( '|' . $key . '$|', get_template_directory() ) ) ) {
|
111 |
+
if ( ! isset( $product_with_newer_menu ) ) {
|
112 |
$product_with_newer_menu = $key;
|
113 |
+
} elseif ( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $product_with_newer_menu ] <= $bstwbsftwppdtplgns_options['bws_menu']['version'][ $key ] ) {
|
114 |
$product_with_newer_menu = $key;
|
115 |
+
}
|
116 |
}
|
117 |
} else {
|
118 |
unset( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $key ] );
|
119 |
+
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
120 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
121 |
+
} else {
|
122 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
123 |
+
}
|
124 |
}
|
125 |
}
|
126 |
}
|
127 |
}
|
128 |
|
129 |
+
if ( ! isset( $product_with_newer_menu ) ) {
|
130 |
$product_with_newer_menu = $base;
|
131 |
+
}
|
132 |
|
133 |
$folder_with_newer_menu = explode( '/', $product_with_newer_menu );
|
134 |
|
135 |
if ( array_key_exists( $product_with_newer_menu, $all_plugins ) ) {
|
136 |
+
$bws_menu_source = 'plugins';
|
137 |
$bws_menu_new_dir = $wp_plugins_dir . '/' . $folder_with_newer_menu[0];
|
138 |
+
} elseif ( array_key_exists( $product_with_newer_menu, $all_themes ) ) {
|
139 |
+
$bws_menu_source = 'themes';
|
140 |
$bws_menu_new_dir = $wp_content_dir . '/themes/' . $folder_with_newer_menu[0] . '/inc';
|
141 |
} else {
|
142 |
$bws_menu_new_dir = '';
|
143 |
}
|
144 |
|
145 |
if ( file_exists( $bws_menu_new_dir . '/bws_menu/bws_functions.php' ) ) {
|
146 |
+
require_once $bws_menu_new_dir . '/bws_menu/bws_functions.php';
|
147 |
+
require_once $bws_menu_new_dir . '/bws_menu/bws_menu.php';
|
148 |
+
require_once $bws_menu_new_dir . '/bws_menu/class-bws-settings.php';
|
149 |
} else {
|
150 |
+
require_once dirname( __FILE__ ) . '/bws_menu.php';
|
151 |
+
require_once dirname( __FILE__ ) . '/bws_functions.php';
|
152 |
+
require_once dirname( __FILE__ ) . '/class-bws-settings.php';
|
153 |
}
|
154 |
|
155 |
$bstwbsftwppdtplgns_added_menu = true;
|
156 |
}
|
157 |
}
|
158 |
+
}
|
bws_menu/bws_menu.php
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
* Function for displaying BestWebSoft menu
|
4 |
-
* Version: 2.4.
|
5 |
-
*/
|
6 |
|
7 |
-
if ( ! function_exists
|
8 |
-
require_once
|
|
|
9 |
|
10 |
if ( ! function_exists( 'bws_add_menu_render' ) ) {
|
11 |
function bws_add_menu_render() {
|
@@ -15,31 +16,33 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
|
|
15 |
/**
|
16 |
* @deprecated 1.9.8 (15.12.2016)
|
17 |
*/
|
18 |
-
$is_main_page = in_array( $_GET['page'], array( 'bws_panel', 'bws_themes', 'bws_system_status' ) );
|
19 |
-
$page
|
20 |
-
$tab
|
21 |
|
22 |
-
if ( $is_main_page )
|
23 |
$current_page = 'admin.php?page=' . $page;
|
24 |
-
else
|
25 |
$current_page = isset( $_GET['tab'] ) ? 'admin.php?page=' . $page . '&tab=' . $tab : 'admin.php?page=' . $page;
|
|
|
26 |
|
27 |
-
if ( 'bws_panel'
|
28 |
|
29 |
-
if ( ! function_exists( 'is_plugin_active_for_network' ) )
|
30 |
-
require_once
|
|
|
31 |
|
32 |
-
/*
|
33 |
-
require
|
34 |
|
35 |
-
$all_plugins
|
36 |
-
$active_plugins
|
37 |
$sitewide_active_plugins = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'active_sitewide_plugins' ) : array();
|
38 |
-
$update_availible_all
|
39 |
|
40 |
-
$plugin_category = isset( $_GET['category'] ) ?
|
41 |
|
42 |
-
if ( ( isset( $_GET['sub'] ) && 'installed'
|
43 |
$bws_plugins_update_availible = $bws_plugins_expired = array();
|
44 |
foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
|
45 |
|
@@ -47,28 +50,28 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
|
|
47 |
$bws_plugins_category[ $category_key ]['count'] = isset( $bws_plugins_category[ $category_key ]['count'] ) ? $bws_plugins_category[ $category_key ]['count'] + 1 : 1;
|
48 |
}
|
49 |
|
50 |
-
$is_installed
|
51 |
$is_pro_installed = false;
|
52 |
if ( isset( $value_plugin['pro_version'] ) ) {
|
53 |
$is_pro_installed = array_key_exists( $value_plugin['pro_version'], $all_plugins );
|
54 |
}
|
55 |
-
/*
|
56 |
if ( ! empty( $update_availible_all ) && ! empty( $update_availible_all->response ) ) {
|
57 |
if ( $is_pro_installed && array_key_exists( $value_plugin['pro_version'], $update_availible_all->response ) ) {
|
58 |
unset( $bws_plugins[ $key_plugin ] );
|
59 |
-
$value_plugin['update_availible']
|
60 |
$bws_plugins_update_availible[ $key_plugin ] = $value_plugin;
|
61 |
-
}
|
62 |
unset( $bws_plugins[ $key_plugin ] );
|
63 |
-
$value_plugin['update_availible']
|
64 |
$bws_plugins_update_availible[ $key_plugin ] = $value_plugin;
|
65 |
}
|
66 |
}
|
67 |
-
/*
|
68 |
if ( $is_pro_installed && isset( $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ] ) &&
|
69 |
-
|
70 |
unset( $bws_plugins[ $key_plugin ] );
|
71 |
-
$value_plugin['expired']
|
72 |
$bws_plugins_expired[ $key_plugin ] = $value_plugin;
|
73 |
}
|
74 |
}
|
@@ -81,68 +84,71 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
|
|
81 |
}
|
82 |
}
|
83 |
|
84 |
-
/***
|
85 |
-
$bws_license_plugin
|
86 |
-
$bws_license_key
|
87 |
$update_membership_list = true;
|
88 |
|
89 |
-
if ( isset( $_POST['bws_license_key'] ) )
|
90 |
-
$bws_license_key = sanitize_text_field( $_POST['bws_license_key'] );
|
|
|
91 |
|
92 |
if ( isset( $_SESSION['bws_membership_time_check'] ) && isset( $_SESSION['bws_membership_list'] ) && $_SESSION['bws_membership_time_check'] < strtotime( '+12 hours' ) ) {
|
93 |
$update_membership_list = false;
|
94 |
-
$plugins_array
|
95 |
}
|
96 |
|
97 |
-
if ( ( $update_membership_list && ! empty( $bws_license_key ) ) || ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( plugin_basename(__FILE__), 'bws_license_nonce_name' ) ) ) {
|
98 |
|
99 |
-
if ( ''
|
100 |
-
if ( strlen( $bws_license_key )
|
101 |
$error = __( 'Wrong license key', 'bestwebsoft' );
|
102 |
} else {
|
103 |
|
104 |
-
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - (24 * 60 * 60) ) ) {
|
105 |
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] + 1;
|
106 |
} else {
|
107 |
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = 1;
|
108 |
-
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time']
|
109 |
}
|
110 |
|
111 |
/* get Pro list */
|
112 |
-
$to_send
|
113 |
-
$to_send[
|
114 |
-
$to_send[
|
115 |
-
$options
|
116 |
-
'timeout'
|
117 |
-
'body'
|
118 |
-
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
|
|
|
119 |
$raw_response = wp_remote_post( 'https://bestwebsoft.com/wp-content/plugins/paid-products/plugins/pro-license-check/1.0/', $options );
|
120 |
|
121 |
-
if ( is_wp_error( $raw_response ) || 200
|
122 |
-
$error = __(
|
123 |
} else {
|
124 |
$response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
|
125 |
|
126 |
-
if ( is_array( $response ) && !empty( $response ) ) {
|
127 |
foreach ( $response as $key => $value ) {
|
128 |
-
if (
|
129 |
-
$error = __(
|
130 |
-
} elseif (
|
131 |
$error = __( 'This license key is bound to another site. Change it via personal Client Area.', 'bestwebsoft' ) . '<a target="_blank" href="https://bestwebsoft.com/client-area">' . __( 'Log in', 'bestwebsoft' ) . '</a>';
|
132 |
-
} elseif (
|
133 |
-
$error = __(
|
134 |
-
} elseif (
|
135 |
-
$error = sprintf( __(
|
136 |
-
} elseif (
|
137 |
-
$error = __(
|
138 |
} elseif ( is_array( $value->package ) && ! empty( $value->package ) ) {
|
139 |
-
$plugins_array
|
140 |
$_SESSION['bws_membership_time_check'] = strtotime( 'now' );
|
141 |
|
142 |
-
if ( isset( $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) && $bws_license_key
|
143 |
$message = __( 'The license key is valid.', 'bestwebsoft' );
|
144 |
-
if ( isset( $value->time_out ) && $value->time_out
|
145 |
$message .= ' ' . __( 'Your license will expire on', 'bestwebsoft' ) . ' ' . $value->time_out . '.';
|
|
|
146 |
} else {
|
147 |
$message = __( 'Congratulations! Pro Membership license is activated successfully.', 'bestwebsoft' );
|
148 |
}
|
@@ -151,40 +157,43 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
|
|
151 |
}
|
152 |
}
|
153 |
} else {
|
154 |
-
$error = __(
|
155 |
}
|
156 |
}
|
157 |
|
158 |
-
if ( is_multisite() )
|
159 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
160 |
-
else
|
161 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
|
|
162 |
}
|
163 |
} else {
|
164 |
-
$error = __(
|
165 |
}
|
166 |
}
|
167 |
-
} elseif ( 'bws_system_status'
|
168 |
|
169 |
-
$all_plugins
|
170 |
$active_plugins = get_option( 'active_plugins' );
|
171 |
-
$mysql_info
|
172 |
-
if ( is_array( $mysql_info ) )
|
173 |
$sql_mode = $mysql_info[0]->Value;
|
174 |
-
|
|
|
175 |
$sql_mode = __( 'Not set', 'bestwebsoft' );
|
|
|
176 |
|
177 |
-
$allow_url_fopen
|
178 |
-
$upload_max_filesize = ( ini_get( 'upload_max_filesize' ) )? ini_get( 'upload_max_filesize' ) : __( 'N/A', 'bestwebsoft' );
|
179 |
-
$post_max_size
|
180 |
-
$max_execution_time
|
181 |
-
$memory_limit
|
182 |
-
$wp_memory_limit
|
183 |
-
$memory_usage
|
184 |
-
$exif_read_data
|
185 |
-
$iptcparse
|
186 |
-
$xml_parser_create
|
187 |
-
$theme
|
188 |
|
189 |
if ( function_exists( 'is_multisite' ) ) {
|
190 |
$multisite = is_multisite() ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' );
|
@@ -196,87 +205,88 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
|
|
196 |
'wp_environment' => array(
|
197 |
'name' => __( 'WordPress Environment', 'bestwebsoft' ),
|
198 |
'data' => array(
|
199 |
-
__( 'Home URL', 'bestwebsoft' )
|
200 |
-
__( 'Website URL', 'bestwebsoft' )
|
201 |
-
__( 'WP Version', 'bestwebsoft' )
|
202 |
-
__( 'WP Multisite', 'bestwebsoft' )
|
203 |
-
__( 'WP Memory Limit', 'bestwebsoft' )
|
204 |
-
__( 'Active Theme', 'bestwebsoft' )
|
205 |
),
|
206 |
),
|
207 |
'server_environment' => array(
|
208 |
'name' => __( 'Server Environment', 'bestwebsoft' ),
|
209 |
'data' => array(
|
210 |
-
__( 'Operating System', 'bestwebsoft' )
|
211 |
-
__( 'Server', 'bestwebsoft' )
|
212 |
-
__( 'PHP Version', 'bestwebsoft' )
|
213 |
-
__( 'PHP Allow URL fopen', 'bestwebsoft' )
|
214 |
-
__( 'PHP Memory Limit', 'bestwebsoft' )
|
215 |
-
__( 'Memory Usage', 'bestwebsoft' )
|
216 |
-
__( 'PHP Max Upload Size', 'bestwebsoft' )
|
217 |
-
__( 'PHP Max Post Size', 'bestwebsoft' )
|
218 |
-
__( 'PHP Max Script Execute Time', 'bestwebsoft' )
|
219 |
-
__( 'PHP Exif support', 'bestwebsoft' )
|
220 |
-
__( 'PHP IPTC support', 'bestwebsoft' )
|
221 |
-
__( 'PHP XML support', 'bestwebsoft' )
|
222 |
-
'$_SERVER[HTTP_HOST]'
|
223 |
-
'$_SERVER[SERVER_NAME]'
|
224 |
),
|
225 |
),
|
226 |
-
'db'
|
227 |
'name' => __( 'Database', 'bestwebsoft' ),
|
228 |
'data' => array(
|
229 |
-
__( 'WP DB version', 'bestwebsoft' )
|
230 |
-
__( 'MySQL version', 'bestwebsoft' )
|
231 |
-
__( 'SQL Mode', 'bestwebsoft' )
|
232 |
),
|
233 |
),
|
234 |
-
'active_plugins'
|
235 |
-
'name'
|
236 |
-
'data'
|
237 |
-
'count'
|
|
|
|
|
|
|
|
|
|
|
238 |
),
|
239 |
-
'inactive_plugins' => array(
|
240 |
-
'name' => __( 'Inactive Plugins', 'bestwebsoft' ),
|
241 |
-
'data' => array(),
|
242 |
-
'count' => 0
|
243 |
-
)
|
244 |
);
|
245 |
|
246 |
foreach ( $all_plugins as $path => $plugin ) {
|
247 |
$name = str_replace( 'by BestWebSoft', '', $plugin['Name'] );
|
248 |
if ( is_plugin_active( $path ) ) {
|
249 |
$system_info['active_plugins']['data'][ $name ] = sprintf( __( 'by %s', 'bestwebsoft' ), $plugin['Author'] ) . ' - ' . $plugin['Version'];
|
250 |
-
$system_info['active_plugins']['count']
|
251 |
} else {
|
252 |
$system_info['inactive_plugins']['data'][ $name ] = sprintf( __( 'by %s', 'bestwebsoft' ), $plugin['Author'] ) . ' - ' . $plugin['Version'];
|
253 |
-
$system_info['inactive_plugins']['count']
|
254 |
}
|
255 |
}
|
256 |
|
257 |
-
if ( ( isset( $_REQUEST['bwsmn_form_submit'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ) ) || ( isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ) ) ) {
|
258 |
if ( isset( $_REQUEST['bwsmn_form_email'] ) ) {
|
259 |
-
$email = sanitize_email( $_REQUEST['bwsmn_form_email'] );
|
260 |
-
if ( ''
|
261 |
$error = __( 'Please enter a valid email address.', 'bestwebsoft' );
|
262 |
} else {
|
263 |
$message = sprintf( __( 'Email with system info is sent to %s.', 'bestwebsoft' ), $email );
|
264 |
}
|
265 |
} else {
|
266 |
-
$email
|
267 |
$message = __( 'Thank you for contacting us.', 'bestwebsoft' );
|
268 |
}
|
269 |
|
270 |
-
if ( $error
|
271 |
-
$headers
|
272 |
-
$headers
|
273 |
-
$headers
|
274 |
$message_text = '<html><head><title>System Info From ' . home_url() . '</title></head><body>';
|
275 |
foreach ( $system_info as $info ) {
|
276 |
if ( ! empty( $info['data'] ) ) {
|
277 |
$message_text .= '<h4>' . $info['name'];
|
278 |
-
if ( isset( $info['count'] ) )
|
279 |
$message_text .= ' (' . $info['count'] . ')';
|
|
|
280 |
$message_text .= '</h4><table>';
|
281 |
foreach ( $info['data'] as $key => $value ) {
|
282 |
$message_text .= '<tr><td>' . $key . '</td><td>' . $value . '</td></tr>';
|
@@ -285,380 +295,536 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
|
|
285 |
}
|
286 |
}
|
287 |
$message_text .= '</body></html>';
|
288 |
-
$result
|
289 |
-
if ( $result
|
290 |
-
$error = __(
|
|
|
291 |
}
|
292 |
}
|
293 |
} ?>
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
<?php if ( $is_main_page ) { ?>
|
306 |
-
|
307 |
-
|
308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
<?php } else { ?>
|
310 |
-
|
311 |
-
|
312 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
<?php } ?>
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
|
|
|
|
|
|
|
|
336 |
<?php } else { ?>
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
343 |
<?php if ( empty( $plugins_array ) ) { ?>
|
344 |
-
|
345 |
<?php } else { ?>
|
346 |
-
|
347 |
<?php } ?>
|
348 |
-
<?php wp_nonce_field( plugin_basename(__FILE__), 'bws_license_nonce_name' ); ?>
|
349 |
<?php } ?>
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
<?php } ?>
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
<?php } elseif ( isset( $_GET['activate'] ) ) { ?>
|
369 |
-
|
370 |
-
|
|
|
371 |
|
372 |
-
if ( isset( $_POST['bws_plugin_action_submit'] ) && isset( $_POST['bws_install_plugin'] ) && check_admin_referer( plugin_basename(__FILE__), 'bws_license_install_nonce_name' ) ) {
|
373 |
|
374 |
-
$bws_license_plugin = sanitize_text_field( $_POST['bws_install_plugin'] );
|
375 |
|
376 |
$bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key;
|
377 |
-
if ( is_multisite() )
|
378 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
379 |
-
else
|
380 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
|
|
381 |
|
382 |
-
$url = $plugins_array[ $bws_license_plugin ]['link'] . '&download_from=5';
|
383 |
-
|
|
|
384 |
<p>
|
385 |
-
<strong><?php
|
386 |
<br>
|
387 |
-
<?php
|
388 |
</p>
|
389 |
<p>
|
390 |
-
<a class="button button-secondary" target="_parent" href="<?php echo esc_url( $url ); ?>"><?php
|
391 |
</p>
|
392 |
<br>
|
393 |
<p>
|
394 |
-
<strong><?php
|
395 |
<br>
|
396 |
-
<a target="_blank" href="https://bestwebsoft.com/documentation/how-to-install-a-wordpress-product/how-to-install-a-wordpress-plugin/"><?php
|
397 |
</p>
|
398 |
<p>
|
399 |
-
<strong><?php
|
400 |
<br>
|
401 |
-
<a target="_blank" href="https://bestwebsoft.com/documentation/"><?php
|
402 |
<br>
|
403 |
-
<a target="_blank" href="https://www.youtube.com/user/bestwebsoft"><?php
|
404 |
<br>
|
405 |
-
<a target="_blank" href="https://support.bestwebsoft.com"><?php
|
406 |
</p>
|
407 |
<p>
|
408 |
-
<strong><?php
|
409 |
<br>
|
410 |
-
<?php
|
411 |
-
|
|
|
|
|
|
|
|
|
412 |
</p>
|
413 |
-
<p><a href="<?php echo esc_url( self_admin_url( $current_page ) ); ?>" target="_parent"><?php
|
414 |
-
|
|
|
415 |
$category_href = $current_page;
|
416 |
-
if ( 'all'
|
417 |
-
$category_href .= '&category=' . $plugin_category;
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
<?php foreach ( $bws_plugins_category as $category_key => $category_value ) { ?>
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
|
|
|
|
|
|
|
|
|
|
450 |
<?php } ?>
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
<?php
|
|
|
456 |
foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
|
457 |
|
458 |
-
if ( 'all'
|
459 |
continue;
|
|
|
460 |
|
461 |
$key_plugin_explode = explode( '/', $key_plugin );
|
462 |
|
463 |
-
$icon
|
464 |
$is_pro_isset = isset( $value_plugin['pro_version'] );
|
465 |
$is_installed = array_key_exists( $key_plugin, $all_plugins );
|
466 |
-
$is_active
|
467 |
|
468 |
$is_pro_installed = $is_pro_active = false;
|
469 |
if ( $is_pro_isset ) {
|
470 |
$is_pro_installed = array_key_exists( $value_plugin['pro_version'], $all_plugins );
|
471 |
-
$is_pro_active
|
472 |
}
|
473 |
|
474 |
-
if ( ( isset( $_GET['sub'] ) && 'installed'
|
475 |
-
|
476 |
continue;
|
|
|
477 |
|
478 |
$link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . esc_url( $value_plugin['install_url'] ) . '" target="_blank"' : 'href="' . esc_url( self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $key_plugin_explode[0] . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal"';
|
479 |
|
480 |
-
$nothing_found = false;
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
|
|
|
|
527 |
}
|
528 |
-
}
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
<a class="button button-secondary" href="<?php echo esc_url( wp_nonce_url( self_admin_url( $current_page . '&bws_activate_plugin=' . $value_plugin['pro_version'] ), 'bws_activate_plugin' . $value_plugin['pro_version'] ) ); ?>" title="<?php _e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php _e( 'Activate', 'bestwebsoft' ); ?></a>
|
540 |
-
<?php } elseif ( ! empty( $plugins_array ) && isset( $value_plugin['pro_version'] ) && array_key_exists( $value_plugin['pro_version'], $plugins_array ) ) { ?>
|
541 |
-
<form method="post" action="">
|
542 |
-
<input type="submit" class="button button-secondary" value="<?php _e( 'Get Pro', 'bestwebsoft' ); ?>" />
|
543 |
-
<input type="hidden" name="bws_plugin_action_submit" value="submit" />
|
544 |
-
<input type="hidden" name="bws_install_plugin" value="<?php echo $value_plugin['pro_version']; ?>" />
|
545 |
-
<?php wp_nonce_field( plugin_basename(__FILE__), 'bws_license_install_nonce_name' ); ?>
|
546 |
-
</form>
|
547 |
-
<?php } elseif ( $is_installed ) { ?>
|
548 |
-
<a class="button button-secondary" href="<?php echo esc_url( wp_nonce_url( self_admin_url( $current_page . '&bws_activate_plugin=' . $key_plugin ), 'bws_activate_plugin' . $key_plugin ) ); ?>" title="<?php _e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php _e( 'Activate', 'bestwebsoft' ); ?></a>
|
549 |
-
<?php } else {
|
550 |
-
$install_url = isset( $value_plugin['install_url'] ) ? $value_plugin['install_url'] : network_admin_url( 'plugin-install.php?tab=search&type=term&s=' . str_replace( array( ' ', '-' ), '+', str_replace( '&', '', $value_plugin['name'] ) ) . '+BestWebSoft&plugin-search-input=Search+Plugins' ); ?>
|
551 |
-
<a class="button button-secondary" href="<?php echo esc_url( $install_url ); ?>" title="<?php _e( 'Install this plugin', 'bestwebsoft' ); ?>" target="_blank"><?php _e( 'Install Now', 'bestwebsoft' ); ?></a>
|
552 |
-
<?php }
|
553 |
-
} ?>
|
554 |
-
</div>
|
555 |
-
</div>
|
556 |
-
<div class="clear"></div>
|
557 |
-
</div>
|
558 |
-
<?php }
|
559 |
-
if ( $nothing_found ) { ?>
|
560 |
-
<p class="description"><?php _e( 'Nothing found. Try another criteria.', 'bestwebsoft' ); ?></p>
|
561 |
<?php } ?>
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
<?php $sub_in_url = ( isset( $_GET['sub'] ) && in_array( $_GET['sub'], array( 'installed', 'not_installed' ) ) ) ? '&sub=' . $_GET['sub'] : ''; ?>
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
|
|
|
|
|
|
|
|
|
|
573 |
<?php foreach ( $bws_plugins_category as $category_key => $category_value ) { ?>
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
|
|
|
|
|
|
|
|
|
|
579 |
<?php } ?>
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
605 |
<?php } else { ?>
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
|
|
|
|
610 |
<?php } ?>
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
<?php } elseif ( 'bws_system_status'
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
635 |
<?php foreach ( $system_info as $info ) { ?>
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
<?php
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
|
|
|
|
|
|
649 |
<?php foreach ( $info['data'] as $key => $value ) { ?>
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
<?php } ?>
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
|
|
|
|
|
|
662 |
}
|
663 |
|
664 |
if ( ! function_exists( 'bws_get_banner_array' ) ) {
|
@@ -700,11 +866,11 @@ if ( ! function_exists( 'bws_get_banner_array' ) ) {
|
|
700 |
array( 'cptch_hide_banner_on_plugin_page', 'captcha-bws/captcha-bws.php', '3.8.4' ),
|
701 |
array( 'gllr_hide_banner_on_plugin_page', 'gallery-plugin/gallery-plugin.php', '3.9.1' ),
|
702 |
array( 'cntctfrm_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.62' ),
|
703 |
-
|
704 |
array( 'rtng_hide_banner_on_plugin_page', 'rating-bws/rating-bws.php', '1.0.0' ),
|
705 |
array( 'prflxtrflds_hide_banner_on_plugin_page', 'profile-extra-fields/profile-extra-fields.php', '1.1.3' ),
|
706 |
array( 'psttcsv_hide_banner_on_plugin_page', 'post-to-csv/post-to-csv.php', '1.3.4' ),
|
707 |
-
array( 'cstmdmnpg_hide_banner_on_plugin_page', 'custom-admin-page/custom-admin-page.php', '1.0.0' )
|
708 |
);
|
709 |
}
|
710 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Function for displaying BestWebSoft menu
|
4 |
+
* Version: 2.4.2
|
5 |
+
*/
|
6 |
|
7 |
+
if ( ! function_exists( 'bws_admin_enqueue_scripts' ) ) {
|
8 |
+
require_once dirname( __FILE__ ) . '/bws_functions.php';
|
9 |
+
}
|
10 |
|
11 |
if ( ! function_exists( 'bws_add_menu_render' ) ) {
|
12 |
function bws_add_menu_render() {
|
16 |
/**
|
17 |
* @deprecated 1.9.8 (15.12.2016)
|
18 |
*/
|
19 |
+
$is_main_page = isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'bws_panel', 'bws_themes', 'bws_system_status' ) );
|
20 |
+
$page = sanitize_text_field( wp_unslash( $_GET['page'] ) );
|
21 |
+
$tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : '';
|
22 |
|
23 |
+
if ( $is_main_page ) {
|
24 |
$current_page = 'admin.php?page=' . $page;
|
25 |
+
} else {
|
26 |
$current_page = isset( $_GET['tab'] ) ? 'admin.php?page=' . $page . '&tab=' . $tab : 'admin.php?page=' . $page;
|
27 |
+
}
|
28 |
|
29 |
+
if ( 'bws_panel' === $page || ( ! $is_main_page && '' === $tab ) ) {
|
30 |
|
31 |
+
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
|
32 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
33 |
+
}
|
34 |
|
35 |
+
/* Get $bws_plugins */
|
36 |
+
require dirname( __FILE__ ) . '/product_list.php';
|
37 |
|
38 |
+
$all_plugins = get_plugins();
|
39 |
+
$active_plugins = get_option( 'active_plugins' );
|
40 |
$sitewide_active_plugins = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'active_sitewide_plugins' ) : array();
|
41 |
+
$update_availible_all = get_site_transient( 'update_plugins' );
|
42 |
|
43 |
+
$plugin_category = isset( $_GET['category'] ) ? sanitize_text_field( wp_unslash( $_GET['category'] ) ) : 'all';
|
44 |
|
45 |
+
if ( ( isset( $_GET['sub'] ) && 'installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) ) || ! isset( $_GET['sub'] ) ) {
|
46 |
$bws_plugins_update_availible = $bws_plugins_expired = array();
|
47 |
foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
|
48 |
|
50 |
$bws_plugins_category[ $category_key ]['count'] = isset( $bws_plugins_category[ $category_key ]['count'] ) ? $bws_plugins_category[ $category_key ]['count'] + 1 : 1;
|
51 |
}
|
52 |
|
53 |
+
$is_installed = array_key_exists( $key_plugin, $all_plugins );
|
54 |
$is_pro_installed = false;
|
55 |
if ( isset( $value_plugin['pro_version'] ) ) {
|
56 |
$is_pro_installed = array_key_exists( $value_plugin['pro_version'], $all_plugins );
|
57 |
}
|
58 |
+
/* Check update_availible */
|
59 |
if ( ! empty( $update_availible_all ) && ! empty( $update_availible_all->response ) ) {
|
60 |
if ( $is_pro_installed && array_key_exists( $value_plugin['pro_version'], $update_availible_all->response ) ) {
|
61 |
unset( $bws_plugins[ $key_plugin ] );
|
62 |
+
$value_plugin['update_availible'] = $value_plugin['pro_version'];
|
63 |
$bws_plugins_update_availible[ $key_plugin ] = $value_plugin;
|
64 |
+
} elseif ( $is_installed && array_key_exists( $key_plugin, $update_availible_all->response ) ) {
|
65 |
unset( $bws_plugins[ $key_plugin ] );
|
66 |
+
$value_plugin['update_availible'] = $key_plugin;
|
67 |
$bws_plugins_update_availible[ $key_plugin ] = $value_plugin;
|
68 |
}
|
69 |
}
|
70 |
+
/* Check expired */
|
71 |
if ( $is_pro_installed && isset( $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ] ) &&
|
72 |
+
strtotime( $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ] ) < strtotime( gmdate( 'm/d/Y' ) ) ) {
|
73 |
unset( $bws_plugins[ $key_plugin ] );
|
74 |
+
$value_plugin['expired'] = $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ];
|
75 |
$bws_plugins_expired[ $key_plugin ] = $value_plugin;
|
76 |
}
|
77 |
}
|
84 |
}
|
85 |
}
|
86 |
|
87 |
+
/*** Membership */
|
88 |
+
$bws_license_plugin = 'bws_get_list_for_membership';
|
89 |
+
$bws_license_key = isset( $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) ? $bstwbsftwppdtplgns_options[ $bws_license_plugin ] : '';
|
90 |
$update_membership_list = true;
|
91 |
|
92 |
+
if ( isset( $_POST['bws_license_key'] ) ) {
|
93 |
+
$bws_license_key = sanitize_text_field( wp_unslash( $_POST['bws_license_key'] ) );
|
94 |
+
}
|
95 |
|
96 |
if ( isset( $_SESSION['bws_membership_time_check'] ) && isset( $_SESSION['bws_membership_list'] ) && $_SESSION['bws_membership_time_check'] < strtotime( '+12 hours' ) ) {
|
97 |
$update_membership_list = false;
|
98 |
+
$plugins_array = $_SESSION['bws_membership_list'];
|
99 |
}
|
100 |
|
101 |
+
if ( ( $update_membership_list && ! empty( $bws_license_key ) ) || ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_license_nonce_name' ) ) ) {
|
102 |
|
103 |
+
if ( '' !== $bws_license_key ) {
|
104 |
+
if ( 18 !== strlen( $bws_license_key ) ) {
|
105 |
$error = __( 'Wrong license key', 'bestwebsoft' );
|
106 |
} else {
|
107 |
|
108 |
+
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) {
|
109 |
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] + 1;
|
110 |
} else {
|
111 |
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = 1;
|
112 |
+
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] = time();
|
113 |
}
|
114 |
|
115 |
/* get Pro list */
|
116 |
+
$to_send = array();
|
117 |
+
$to_send['plugins'][ $bws_license_plugin ] = array();
|
118 |
+
$to_send['plugins'][ $bws_license_plugin ]['bws_license_key'] = $bws_license_key;
|
119 |
+
$options = array(
|
120 |
+
'timeout' => ( ( defined( 'DOING_CRON' ) && DOING_CRON ) ? 30 : 3 ),
|
121 |
+
'body' => array( 'plugins' => serialize( $to_send ) ),
|
122 |
+
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ),
|
123 |
+
);
|
124 |
$raw_response = wp_remote_post( 'https://bestwebsoft.com/wp-content/plugins/paid-products/plugins/pro-license-check/1.0/', $options );
|
125 |
|
126 |
+
if ( is_wp_error( $raw_response ) || 200 !== wp_remote_retrieve_response_code( $raw_response ) ) {
|
127 |
+
$error = __( 'Something went wrong. Please try again later. If the error appears again, please contact us', 'bestwebsoft' ) . ' <a href="https://support.bestwebsoft.com">BestWebSoft</a>. ' . __( 'We are sorry for inconvenience.', 'bestwebsoft' );
|
128 |
} else {
|
129 |
$response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
|
130 |
|
131 |
+
if ( is_array( $response ) && ! empty( $response ) ) {
|
132 |
foreach ( $response as $key => $value ) {
|
133 |
+
if ( 'wrong_license_key' === $value->package ) {
|
134 |
+
$error = __( 'Wrong license key.', 'bestwebsoft' );
|
135 |
+
} elseif ( 'wrong_domain' === $value->package ) {
|
136 |
$error = __( 'This license key is bound to another site. Change it via personal Client Area.', 'bestwebsoft' ) . '<a target="_blank" href="https://bestwebsoft.com/client-area">' . __( 'Log in', 'bestwebsoft' ) . '</a>';
|
137 |
+
} elseif ( 'you_are_banned' === $value->package ) {
|
138 |
+
$error = __( 'Unfortunately, you have exceeded the number of available tries per day.', 'bestwebsoft' );
|
139 |
+
} elseif ( 'time_out' === $value->package ) {
|
140 |
+
$error = sprintf( __( 'Unfortunately, Your license has expired. To continue getting top-priority support and plugin updates, you should extend it in your %s', 'bestwebsoft' ), ' <a href="https://bestwebsoft.com/client-area">Client Area</a>' );
|
141 |
+
} elseif ( 'duplicate_domen_for_trial' === $value->package ) {
|
142 |
+
$error = __( 'Unfortunately, the Pro licence was already installed to this domain. The Pro Trial license can be installed only once.', 'bestwebsoft' );
|
143 |
} elseif ( is_array( $value->package ) && ! empty( $value->package ) ) {
|
144 |
+
$plugins_array = $_SESSION['bws_membership_list'] = $value->package;
|
145 |
$_SESSION['bws_membership_time_check'] = strtotime( 'now' );
|
146 |
|
147 |
+
if ( isset( $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) && $bws_license_key === $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) {
|
148 |
$message = __( 'The license key is valid.', 'bestwebsoft' );
|
149 |
+
if ( isset( $value->time_out ) && '' !== $value->time_out ) {
|
150 |
$message .= ' ' . __( 'Your license will expire on', 'bestwebsoft' ) . ' ' . $value->time_out . '.';
|
151 |
+
}
|
152 |
} else {
|
153 |
$message = __( 'Congratulations! Pro Membership license is activated successfully.', 'bestwebsoft' );
|
154 |
}
|
157 |
}
|
158 |
}
|
159 |
} else {
|
160 |
+
$error = __( 'Something went wrong. Try again later or upload the plugin manually. We are sorry for inconvenience.', 'bestwebsoft' );
|
161 |
}
|
162 |
}
|
163 |
|
164 |
+
if ( is_multisite() ) {
|
165 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
166 |
+
} else {
|
167 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
168 |
+
}
|
169 |
}
|
170 |
} else {
|
171 |
+
$error = __( 'Please enter your license key.', 'bestwebsoft' );
|
172 |
}
|
173 |
}
|
174 |
+
} elseif ( 'bws_system_status' === $page || 'system-status' === $tab ) {
|
175 |
|
176 |
+
$all_plugins = get_plugins();
|
177 |
$active_plugins = get_option( 'active_plugins' );
|
178 |
+
$mysql_info = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" );
|
179 |
+
if ( is_array( $mysql_info ) ) {
|
180 |
$sql_mode = $mysql_info[0]->Value;
|
181 |
+
}
|
182 |
+
if ( empty( $sql_mode ) ) {
|
183 |
$sql_mode = __( 'Not set', 'bestwebsoft' );
|
184 |
+
}
|
185 |
|
186 |
+
$allow_url_fopen = ( ini_get( 'allow_url_fopen' ) ) ? __( 'On', 'bestwebsoft' ) : __( 'Off', 'bestwebsoft' );
|
187 |
+
$upload_max_filesize = ( ini_get( 'upload_max_filesize' ) ) ? ini_get( 'upload_max_filesize' ) : __( 'N/A', 'bestwebsoft' );
|
188 |
+
$post_max_size = ( ini_get( 'post_max_size' ) ) ? ini_get( 'post_max_size' ) : __( 'N/A', 'bestwebsoft' );
|
189 |
+
$max_execution_time = ( ini_get( 'max_execution_time' ) ) ? ini_get( 'max_execution_time' ) : __( 'N/A', 'bestwebsoft' );
|
190 |
+
$memory_limit = ( ini_get( 'memory_limit' ) ) ? ini_get( 'memory_limit' ) : __( 'N/A', 'bestwebsoft' );
|
191 |
+
$wp_memory_limit = ( defined( 'WP_MEMORY_LIMIT' ) ) ? WP_MEMORY_LIMIT : __( 'N/A', 'bestwebsoft' );
|
192 |
+
$memory_usage = ( function_exists( 'memory_get_usage' ) ) ? round( memory_get_usage() / 1024 / 1024, 2 ) . ' ' . __( 'Mb', 'bestwebsoft' ) : __( 'N/A', 'bestwebsoft' );
|
193 |
+
$exif_read_data = ( is_callable( 'exif_read_data' ) ) ? __( 'Yes', 'bestwebsoft' ) . ' ( V' . substr( phpversion( 'exif' ), 0, 4 ) . ')' : __( 'No', 'bestwebsoft' );
|
194 |
+
$iptcparse = ( is_callable( 'iptcparse' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' );
|
195 |
+
$xml_parser_create = ( is_callable( 'xml_parser_create' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' );
|
196 |
+
$theme = wp_get_theme();
|
197 |
|
198 |
if ( function_exists( 'is_multisite' ) ) {
|
199 |
$multisite = is_multisite() ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' );
|
205 |
'wp_environment' => array(
|
206 |
'name' => __( 'WordPress Environment', 'bestwebsoft' ),
|
207 |
'data' => array(
|
208 |
+
__( 'Home URL', 'bestwebsoft' ) => home_url(),
|
209 |
+
__( 'Website URL', 'bestwebsoft' ) => get_option( 'siteurl' ),
|
210 |
+
__( 'WP Version', 'bestwebsoft' ) => $wp_version,
|
211 |
+
__( 'WP Multisite', 'bestwebsoft' ) => $multisite,
|
212 |
+
__( 'WP Memory Limit', 'bestwebsoft' ) => $wp_memory_limit,
|
213 |
+
__( 'Active Theme', 'bestwebsoft' ) => $theme['Name'] . ' ' . $theme['Version'] . ' (' . sprintf( __( 'by %s', 'bestwebsoft' ), $theme['Author'] ) . ')',
|
214 |
),
|
215 |
),
|
216 |
'server_environment' => array(
|
217 |
'name' => __( 'Server Environment', 'bestwebsoft' ),
|
218 |
'data' => array(
|
219 |
+
__( 'Operating System', 'bestwebsoft' ) => PHP_OS,
|
220 |
+
__( 'Server', 'bestwebsoft' ) => isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_email( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : '',
|
221 |
+
__( 'PHP Version', 'bestwebsoft' ) => PHP_VERSION,
|
222 |
+
__( 'PHP Allow URL fopen', 'bestwebsoft' ) => $allow_url_fopen,
|
223 |
+
__( 'PHP Memory Limit', 'bestwebsoft' ) => $memory_limit,
|
224 |
+
__( 'Memory Usage', 'bestwebsoft' ) => $memory_usage,
|
225 |
+
__( 'PHP Max Upload Size', 'bestwebsoft' ) => $upload_max_filesize,
|
226 |
+
__( 'PHP Max Post Size', 'bestwebsoft' ) => $post_max_size,
|
227 |
+
__( 'PHP Max Script Execute Time', 'bestwebsoft' ) => $max_execution_time,
|
228 |
+
__( 'PHP Exif support', 'bestwebsoft' ) => $exif_read_data,
|
229 |
+
__( 'PHP IPTC support', 'bestwebsoft' ) => $iptcparse,
|
230 |
+
__( 'PHP XML support', 'bestwebsoft' ) => $xml_parser_create,
|
231 |
+
'$_SERVER[HTTP_HOST]' => isset( $_SERVER['HTTP_HOST'] ) ? sanitize_email( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : '',
|
232 |
+
'$_SERVER[SERVER_NAME]' => isset( $_SERVER['SERVER_NAME'] ) ? sanitize_email( wp_unslash( $_SERVER['SERVER_NAME'] ) ) : '',
|
233 |
),
|
234 |
),
|
235 |
+
'db' => array(
|
236 |
'name' => __( 'Database', 'bestwebsoft' ),
|
237 |
'data' => array(
|
238 |
+
__( 'WP DB version', 'bestwebsoft' ) => get_option( 'db_version' ),
|
239 |
+
__( 'MySQL version', 'bestwebsoft' ) => $wpdb->get_var( 'SELECT VERSION() AS version' ),
|
240 |
+
__( 'SQL Mode', 'bestwebsoft' ) => $sql_mode,
|
241 |
),
|
242 |
),
|
243 |
+
'active_plugins' => array(
|
244 |
+
'name' => __( 'Active Plugins', 'bestwebsoft' ),
|
245 |
+
'data' => array(),
|
246 |
+
'count' => 0,
|
247 |
+
),
|
248 |
+
'inactive_plugins' => array(
|
249 |
+
'name' => __( 'Inactive Plugins', 'bestwebsoft' ),
|
250 |
+
'data' => array(),
|
251 |
+
'count' => 0,
|
252 |
),
|
|
|
|
|
|
|
|
|
|
|
253 |
);
|
254 |
|
255 |
foreach ( $all_plugins as $path => $plugin ) {
|
256 |
$name = str_replace( 'by BestWebSoft', '', $plugin['Name'] );
|
257 |
if ( is_plugin_active( $path ) ) {
|
258 |
$system_info['active_plugins']['data'][ $name ] = sprintf( __( 'by %s', 'bestwebsoft' ), $plugin['Author'] ) . ' - ' . $plugin['Version'];
|
259 |
+
$system_info['active_plugins']['count'] = $system_info['active_plugins']['count'] + 1;
|
260 |
} else {
|
261 |
$system_info['inactive_plugins']['data'][ $name ] = sprintf( __( 'by %s', 'bestwebsoft' ), $plugin['Author'] ) . ' - ' . $plugin['Version'];
|
262 |
+
$system_info['inactive_plugins']['count'] = $system_info['inactive_plugins']['count'] + 1;
|
263 |
}
|
264 |
}
|
265 |
|
266 |
+
if ( ( isset( $_REQUEST['bwsmn_form_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit' ) ) || ( isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit_custom_email' ) ) ) {
|
267 |
if ( isset( $_REQUEST['bwsmn_form_email'] ) ) {
|
268 |
+
$email = sanitize_email( wp_unslash( $_REQUEST['bwsmn_form_email'] ) );
|
269 |
+
if ( '' === $email ) {
|
270 |
$error = __( 'Please enter a valid email address.', 'bestwebsoft' );
|
271 |
} else {
|
272 |
$message = sprintf( __( 'Email with system info is sent to %s.', 'bestwebsoft' ), $email );
|
273 |
}
|
274 |
} else {
|
275 |
+
$email = 'plugin_system_status@bestwebsoft.com';
|
276 |
$message = __( 'Thank you for contacting us.', 'bestwebsoft' );
|
277 |
}
|
278 |
|
279 |
+
if ( '' === $error ) {
|
280 |
+
$headers = 'MIME-Version: 1.0' . "\n";
|
281 |
+
$headers .= 'Content-type: text/html; charset=utf-8' . "\n";
|
282 |
+
$headers .= 'From: ' . get_option( 'admin_email' );
|
283 |
$message_text = '<html><head><title>System Info From ' . home_url() . '</title></head><body>';
|
284 |
foreach ( $system_info as $info ) {
|
285 |
if ( ! empty( $info['data'] ) ) {
|
286 |
$message_text .= '<h4>' . $info['name'];
|
287 |
+
if ( isset( $info['count'] ) ) {
|
288 |
$message_text .= ' (' . $info['count'] . ')';
|
289 |
+
}
|
290 |
$message_text .= '</h4><table>';
|
291 |
foreach ( $info['data'] as $key => $value ) {
|
292 |
$message_text .= '<tr><td>' . $key . '</td><td>' . $value . '</td></tr>';
|
295 |
}
|
296 |
}
|
297 |
$message_text .= '</body></html>';
|
298 |
+
$result = wp_mail( $email, 'System Info From ' . esc_url( home_url() ), wp_kses( $message_text ), $headers );
|
299 |
+
if ( true !== $result ) {
|
300 |
+
$error = __( 'Sorry, email message could not be delivered.', 'bestwebsoft' );
|
301 |
+
}
|
302 |
}
|
303 |
}
|
304 |
} ?>
|
305 |
+
<div class="bws-wrap">
|
306 |
+
<div class="bws-header">
|
307 |
+
<div class="bws-title">
|
308 |
+
<a href="<?php echo ( $is_main_page ) ? esc_url( self_admin_url( 'admin.php?page=bws_panel' ) ) : esc_url( self_admin_url( 'admin.php?page=' . $page ) ); ?>">
|
309 |
+
<span class="bws-logo bwsicons bwsicons-bws-logo"></span>
|
310 |
+
BestWebSoft
|
311 |
+
<span>panel</span>
|
312 |
+
</a>
|
313 |
+
</div>
|
314 |
+
<div class="bws-menu-item-icon">•••</div>
|
315 |
+
<div class="bws-nav-tab-wrapper">
|
316 |
<?php if ( $is_main_page ) { ?>
|
317 |
+
<a class="bws-nav-tab <?php
|
318 |
+
if ( 'bws_panel' === $page ) {
|
319 |
+
echo esc_attr( ' bws-nav-tab-active' );
|
320 |
+
}
|
321 |
+
?>" href="<?php echo esc_url( self_admin_url( 'admin.php?page=bws_panel' ) ); ?>"><?php esc_html_e( 'Plugins', 'bestwebsoft' );
|
322 |
+
?>
|
323 |
+
</a>
|
324 |
+
<!-- pls -->
|
325 |
+
<a class="bws-nav-tab <?php
|
326 |
+
if ( 'bws_themes' === $page ) {
|
327 |
+
echo esc_attr( ' bws-nav-tab-active' );
|
328 |
+
}
|
329 |
+
?>" href="<?php echo esc_url( self_admin_url( 'admin.php?page=bws_themes' ) ); ?>"><?php esc_html_e( 'Themes', 'bestwebsoft' ); ?></a>
|
330 |
+
<a class="bws-nav-tab <?php
|
331 |
+
if ( 'bws_system_status' === $page ) {
|
332 |
+
echo esc_attr( ' bws-nav-tab-active' );
|
333 |
+
}
|
334 |
+
?>" href="<?php echo esc_url( self_admin_url( 'admin.php?page=bws_system_status' ) ); ?>"><?php esc_html_e( 'System status', 'bestwebsoft' );
|
335 |
+
?>
|
336 |
+
</a>
|
337 |
<?php } else { ?>
|
338 |
+
<a class="bws-nav-tab <?php
|
339 |
+
if ( ! isset( $_GET['tab'] ) ) {
|
340 |
+
echo esc_attr( ' bws-nav-tab-active' );
|
341 |
+
}
|
342 |
+
?>" href="<?php echo esc_url( self_admin_url( 'admin.php?page=' . $page ) ); ?>"><?php esc_html_e( 'Plugins', 'bestwebsoft' );
|
343 |
+
?>
|
344 |
+
</a>
|
345 |
+
<!-- pls -->
|
346 |
+
<a class="bws-nav-tab <?php
|
347 |
+
if ( 'themes' === $tab ) {
|
348 |
+
echo esc_attr( ' bws-nav-tab-active' );
|
349 |
+
}
|
350 |
+
?>" href="<?php echo esc_url( self_admin_url( 'admin.php?page=' . $page . '&tab=themes' ) ); ?>"><?php esc_html_e( 'Themes', 'bestwebsoft' );
|
351 |
+
?>
|
352 |
+
</a>
|
353 |
+
<!-- end pls -->
|
354 |
+
<a class="bws-nav-tab <?php
|
355 |
+
if ( 'system-status' === $tab ) {
|
356 |
+
echo esc_attr( ' bws-nav-tab-active' );
|
357 |
+
}
|
358 |
+
?>" href="<?php echo esc_url( self_admin_url( 'admin.php?page=' . $page . '&tab=system-status' ) ); ?>"><?php esc_html_e( 'System status', 'bestwebsoft' );
|
359 |
+
?>
|
360 |
+
</a>
|
361 |
<?php } ?>
|
362 |
+
</div>
|
363 |
+
<!-- pls -->
|
364 |
+
<div class="bws-help-links-wrapper">
|
365 |
+
<a href="https://support.bestwebsoft.com" target="_blank"><?php esc_html_e( 'Support', 'bestwebsoft' ); ?></a>
|
366 |
+
<a href="https://bestwebsoft.com/client-area" target="_blank" title="<?php esc_html_e( 'Manage purchased licenses & subscriptions', 'bestwebsoft' ); ?>">Client Area</a>
|
367 |
+
</div>
|
368 |
+
<!-- end pls -->
|
369 |
+
<div class="clear"></div>
|
370 |
+
</div>
|
371 |
+
<?php if ( ( 'bws_panel' === $page || ( ! isset( $_GET['tab'] ) && ! $is_main_page ) ) && ! isset( $_POST['bws_plugin_action_submit'] ) ) { ?>
|
372 |
+
<div class="bws-membership-wrap">
|
373 |
+
<div class="bws-membership-backround"></div>
|
374 |
+
<div class="bws-membership">
|
375 |
+
<div class="bws-membership-title"><?php printf( esc_html__( 'Get Access to %s+ Premium Plugins', 'bestwebsoft' ), '30' ); ?></div>
|
376 |
+
<form class="bws-membership-form" method="post" action="">
|
377 |
+
<span class="bws-membership-link"><a target="_blank" href="https://bestwebsoft.com/membership/"><?php esc_html_e( 'Subscribe to Pro Membership', 'bestwebsoft' ); ?></a> <?php esc_html_e( 'or', 'bestwebsoft' ); ?></span>
|
378 |
+
<?php
|
379 |
+
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) &&
|
380 |
+
'5' < $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] &&
|
381 |
+
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) {
|
382 |
+
?>
|
383 |
+
<div class="bws_form_input_wrap">
|
384 |
+
<input disabled="disabled" type="text" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" />
|
385 |
+
<div class="bws_error"><?php esc_html_e( 'Unfortunately, you have exceeded the number of available tries per day.', 'bestwebsoft' ); ?></div>
|
386 |
+
</div>
|
387 |
+
<input disabled="disabled" type="submit" class="bws-button" value="<?php esc_html_e( 'Check license key', 'bestwebsoft' ); ?>" />
|
388 |
<?php } else { ?>
|
389 |
+
<div class="bws_form_input_wrap">
|
390 |
+
<input
|
391 |
+
<?php
|
392 |
+
if ( '' !== $error ) {
|
393 |
+
echo 'class="bws_input_error"';}
|
394 |
+
?>
|
395 |
+
type="text" placeholder="<?php esc_html_e( 'Enter your license key', 'bestwebsoft' ); ?>" maxlength="100" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" />
|
396 |
+
<div class="bws_error"
|
397 |
+
<?php
|
398 |
+
if ( '' === $error ) {
|
399 |
+
echo 'style="display:none"';}
|
400 |
+
?>
|
401 |
+
><?php echo esc_html( $error ); ?></div>
|
402 |
+
</div>
|
403 |
+
<input type="hidden" name="bws_license_plugin" value="<?php echo esc_attr( $bws_license_plugin ); ?>" />
|
404 |
+
<input type="hidden" name="bws_license_submit" value="submit" />
|
405 |
<?php if ( empty( $plugins_array ) ) { ?>
|
406 |
+
<input type="submit" class="bws-button" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" />
|
407 |
<?php } else { ?>
|
408 |
+
<input type="submit" class="bws-button" value="<?php esc_html_e( 'Check license key', 'bestwebsoft' ); ?>" />
|
409 |
<?php } ?>
|
410 |
+
<?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_license_nonce_name' ); ?>
|
411 |
<?php } ?>
|
412 |
+
</form>
|
413 |
+
<div class="clear"></div>
|
414 |
+
</div>
|
415 |
+
</div>
|
416 |
<?php } ?>
|
417 |
+
<!-- end pls -->
|
418 |
+
<div class="bws-wrap-content wrap">
|
419 |
+
<?php if ( 'bws_panel' === $page || ( ! isset( $_GET['tab'] ) && ! $is_main_page ) ) { ?>
|
420 |
+
<div class="updated notice is-dismissible inline"
|
421 |
+
<?php
|
422 |
+
if ( '' === $message || '' !== $error ) {
|
423 |
+
echo 'style="display:none"';}
|
424 |
+
?>
|
425 |
+
><p><?php echo esc_html( $message ); ?></p></div>
|
426 |
+
<h1>
|
427 |
+
<?php esc_html_e( 'Plugins', 'bestwebsoft' ); ?>
|
428 |
+
<a href="<?php echo esc_url( self_admin_url( 'plugin-install.php?tab=upload' ) ); ?>" class="upload page-title-action add-new-h2"><?php esc_html_e( 'Upload Plugin', 'bestwebsoft' ); ?></a>
|
429 |
+
</h1>
|
430 |
+
<?php
|
431 |
+
if ( isset( $_GET['error'] ) ) {
|
432 |
+
if ( isset( $_GET['charsout'] ) ) {
|
433 |
+
$errmsg = sprintf( __( 'The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.' ), intval( $_GET['charsout'] ) );
|
434 |
+
} else {
|
435 |
+
$errmsg = __( 'Plugin could not be activated because it triggered a <strong>fatal error</strong>.' );
|
436 |
+
}
|
437 |
+
?>
|
438 |
+
<div id="message" class="error is-dismissible"><p><?php echo wp_kses( $errmsg ); ?></p></div>
|
439 |
<?php } elseif ( isset( $_GET['activate'] ) ) { ?>
|
440 |
+
<div id="message" class="updated notice is-dismissible"><p><?php esc_html_e( 'Plugin <strong>activated</strong>.' ); ?></p></div>
|
441 |
+
<?php
|
442 |
+
}
|
443 |
|
444 |
+
if ( isset( $_POST['bws_plugin_action_submit'] ) && isset( $_POST['bws_install_plugin'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_license_install_nonce_name' ) ) {
|
445 |
|
446 |
+
$bws_license_plugin = sanitize_text_field( wp_unslash( $_POST['bws_install_plugin'] ) );
|
447 |
|
448 |
$bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key;
|
449 |
+
if ( is_multisite() ) {
|
450 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
451 |
+
} else {
|
452 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
453 |
+
}
|
454 |
|
455 |
+
$url = $plugins_array[ $bws_license_plugin ]['link'] . '&download_from=5';
|
456 |
+
?>
|
457 |
+
<h2><?php esc_html_e( 'Download Pro Plugin', 'bestwebsoft' ); ?></h2>
|
458 |
<p>
|
459 |
+
<strong><?php esc_html_e( 'Your Pro plugin is ready', 'bestwebsoft' ); ?></strong>
|
460 |
<br>
|
461 |
+
<?php esc_html_e( 'Your plugin has been zipped, and now is ready to download.', 'bestwebsoft' ); ?>
|
462 |
</p>
|
463 |
<p>
|
464 |
+
<a class="button button-secondary" target="_parent" href="<?php echo esc_url( $url ); ?>"><?php esc_html_e( 'Download Now', 'bestwebsoft' ); ?></a>
|
465 |
</p>
|
466 |
<br>
|
467 |
<p>
|
468 |
+
<strong><?php esc_html_e( 'Need help installing the plugin?', 'bestwebsoft' ); ?></strong>
|
469 |
<br>
|
470 |
+
<a target="_blank" href="https://bestwebsoft.com/documentation/how-to-install-a-wordpress-product/how-to-install-a-wordpress-plugin/"><?php esc_html_e( 'How to install WordPress plugin from your admin Dashboard (ZIP archive)', 'bestwebsoft' ); ?></a>
|
471 |
</p>
|
472 |
<p>
|
473 |
+
<strong><?php esc_html_e( 'Get Started', 'bestwebsoft' ); ?></strong>
|
474 |
<br>
|
475 |
+
<a target="_blank" href="https://bestwebsoft.com/documentation/"><?php esc_html_e( 'Documentation', 'bestwebsoft' ); ?></a>
|
476 |
<br>
|
477 |
+
<a target="_blank" href="https://www.youtube.com/user/bestwebsoft"><?php esc_html_e( 'Video Instructions', 'bestwebsoft' ); ?></a>
|
478 |
<br>
|
479 |
+
<a target="_blank" href="https://support.bestwebsoft.com"><?php esc_html_e( 'Knowledge Base', 'bestwebsoft' ); ?></a>
|
480 |
</p>
|
481 |
<p>
|
482 |
+
<strong><?php esc_html_e( 'Licenses & Domains', 'bestwebsoft' ); ?></strong>
|
483 |
<br>
|
484 |
+
<?php
|
485 |
+
printf(
|
486 |
+
'Manage your license(-s) and change domain names using the %s at BestWebSoft.',
|
487 |
+
'<a target="_blank" href="https://bestwebsoft.com/client-area">' . esc_html__( 'Client Area', 'bestwebsoft' ) . '</a>'
|
488 |
+
);
|
489 |
+
?>
|
490 |
</p>
|
491 |
+
<p><a href="<?php echo esc_url( self_admin_url( $current_page ) ); ?>" target="_parent"><?php esc_html_e( 'Return to BestWebSoft Panel', 'bestwebsoft' ); ?></a></p>
|
492 |
+
<?php
|
493 |
+
} else {
|
494 |
$category_href = $current_page;
|
495 |
+
if ( 'all' !== $plugin_category ) {
|
496 |
+
$category_href .= '&category=' . $plugin_category;
|
497 |
+
}
|
498 |
+
?>
|
499 |
+
<ul class="subsubsub">
|
500 |
+
<li>
|
501 |
+
<a
|
502 |
+
<?php
|
503 |
+
if ( ! isset( $_GET['sub'] ) ) {
|
504 |
+
echo 'class="current" ';}
|
505 |
+
?>
|
506 |
+
href="<?php echo esc_url( self_admin_url( $category_href ) ); ?>"><?php esc_html_e( 'All', 'bestwebsoft' ); ?></a>
|
507 |
+
</li> |
|
508 |
+
<li>
|
509 |
+
<a
|
510 |
+
<?php
|
511 |
+
if ( isset( $_GET['sub'] ) && 'installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) ) {
|
512 |
+
echo 'class="current" ';}
|
513 |
+
?>
|
514 |
+
href="<?php echo esc_url( self_admin_url( $category_href . '&sub=installed' ) ); ?>"><?php esc_html_e( 'Installed', 'bestwebsoft' ); ?></a>
|
515 |
+
</li> |
|
516 |
+
<li>
|
517 |
+
<a
|
518 |
+
<?php
|
519 |
+
if ( isset( $_GET['sub'] ) && 'not_installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) ) {
|
520 |
+
echo 'class="current" ';}
|
521 |
+
?>
|
522 |
+
href="<?php echo esc_url( self_admin_url( $category_href . '&sub=not_installed' ) ); ?>"><?php esc_html_e( 'Not Installed', 'bestwebsoft' ); ?></a>
|
523 |
+
</li>
|
524 |
+
</ul>
|
525 |
+
<div class="clear"></div>
|
526 |
+
<div class="bws-filter-top">
|
527 |
+
<h2>
|
528 |
+
<span class="bws-toggle-indicator"></span>
|
529 |
+
<?php esc_html_e( 'Filter results', 'bestwebsoft' ); ?>
|
530 |
+
</h2>
|
531 |
+
<div class="bws-filter-top-inside">
|
532 |
+
<div class="bws-filter-title"><?php esc_html_e( 'Category', 'bestwebsoft' ); ?></div>
|
533 |
+
<ul class="bws-category">
|
534 |
+
<li>
|
535 |
+
<?php $sub_in_url = ( isset( $_GET['sub'] ) && in_array( sanitize_text_field( wp_unslash( $_GET['sub'] ) ), array( 'installed', 'not_installed' ) ) ) ? '&sub=' . sanitize_text_field( wp_unslash( $_GET['sub'] ) ) : ''; ?>
|
536 |
+
<a
|
537 |
+
<?php
|
538 |
+
if ( 'all' === $plugin_category ) {
|
539 |
+
echo ' class="bws-active"';}
|
540 |
+
?>
|
541 |
+
href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url ) ); ?>"><?php esc_html_e( 'All', 'bestwebsoft' ); ?>
|
542 |
+
<span>(<?php echo count( $bws_plugins ); ?>)</span>
|
543 |
+
</a>
|
544 |
+
</li>
|
545 |
<?php foreach ( $bws_plugins_category as $category_key => $category_value ) { ?>
|
546 |
+
<li>
|
547 |
+
<a
|
548 |
+
<?php
|
549 |
+
if ( $category_key === $plugin_category ) {
|
550 |
+
echo ' class="bws-active"';}
|
551 |
+
?>
|
552 |
+
href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url . '&category=' . $category_key ) ); ?>"><?php echo esc_html( $category_value['name'] ); ?>
|
553 |
+
<span>(<?php echo intval( $category_value['count'] ); ?>)</span>
|
554 |
+
</a>
|
555 |
+
</li>
|
556 |
<?php } ?>
|
557 |
+
</ul>
|
558 |
+
</div>
|
559 |
+
</div>
|
560 |
+
<div class="bws-products">
|
561 |
+
<?php
|
562 |
+
$nothing_found = true;
|
563 |
foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
|
564 |
|
565 |
+
if ( 'all' !== $plugin_category && isset( $bws_plugins_category[ $plugin_category ] ) && ! in_array( $plugin_category, $value_plugin['category'] ) ) {
|
566 |
continue;
|
567 |
+
}
|
568 |
|
569 |
$key_plugin_explode = explode( '/', $key_plugin );
|
570 |
|
571 |
+
$icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.png';
|
572 |
$is_pro_isset = isset( $value_plugin['pro_version'] );
|
573 |
$is_installed = array_key_exists( $key_plugin, $all_plugins );
|
574 |
+
$is_active = in_array( $key_plugin, $active_plugins ) || isset( $sitewide_active_plugins[ $key_plugin ] );
|
575 |
|
576 |
$is_pro_installed = $is_pro_active = false;
|
577 |
if ( $is_pro_isset ) {
|
578 |
$is_pro_installed = array_key_exists( $value_plugin['pro_version'], $all_plugins );
|
579 |
+
$is_pro_active = in_array( $value_plugin['pro_version'], $active_plugins ) || isset( $sitewide_active_plugins[ $value_plugin['pro_version'] ] );
|
580 |
}
|
581 |
|
582 |
+
if ( ( isset( $_GET['sub'] ) && 'installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) && ! $is_pro_installed && ! $is_installed ) ||
|
583 |
+
( isset( $_GET['sub'] ) && 'not_installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) && ( $is_pro_installed || $is_installed ) ) ) {
|
584 |
continue;
|
585 |
+
}
|
586 |
|
587 |
$link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . esc_url( $value_plugin['install_url'] ) . '" target="_blank"' : 'href="' . esc_url( self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $key_plugin_explode[0] . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal"';
|
588 |
|
589 |
+
$nothing_found = false;
|
590 |
+
?>
|
591 |
+
<div class="bws_product_box
|
592 |
+
<?php
|
593 |
+
if ( $is_active || $is_pro_active ) {
|
594 |
+
echo esc_attr( ' bws_product_active' );}
|
595 |
+
?>
|
596 |
+
">
|
597 |
+
<div class="bws_product_image">
|
598 |
+
<a <?php echo wp_kses_data( $link_attr ); ?>><img src="<?php echo esc_url( $icon ); ?>"/></a>
|
599 |
+
</div>
|
600 |
+
<div class="bws_product_content">
|
601 |
+
<div class="bws_product_title"><a <?php echo wp_kses_data( $link_attr ); ?>><?php echo esc_html( $value_plugin['name'] ); ?></a></div>
|
602 |
+
<div class="bws-version">
|
603 |
+
<?php
|
604 |
+
if ( $is_pro_installed ) {
|
605 |
+
echo '<span';
|
606 |
+
if ( ! empty( $value_plugin['expired'] ) || ! empty( $value_plugin['update_availible'] ) ) {
|
607 |
+
echo ' class="bws-update-available"';
|
608 |
+
}
|
609 |
+
echo '>v ' . esc_attr( $all_plugins[ $value_plugin['pro_version'] ]['Version'] ) . '</span>';
|
610 |
+
} elseif ( $is_installed ) {
|
611 |
+
echo '<span';
|
612 |
+
if ( ! empty( $value_plugin['expired'] ) || ! empty( $value_plugin['update_availible'] ) ) {
|
613 |
+
echo ' class="bws-update-available"';
|
614 |
+
}
|
615 |
+
echo '>v ' . esc_attr( $all_plugins[ $key_plugin ]['Version'] ) . '</span>';
|
616 |
+
} else {
|
617 |
+
echo '<span>' . esc_html__( 'Not installed', 'bestwebsoft' ) . '</span>';
|
618 |
+
}
|
619 |
+
|
620 |
+
if ( ! empty( $value_plugin['expired'] ) ) {
|
621 |
+
echo ' - <a class="bws-update-now" href="https://support.bestwebsoft.com/hc/en-us/articles/202356359" target="_blank">' . esc_html__( 'Renew to get updates', 'bestwebsoft' ) . '</a>';
|
622 |
+
} elseif ( ! empty( $value_plugin['update_availible'] ) ) {
|
623 |
+
$r = $update_availible_all->response[ $value_plugin['update_availible'] ];
|
624 |
+
echo ' - <a class="bws-update-now" href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' . $value_plugin['update_availible'] ), 'upgrade-plugin_' . $value_plugin['update_availible'] ) ) . '" class="update-link" aria-label="' . sprintf( esc_html__( 'Update to v %s', 'bestwebsoft' ), $r->new_version ) . '">' . sprintf( esc_html__( 'Update to v %s', 'bestwebsoft' ), esc_html( $r->new_version ) ) . '</a>';
|
625 |
+
}
|
626 |
+
?>
|
627 |
+
</div>
|
628 |
+
<div class="bws_product_description">
|
629 |
+
<?php echo ( strlen( $value_plugin['description'] ) > 100 ) ? esc_html( mb_substr( $value_plugin['description'], 0, 100 ) ) . '...' : esc_html( $value_plugin['description'] ); ?>
|
630 |
+
</div>
|
631 |
+
<div class="bws_product_links">
|
632 |
+
<?php
|
633 |
+
if ( $is_active || $is_pro_active ) {
|
634 |
+
if ( $is_pro_isset ) {
|
635 |
+
if ( ! $is_pro_installed ) {
|
636 |
+
if ( ! empty( $plugins_array ) && array_key_exists( $value_plugin['pro_version'], $plugins_array ) ) {
|
637 |
+
?>
|
638 |
+
<form method="post" action="">
|
639 |
+
<input type="submit" class="button button-secondary" value="<?php esc_html_e( 'Get Pro', 'bestwebsoft' ); ?>" />
|
640 |
+
<input type="hidden" name="bws_plugin_action_submit" value="submit" />
|
641 |
+
<input type="hidden" name="bws_install_plugin" value="<?php echo esc_attr( $value_plugin['pro_version'] ); ?>" />
|
642 |
+
<?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_license_install_nonce_name' ); ?>
|
643 |
+
</form>
|
644 |
+
<?php } else { ?>
|
645 |
+
<a class="button button-secondary bws_upgrade_button" href="<?php echo esc_url( $bws_plugins[ $key_plugin ]['purchase'] ); ?>" target="_blank"><?php esc_html_e( 'Upgrade to Pro', 'bestwebsoft' ); ?></a>
|
646 |
+
<?php
|
647 |
+
}
|
648 |
+
}
|
649 |
+
} else {
|
650 |
+
?>
|
651 |
+
<a class="bws_donate" href="https://bestwebsoft.com/donate/" target="_blank"><?php esc_html_e( 'Donate', 'bestwebsoft' ); ?></a> <span>|</span>
|
652 |
+
<?php
|
653 |
+
}
|
654 |
|
655 |
+
if ( $is_pro_active ) {
|
656 |
+
?>
|
657 |
+
<a class="bws_settings" href="<?php echo esc_url( self_admin_url( $bws_plugins[ $key_plugin ]['pro_settings'] ) ); ?>"><?php esc_html_e( 'Settings', 'bestwebsoft' ); ?></a>
|
658 |
+
<?php } else { ?>
|
659 |
+
<a class="bws_settings" href="<?php echo esc_url( self_admin_url( $bws_plugins[ $key_plugin ]['settings'] ) ); ?>"><?php esc_html_e( 'Settings', 'bestwebsoft' ); ?></a>
|
660 |
+
<?php
|
661 |
+
}
|
662 |
+
} else {
|
663 |
+
if ( $is_pro_installed ) {
|
664 |
+
?>
|
665 |
+
<a class="button button-secondary" href="<?php echo esc_url( wp_nonce_url( self_admin_url( $current_page . '&bws_activate_plugin=' . $value_plugin['pro_version'] ), 'bws_activate_plugin' . $value_plugin['pro_version'] ) ); ?>" title="<?php esc_html_e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php esc_html_e( 'Activate', 'bestwebsoft' ); ?></a>
|
666 |
+
<?php } elseif ( ! empty( $plugins_array ) && isset( $value_plugin['pro_version'] ) && array_key_exists( $value_plugin['pro_version'], $plugins_array ) ) { ?>
|
667 |
+
<form method="post" action="">
|
668 |
+
<input type="submit" class="button button-secondary" value="<?php esc_html_e( 'Get Pro', 'bestwebsoft' ); ?>" />
|
669 |
+
<input type="hidden" name="bws_plugin_action_submit" value="submit" />
|
670 |
+
<input type="hidden" name="bws_install_plugin" value="<?php echo esc_url( $value_plugin['pro_version'] ); ?>" />
|
671 |
+
<?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_license_install_nonce_name' ); ?>
|
672 |
+
</form>
|
673 |
+
<?php } elseif ( $is_installed ) { ?>
|
674 |
+
<a class="button button-secondary" href="<?php echo esc_url( wp_nonce_url( self_admin_url( $current_page . '&bws_activate_plugin=' . $key_plugin ), 'bws_activate_plugin' . $key_plugin ) ); ?>" title="<?php esc_html_e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php esc_html_e( 'Activate', 'bestwebsoft' ); ?></a>
|
675 |
+
<?php
|
676 |
+
} else {
|
677 |
+
$install_url = isset( $value_plugin['install_url'] ) ? $value_plugin['install_url'] : network_admin_url( 'plugin-install.php?tab=search&type=term&s=' . str_replace( array( ' ', '-' ), '+', str_replace( '&', '', $value_plugin['name'] ) ) . '+BestWebSoft&plugin-search-input=Search+Plugins' );
|
678 |
+
?>
|
679 |
+
<a class="button button-secondary" href="<?php echo esc_url( $install_url ); ?>" title="<?php esc_html_e( 'Install this plugin', 'bestwebsoft' ); ?>" target="_blank"><?php esc_html_e( 'Install Now', 'bestwebsoft' ); ?></a>
|
680 |
+
<?php
|
681 |
}
|
682 |
+
}
|
683 |
+
?>
|
684 |
+
</div>
|
685 |
+
</div>
|
686 |
+
<div class="clear"></div>
|
687 |
+
</div>
|
688 |
+
<?php
|
689 |
+
}
|
690 |
+
if ( $nothing_found ) {
|
691 |
+
?>
|
692 |
+
<p class="description"><?php esc_html_e( 'Nothing found. Try another criteria.', 'bestwebsoft' ); ?></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
693 |
<?php } ?>
|
694 |
+
</div>
|
695 |
+
<div id="bws-filter-wrapper">
|
696 |
+
<div class="bws-filter">
|
697 |
+
<div class="bws-filter-title"><?php esc_html_e( 'Category', 'bestwebsoft' ); ?></div>
|
698 |
+
<ul class="bws-category">
|
699 |
+
<li>
|
700 |
+
<?php $sub_in_url = ( isset( $_GET['sub'] ) && in_array( sanitize_text_field( wp_unslash( $_GET['sub'] ) ), array( 'installed', 'not_installed' ) ) ) ? '&sub=' . sanitize_text_field( wp_unslash( $_GET['sub'] ) ) : ''; ?>
|
701 |
+
<a
|
702 |
+
<?php
|
703 |
+
if ( 'all' === $plugin_category ) {
|
704 |
+
echo ' class="bws-active"';}
|
705 |
+
?>
|
706 |
+
href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url ) ); ?>"><?php esc_html_e( 'All', 'bestwebsoft' ); ?>
|
707 |
+
<span>(<?php echo count( $bws_plugins ); ?>)</span>
|
708 |
+
</a>
|
709 |
+
</li>
|
710 |
<?php foreach ( $bws_plugins_category as $category_key => $category_value ) { ?>
|
711 |
+
<li>
|
712 |
+
<a
|
713 |
+
<?php
|
714 |
+
if ( $category_key === $plugin_category ) {
|
715 |
+
echo ' class="bws-active"';}
|
716 |
+
?>
|
717 |
+
href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url . '&category=' . $category_key ) ); ?>"><?php echo esc_html( $category_value['name'] ); ?>
|
718 |
+
<span>(<?php echo intval( $category_value['count'] ); ?>)</span>
|
719 |
+
</a>
|
720 |
+
</li>
|
721 |
<?php } ?>
|
722 |
+
</ul>
|
723 |
+
</div>
|
724 |
+
</div><!-- #bws-filter-wrapper -->
|
725 |
+
<div class="clear"></div>
|
726 |
+
<?php
|
727 |
+
}
|
728 |
+
} elseif ( 'bws_themes' === $page || 'themes' === $tab ) {
|
729 |
+
require dirname( __FILE__ ) . '/product_list.php';
|
730 |
+
?>
|
731 |
+
<h1><?php esc_html_e( 'Themes', 'bestwebsoft' ); ?></h1>
|
732 |
+
<div id="availablethemes" class="bws-availablethemes">
|
733 |
+
<div class="theme-browser content-filterable rendered">
|
734 |
+
<div class="themes wp-clearfix">
|
735 |
+
<?php
|
736 |
+
foreach ( $themes as $key => $theme ) {
|
737 |
+
$installed_theme = wp_get_theme( $theme->slug );
|
738 |
+
?>
|
739 |
+
<div class="theme" tabindex="0">
|
740 |
+
<div class="theme-screenshot">
|
741 |
+
<img src="<?php echo esc_url( bws_menu_url( 'icons/themes/' ) . $theme->slug . '.png' ); ?>" alt="" />
|
742 |
+
</div>
|
743 |
+
<div class="theme-author"><?php printf( esc_html__( 'By %s', 'bestwebsoft' ), 'BestWebSoft' ); ?></div>
|
744 |
+
<h3 class="theme-name"><?php echo esc_html( $theme->name ); ?></h3>
|
745 |
+
<div class="theme-actions">
|
746 |
+
<a class="button button-secondary preview install-theme-preview" href="<?php echo esc_url( $theme->href ); ?>" target="_blank"><?php esc_html_e( 'Learn More', 'bestwebsoft' ); ?></a>
|
747 |
+
</div>
|
748 |
+
<?php
|
749 |
+
if ( $installed_theme->exists() ) {
|
750 |
+
if ( $wp_version < '4.6' ) {
|
751 |
+
?>
|
752 |
+
<div class="theme-installed"><?php esc_html_e( 'Already Installed', 'bestwebsoft' ); ?></div>
|
753 |
<?php } else { ?>
|
754 |
+
<div class="notice notice-success notice-alt inline"><p><?php esc_html_e( 'Installed', 'bestwebsoft' ); ?></p></div>
|
755 |
+
<?php
|
756 |
+
}
|
757 |
+
}
|
758 |
+
?>
|
759 |
+
</div>
|
760 |
<?php } ?>
|
761 |
+
<br class="clear" />
|
762 |
+
</div>
|
763 |
+
</div>
|
764 |
+
<p><a class="bws_browse_link" href="https://bestwebsoft.com/products/wordpress/themes/" target="_blank"><?php esc_html_e( 'Browse More WordPress Themes', 'bestwebsoft' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span></a></p>
|
765 |
+
</div>
|
766 |
+
<?php } elseif ( 'bws_system_status' === $page || 'system-status' === $tab ) { ?>
|
767 |
+
<h1><?php esc_html_e( 'System status', 'bestwebsoft' ); ?></h1>
|
768 |
+
<div class="updated fade notice is-dismissible inline"
|
769 |
+
<?php
|
770 |
+
if ( ! ( isset( $_REQUEST['bwsmn_form_submit'] ) || isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) ) || '' !== $error ) {
|
771 |
+
echo 'style="display:none"';}
|
772 |
+
?>
|
773 |
+
><p><strong><?php echo esc_html( $message ); ?></strong></p></div>
|
774 |
+
<div class="error"
|
775 |
+
<?php
|
776 |
+
if ( '' === $error ) {
|
777 |
+
echo 'style="display:none"';}
|
778 |
+
?>
|
779 |
+
><p><strong><?php echo esc_html( $error ); ?></strong></p></div>
|
780 |
+
<form method="post" action="">
|
781 |
+
<p>
|
782 |
+
<input type="hidden" name="bwsmn_form_submit" value="submit" />
|
783 |
+
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Send to support', 'bestwebsoft' ); ?>" />
|
784 |
+
<?php wp_nonce_field( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit' ); ?>
|
785 |
+
</p>
|
786 |
+
</form>
|
787 |
+
<form method="post" action="">
|
788 |
+
<p>
|
789 |
+
<input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" />
|
790 |
+
<input type="submit" class="button" value="<?php esc_html_e( 'Send to custom email »', 'bestwebsoft' ); ?>" />
|
791 |
+
<input type="text" maxlength="250" value="" name="bwsmn_form_email" />
|
792 |
+
<?php wp_nonce_field( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit_custom_email' ); ?>
|
793 |
+
</p>
|
794 |
+
</form>
|
795 |
<?php foreach ( $system_info as $info ) { ?>
|
796 |
+
<table class="widefat bws-system-info" cellspacing="0">
|
797 |
+
<thead>
|
798 |
+
<tr>
|
799 |
+
<th colspan="2">
|
800 |
+
<strong>
|
801 |
+
<?php
|
802 |
+
echo esc_html( $info['name'] );
|
803 |
+
if ( isset( $info['count'] ) ) {
|
804 |
+
echo ' (' . intval( $info['count'] ) . ')';
|
805 |
+
}
|
806 |
+
?>
|
807 |
+
</strong>
|
808 |
+
</th>
|
809 |
+
</tr>
|
810 |
+
</thead>
|
811 |
+
<tbody>
|
812 |
<?php foreach ( $info['data'] as $key => $value ) { ?>
|
813 |
+
<tr>
|
814 |
+
<td scope="row"><?php echo esc_attr( $key ); ?></td>
|
815 |
+
<td scope="row"><?php echo esc_html( $value ); ?></td>
|
816 |
+
</tr>
|
817 |
<?php } ?>
|
818 |
+
</tbody>
|
819 |
+
</table>
|
820 |
+
<?php
|
821 |
+
}
|
822 |
+
}
|
823 |
+
?>
|
824 |
+
</div>
|
825 |
+
</div>
|
826 |
+
<?php
|
827 |
+
}
|
828 |
}
|
829 |
|
830 |
if ( ! function_exists( 'bws_get_banner_array' ) ) {
|
866 |
array( 'cptch_hide_banner_on_plugin_page', 'captcha-bws/captcha-bws.php', '3.8.4' ),
|
867 |
array( 'gllr_hide_banner_on_plugin_page', 'gallery-plugin/gallery-plugin.php', '3.9.1' ),
|
868 |
array( 'cntctfrm_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.62' ),
|
869 |
+
array( 'bwscrrntl_hide_banner_on_plugin_page', 'bws-car-rental/bws-car-rental.php', '0.0.1' ),
|
870 |
array( 'rtng_hide_banner_on_plugin_page', 'rating-bws/rating-bws.php', '1.0.0' ),
|
871 |
array( 'prflxtrflds_hide_banner_on_plugin_page', 'profile-extra-fields/profile-extra-fields.php', '1.1.3' ),
|
872 |
array( 'psttcsv_hide_banner_on_plugin_page', 'post-to-csv/post-to-csv.php', '1.3.4' ),
|
873 |
+
array( 'cstmdmnpg_hide_banner_on_plugin_page', 'custom-admin-page/custom-admin-page.php', '1.0.0' ),
|
874 |
);
|
875 |
}
|
876 |
}
|
bws_menu/class-bws-settings.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Displays the content on the plugin settings page
|
|
|
4 |
* @package BestWebSoft
|
5 |
* @since 1.9.8
|
6 |
*/
|
@@ -9,8 +10,8 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
9 |
class Bws_Settings_Tabs {
|
10 |
private $tabs;
|
11 |
private $pro_plugin_is_activated = false;
|
12 |
-
private $custom_code_args
|
13 |
-
private $bws_plugin_link
|
14 |
|
15 |
public $plugin_basename;
|
16 |
public $prefix;
|
@@ -33,7 +34,7 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
33 |
public $trial_days;
|
34 |
public $bws_hide_pro_option_exist = true;
|
35 |
|
36 |
-
public $forbid_view
|
37 |
public $change_permission_attr = '';
|
38 |
|
39 |
public $version;
|
@@ -49,6 +50,7 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
49 |
*
|
50 |
* The child class should call this constructor from its own constructor to override
|
51 |
* the default $args.
|
|
|
52 |
* @access public
|
53 |
*
|
54 |
* @param array|string $args
|
@@ -56,85 +58,90 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
56 |
public function __construct( $args = array() ) {
|
57 |
global $wp_version;
|
58 |
|
59 |
-
$args = wp_parse_args(
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
77 |
|
78 |
$args['plugins_info']['Name'] = str_replace( ' by BestWebSoft', '', $args['plugins_info']['Name'] );
|
79 |
|
80 |
-
$this->plugin_basename
|
81 |
-
$this->prefix
|
82 |
-
$this->plugins_info
|
83 |
-
$this->options
|
84 |
-
$this->default_options
|
85 |
-
$this->wp_slug
|
86 |
-
$this->demo_data
|
87 |
|
88 |
-
$this->tabs
|
89 |
-
$this->is_network_options
|
90 |
|
91 |
-
$this->doc_link
|
92 |
-
$this->doc_video_link
|
93 |
|
94 |
-
$this->link_key
|
95 |
-
$this->link_pn
|
96 |
-
$this->trial_days
|
97 |
-
$this->licenses
|
98 |
|
99 |
$this->pro_page = $this->bws_license_plugin = '';
|
100 |
/* get $bws_plugins */
|
101 |
-
require
|
102 |
if ( isset( $bws_plugins[ $this->plugin_basename ] ) ) {
|
103 |
if ( isset( $bws_plugins[ $this->plugin_basename ]['pro_settings'] ) ) {
|
104 |
-
$this->pro_page
|
105 |
-
$this->bws_license_plugin
|
106 |
-
}
|
107 |
|
108 |
-
$this->bws_plugin_link = substr( $bws_plugins[ $this->plugin_basename ]['link'],0
|
109 |
|
110 |
-
if ( ! empty( $this->link_key ) && ! empty( $this->link_pn ) )
|
111 |
-
$this->bws_plugin_link .= '?k=' . $this->link_key . '&pn=' . $this->link_pn . '&v=' . $this->plugins_info[
|
|
|
112 |
}
|
113 |
|
114 |
$this->hide_pro_tabs = bws_hide_premium_options_check( $this->options );
|
115 |
-
$this->version
|
116 |
-
$this->is_multisite
|
117 |
|
118 |
if ( empty( $this->pro_page ) && array_key_exists( 'license', $this->tabs ) ) {
|
119 |
-
$this->is_pro
|
120 |
$this->licenses[ $this->plugins_info['TextDomain'] ] = array(
|
121 |
'name' => $this->plugins_info['Name'],
|
122 |
'slug' => $this->plugins_info['TextDomain'],
|
123 |
-
'basename' => $this->plugin_basename
|
124 |
);
|
125 |
} else {
|
126 |
$this->licenses[ $this->plugins_info['TextDomain'] ] = array(
|
127 |
-
'name'
|
128 |
-
'slug'
|
129 |
-
'pro_slug'
|
130 |
-
'basename'
|
131 |
-
'pro_basename'
|
132 |
);
|
133 |
}
|
134 |
}
|
135 |
|
136 |
/**
|
137 |
* Displays the content of the "Settings" on the plugin settings page
|
|
|
138 |
* @access public
|
139 |
* @param void
|
140 |
* @return void
|
@@ -155,38 +162,41 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
155 |
$this->demo_data->bws_demo_confirm();
|
156 |
} else {
|
157 |
bws_show_settings_notice(); ?>
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
<?php $this->display_tabs(); ?>
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
|
|
|
|
|
|
177 |
if ( isset( $bstwbsftwppdtplgns_options['wrong_license_key'][ $this->plugin_basename ] ) || empty( $bstwbsftwppdtplgns_options['time_out'] ) || ! array_key_exists( $this->plugin_basename, $bstwbsftwppdtplgns_options['time_out'] ) ) {
|
178 |
-
$license_type
|
179 |
$license_status = __( 'Inactive', 'bestwebsoft' ) . ' <a href="#' . $this->prefix . '_license_tab" class="bws_trigger_tab_click">' . __( 'Learn More', 'bestwebsoft' ) . '</a>';
|
180 |
} else {
|
181 |
$finish = strtotime( $bstwbsftwppdtplgns_options['time_out'][ $this->plugin_basename ] );
|
182 |
-
$today
|
183 |
if ( isset( $bstwbsftwppdtplgns_options['trial'][ $this->plugin_basename ] ) ) {
|
184 |
$license_type = 'Trial Pro';
|
185 |
|
186 |
if ( $finish < $today ) {
|
187 |
$license_status = __( 'Expired', 'bestwebsoft' );
|
188 |
} else {
|
189 |
-
$daysleft
|
190 |
$license_status = sprintf( __( '%s day(-s) left', 'bestwebsoft' ), $daysleft );
|
191 |
}
|
192 |
$license_status .= '. <a target="_blank" href="' . esc_url( $this->plugins_info['PluginURI'] ) . '">' . __( 'Upgrade to Pro', 'bestwebsoft' ) . '</a>';
|
@@ -198,125 +208,157 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
198 |
$license_status = __( 'Active', 'bestwebsoft' );
|
199 |
}
|
200 |
}
|
201 |
-
}
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
|
|
208 |
<?php } ?>
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
|
|
|
|
223 |
<?php wp_nonce_field( $this->plugin_basename, 'bws_nonce_name' ); ?>
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
<?php
|
231 |
-
|
|
|
232 |
*/
|
233 |
do_action( __CLASS__ . '_display_metabox' );
|
234 |
|
235 |
-
if ( function_exists( 'bws_affiliate_postbox' ) )
|
236 |
-
bws_affiliate_postbox();
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
|
|
|
|
|
|
242 |
*/
|
243 |
-
do_action( __CLASS__ . '_display_second_postbox' );
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
254 |
}
|
255 |
|
256 |
/**
|
257 |
* Displays the Tabs
|
|
|
258 |
* @access public
|
259 |
* @param void
|
260 |
* @return void
|
261 |
*/
|
262 |
-
public function display_tabs() {
|
263 |
-
|
264 |
-
|
|
|
265 |
<?php $this->display_tabs_list(); ?>
|
266 |
-
|
267 |
<?php $this->display_tabs_content(); ?>
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
|
|
|
|
|
|
|
|
|
|
272 |
|
273 |
/**
|
274 |
* Displays the list of tabs
|
|
|
275 |
* @access private
|
276 |
* @return void
|
277 |
*/
|
278 |
private function display_tabs_list() {
|
279 |
foreach ( $this->tabs as $tab_slug => $data ) {
|
280 |
-
if ( ! empty( $data['is_pro'] ) && $this->hide_pro_tabs )
|
281 |
continue;
|
|
|
282 |
$tab_class = 'bws-tab-' . $tab_slug;
|
283 |
-
if ( ! empty( $data['is_pro'] ) )
|
284 |
$tab_class .= ' bws_pro_tab';
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
|
|
|
|
|
|
|
|
293 |
}
|
294 |
|
295 |
/**
|
296 |
* Displays the content of tabs
|
|
|
297 |
* @access private
|
298 |
* @param string $tab_slug
|
299 |
* @return void
|
300 |
*/
|
301 |
public function display_tabs_content() {
|
302 |
foreach ( $this->tabs as $tab_slug => $data ) {
|
303 |
-
if ( ! empty( $data['is_pro'] ) && $this->hide_pro_tabs )
|
304 |
-
continue;
|
305 |
-
|
306 |
-
|
|
|
|
|
|
|
307 |
if ( method_exists( $this, 'tab_' . $tab_slug ) ) {
|
308 |
call_user_func( array( $this, 'tab_' . $tab_slug ) );
|
309 |
do_action_ref_array( __CLASS__ . '_after_tab_' . $tab_slug, array( &$this ) );
|
310 |
-
}
|
311 |
-
|
312 |
-
|
|
|
|
|
313 |
}
|
314 |
|
315 |
/**
|
316 |
* Save all options from all tabs and display errors\messages
|
|
|
317 |
* @access public
|
318 |
* @param void
|
319 |
-
* @return
|
320 |
*/
|
321 |
public function save_all_tabs_options() {
|
322 |
$message = $notice = $error = '';
|
@@ -327,14 +369,18 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
327 |
/* Go Pro - check license key */
|
328 |
} elseif ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( $this->plugin_basename, 'bws_nonce_name' ) ) {
|
329 |
$result = $this->save_options_license_key();
|
330 |
-
if ( ! empty( $result['empty_field_error'] ) )
|
331 |
$error = $result['empty_field_error'];
|
332 |
-
|
|
|
333 |
$error = $result['error'];
|
334 |
-
|
|
|
335 |
$message = $result['message'];
|
336 |
-
|
|
|
337 |
$notice = $result['notice'];
|
|
|
338 |
/* check demo data */
|
339 |
} else {
|
340 |
$demo_result = ! empty( $this->demo_data ) ? $this->demo_data->bws_handle_demo_data() : false;
|
@@ -342,30 +388,30 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
342 |
if ( ! empty( $demo_result ) && is_array( $demo_result ) ) {
|
343 |
$error = $demo_result['error'];
|
344 |
$message = $demo_result['done'];
|
345 |
-
if ( ! empty( $demo_result['done'] ) && ! empty( $demo_result['options'] ) )
|
346 |
$this->options = $demo_result['options'];
|
|
|
347 |
}
|
348 |
/* Save options */
|
349 |
-
} elseif ( ! isset( $_REQUEST['bws_restore_default'] ) && ! isset( $_POST['bws_handle_demo'] ) && isset( $_REQUEST[ $this->prefix . '_form_submit'] ) && check_admin_referer( $this->plugin_basename, 'bws_nonce_name' ) ) {
|
350 |
/* save tabs */
|
351 |
$result = $this->save_options();
|
352 |
-
if ( ! empty( $result['error'] ) )
|
353 |
$error = $result['error'];
|
354 |
-
|
|
|
355 |
$message = $result['message'];
|
356 |
-
|
|
|
357 |
$notice = $result['notice'];
|
|
|
358 |
|
359 |
-
if ( ''
|
360 |
/* save `misc` tab */
|
361 |
$result = $this->save_options_misc();
|
362 |
-
if ( ! empty( $result['notice'] ) )
|
363 |
$notice .= $result['notice'];
|
364 |
-
|
365 |
-
|
366 |
-
if ( array_key_exists( 'custom_code', $this->tabs ) ) {
|
367 |
-
/* save `custom code` tab */
|
368 |
-
$this->save_options_custom_code();
|
369 |
}
|
370 |
}
|
371 |
}
|
@@ -375,25 +421,44 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
375 |
|
376 |
/**
|
377 |
* Display error\message\notice
|
|
|
378 |
* @access public
|
379 |
* @param $save_results - array with error\message\notice
|
380 |
* @return void
|
381 |
*/
|
382 |
public function display_messages( $save_results ) {
|
383 |
/**
|
384 |
-
*
|
385 |
*/
|
386 |
-
do_action( __CLASS__ . '_display_custom_messages', $save_results );
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
|
392 |
/**
|
393 |
* Save plugin options to the database
|
|
|
394 |
* @access public
|
395 |
* @param ab
|
396 |
-
* @return array The
|
397 |
* @abstract
|
398 |
*/
|
399 |
public function save_options() {
|
@@ -402,255 +467,272 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
402 |
|
403 |
/**
|
404 |
* Get 'custom_code' status and content
|
|
|
405 |
* @access private
|
406 |
*/
|
407 |
private function get_custom_code() {
|
408 |
-
global $bstwbsftwppdtplgns_options;
|
409 |
|
410 |
$this->custom_code_args = array(
|
411 |
'is_css_active' => false,
|
412 |
-
'content_css'
|
413 |
-
'css_writeable'
|
414 |
'is_php_active' => false,
|
415 |
-
'content_php'
|
416 |
-
'php_writeable'
|
417 |
-
'is_js_active'
|
418 |
-
'content_js'
|
419 |
-
'js_writeable'
|
420 |
);
|
421 |
|
422 |
-
if ( ! $this->upload_dir )
|
423 |
$this->upload_dir = wp_upload_dir();
|
|
|
424 |
|
425 |
$folder = $this->upload_dir['basedir'] . '/bws-custom-code';
|
426 |
-
if ( ! $this->upload_dir["error"] ) {
|
427 |
-
if ( ! is_dir( $folder ) )
|
428 |
-
wp_mkdir_p( $folder, 0755 );
|
429 |
-
|
430 |
-
$index_file = $this->upload_dir['basedir'] . '/bws-custom-code/index.php';
|
431 |
-
if ( ! file_exists( $index_file ) ) {
|
432 |
-
if ( $f = fopen( $index_file, 'w+' ) )
|
433 |
-
fclose( $f );
|
434 |
-
}
|
435 |
-
}
|
436 |
|
437 |
-
if ( $this->is_multisite )
|
438 |
$this->custom_code_args['blog_id'] = get_current_blog_id();
|
|
|
|
|
|
|
439 |
|
440 |
foreach ( array( 'css', 'php', 'js' ) as $extension ) {
|
441 |
-
$file
|
442 |
$real_file = $folder . '/' . $file;
|
443 |
-
|
444 |
-
if (
|
445 |
update_recently_edited( $real_file );
|
446 |
-
$this->custom_code_args["content_{$extension}"] = file_get_contents( $real_file );
|
447 |
if ( ( $this->is_multisite && isset( $bstwbsftwppdtplgns_options['custom_code'][ $this->custom_code_args['blog_id'] ][ $file ] ) ) ||
|
448 |
-
|
449 |
-
$this->custom_code_args["is_{$extension}_active"] = true;
|
|
|
|
|
|
|
450 |
}
|
451 |
-
if ( is_writeable( $real_file ) )
|
452 |
-
$this->custom_code_args["{$extension}_writeable"] = true;
|
453 |
} else {
|
454 |
-
$this->custom_code_args["{$extension}_writeable"] = true;
|
455 |
-
if ( 'php'
|
456 |
-
$this->custom_code_args["content_{$extension}"] =
|
|
|
457 |
}
|
458 |
}
|
459 |
}
|
460 |
|
461 |
/**
|
462 |
* Display 'custom_code' tab
|
|
|
463 |
* @access private
|
464 |
*/
|
465 |
-
private function tab_custom_code() {
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
<?php
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
! $this->custom_code_args['js_writeable'] ) { ?>
|
489 |
-
<p><em><?php printf( __( 'You need to make this files writable before you can save your changes. See %s the Codex %s for more information.', 'bestwebsoft' ),
|
490 |
-
'<a href="https://codex.wordpress.org/Changing_File_Permissions" target="_blank">',
|
491 |
-
'</a>' ); ?></em></p>
|
492 |
-
<?php }
|
493 |
-
|
494 |
-
foreach ( $list as $extension => $extension_data ) {
|
495 |
-
$name = 'js' == $extension ? 'JavaScript' : strtoupper( $extension ); ?>
|
496 |
-
<p><big>
|
497 |
-
<strong><?php echo $name; ?></strong>
|
498 |
-
<?php if ( ! $this->custom_code_args["{$extension}_writeable"] )
|
499 |
-
echo '(' . __( 'Browsing', 'bestwebsoft' ) . ')'; ?>
|
500 |
-
</big></p>
|
501 |
-
<p class="bws_info">
|
502 |
-
<label>
|
503 |
-
<input type="checkbox" name="bws_custom_<?php echo $extension; ?>_active" value="1" <?php if ( $this->custom_code_args["is_{$extension}_active"] ) echo "checked"; ?> />
|
504 |
-
<?php printf( __( 'Activate custom %s code.', 'bestwebsoft' ), $name ); ?>
|
505 |
-
</label>
|
506 |
-
</p>
|
507 |
-
<textarea cols="70" rows="25" name="bws_newcontent_<?php echo $extension; ?>" id="bws_newcontent_<?php echo $extension; ?>"><?php if ( isset( $this->custom_code_args["content_{$extension}"] ) ) echo esc_textarea( $this->custom_code_args["content_{$extension}"] ); ?></textarea>
|
508 |
-
<p class="bws_info">
|
509 |
-
<?php echo $extension_data['description']; ?>
|
510 |
-
<br>
|
511 |
-
<a href="<?php echo esc_url( $extension_data['learn_more_link'] ); ?>" target="_blank">
|
512 |
-
<?php printf( __( 'Learn more about %s', 'bestwebsoft' ), $name ); ?>
|
513 |
-
</a>
|
514 |
-
</p>
|
515 |
-
<?php }
|
516 |
-
}
|
517 |
-
|
518 |
-
/**
|
519 |
-
* Save plugin options to the database
|
520 |
-
* @access private
|
521 |
-
* @return array The action results
|
522 |
-
*/
|
523 |
-
private function save_options_custom_code() {
|
524 |
-
global $bstwbsftwppdtplgns_options;
|
525 |
-
$folder = $this->upload_dir['basedir'] . '/bws-custom-code';
|
526 |
-
|
527 |
-
foreach ( array( 'css', 'php', 'js' ) as $extension ) {
|
528 |
-
$file = 'bws-custom-code.' . $extension;
|
529 |
-
$real_file = $folder . '/' . $file;
|
530 |
-
|
531 |
-
if ( isset( $_POST["bws_newcontent_{$extension}"] ) &&
|
532 |
-
$this->custom_code_args["{$extension}_writeable"] ) {
|
533 |
-
$newcontent = trim( sanitize_text_field( $_POST["bws_newcontent_{$extension}"] ) );
|
534 |
-
if ( 'css' == $extension )
|
535 |
-
$newcontent = wp_kses( $newcontent, array( '\'', '\"' ) );
|
536 |
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
}
|
561 |
-
|
562 |
-
if ( $this->is_multisite )
|
563 |
-
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
564 |
-
else
|
565 |
-
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
566 |
}
|
567 |
|
568 |
/**
|
569 |
* Display 'misc' tab
|
|
|
570 |
* @access private
|
571 |
*/
|
572 |
private function tab_misc() {
|
573 |
-
global $bstwbsftwppdtplgns_options;
|
574 |
-
|
|
|
575 |
<?php $this->help_phrase(); ?>
|
576 |
-
|
577 |
-
<?php
|
578 |
-
|
|
|
579 |
*/
|
580 |
do_action( __CLASS__ . '_additional_misc_options' );
|
581 |
|
582 |
-
if ( ! $this->forbid_view && ! empty( $this->change_permission_attr ) ) {
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
|
|
|
|
|
|
587 |
<?php } else { ?>
|
588 |
-
|
589 |
-
<?php
|
590 |
-
|
|
|
591 |
*/
|
592 |
do_action( __CLASS__ . '_additional_misc_options_affected' );
|
593 |
-
if ( ! empty( $this->pro_page ) && $this->bws_hide_pro_option_exist ) {
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
603 |
<?php } ?>
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
}
|
623 |
|
624 |
/**
|
625 |
* Display 'Import / Export' tab
|
|
|
626 |
* @access private
|
627 |
*/
|
628 |
-
public function tab_import_export() {
|
629 |
-
|
|
|
630 |
<?php $this->help_phrase(); ?>
|
631 |
-
|
632 |
-
<?php
|
633 |
-
|
|
|
634 |
*/
|
635 |
do_action( __CLASS__ . '_additional_import_export_options' );
|
636 |
|
637 |
-
if ( ! $this->forbid_view && ! empty( $this->change_permission_attr ) ) {
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
|
|
|
|
|
|
642 |
<?php } else { ?>
|
643 |
-
|
644 |
-
<?php
|
645 |
-
|
|
|
646 |
*/
|
647 |
-
do_action( __CLASS__ . '_additional_import_export_options_affected' );
|
648 |
-
|
649 |
-
|
|
|
|
|
650 |
}
|
651 |
|
652 |
/**
|
653 |
* Save plugin options to the database
|
|
|
654 |
* @access private
|
655 |
*/
|
656 |
private function save_options_misc() {
|
@@ -659,81 +741,88 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
659 |
|
660 |
/* hide premium options */
|
661 |
if ( ! empty( $this->pro_page ) ) {
|
662 |
-
if ( isset( $_POST['bws_hide_premium_options'] ) ) {
|
663 |
-
$hide_result
|
664 |
$this->hide_pro_tabs = true;
|
665 |
-
$this->options
|
666 |
-
if ( ! empty( $hide_result['message'] ) )
|
667 |
$notice = $hide_result['message'];
|
668 |
-
|
|
|
669 |
update_site_option( $this->prefix . '_options', $this->options );
|
670 |
-
else
|
671 |
update_option( $this->prefix . '_options', $this->options );
|
672 |
-
|
|
|
673 |
if ( ! empty( $this->options['hide_premium_options'] ) ) {
|
674 |
$key = array_search( get_current_user_id(), $this->options['hide_premium_options'] );
|
675 |
-
if ( false !== $key )
|
676 |
unset( $this->options['hide_premium_options'][ $key ] );
|
677 |
-
|
|
|
678 |
update_site_option( $this->prefix . '_options', $this->options );
|
679 |
-
else
|
680 |
update_option( $this->prefix . '_options', $this->options );
|
|
|
681 |
}
|
682 |
$this->hide_pro_tabs = false;
|
683 |
} else {
|
684 |
if ( empty( $this->options['hide_premium_options'] ) ) {
|
685 |
$this->options['hide_premium_options'][] = get_current_user_id();
|
686 |
-
if ( $this->is_network_options )
|
687 |
update_site_option( $this->prefix . '_options', $this->options );
|
688 |
-
else
|
689 |
update_option( $this->prefix . '_options', $this->options );
|
|
|
690 |
}
|
691 |
$this->hide_pro_tabs = true;
|
692 |
}
|
693 |
}
|
694 |
/* Save 'Track Usage' option */
|
695 |
-
if ( isset( $_POST['bws_track_usage'] ) ) {
|
696 |
if ( empty( $bstwbsftwppdtplgns_options['track_usage']['products'][ $this->plugin_basename ] ) ) {
|
697 |
$bstwbsftwppdtplgns_options['track_usage']['products'][ $this->plugin_basename ] = true;
|
698 |
$track_usage = true;
|
699 |
}
|
700 |
} else {
|
701 |
if ( ! empty( $bstwbsftwppdtplgns_options['track_usage']['products'][ $this->plugin_basename ] ) ) {
|
702 |
-
unset( $bstwbsftwppdtplgns_options['track_usage']['products'][ $this->plugin_basename ] );
|
|
|
703 |
$track_usage = false;
|
704 |
}
|
705 |
}
|
706 |
if ( isset( $track_usage ) ) {
|
707 |
$usage_id = ! empty( $bstwbsftwppdtplgns_options['track_usage']['usage_id'] ) ? $bstwbsftwppdtplgns_options['track_usage']['usage_id'] : false;
|
708 |
/* send data */
|
709 |
-
$options
|
710 |
-
'timeout'
|
711 |
-
'body'
|
712 |
-
'url'
|
713 |
-
'wp_version'
|
714 |
-
'is_active'
|
715 |
-
'product'
|
716 |
-
'version'
|
717 |
-
'usage_id'
|
718 |
),
|
719 |
-
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
|
720 |
);
|
721 |
$raw_response = wp_remote_post( 'https://bestwebsoft.com/wp-content/plugins/products-statistics/track-usage/', $options );
|
722 |
|
723 |
-
if ( ! is_wp_error( $raw_response ) && 200
|
724 |
$response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
|
725 |
|
726 |
if ( is_array( $response ) &&
|
727 |
-
|
728 |
-
|
729 |
$bstwbsftwppdtplgns_options['track_usage']['usage_id'] = $response['usage_id'];
|
730 |
}
|
731 |
}
|
732 |
|
733 |
-
if ( $this->is_multisite )
|
734 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
735 |
-
else
|
736 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
|
|
737 |
}
|
738 |
|
739 |
return compact( 'notice' );
|
@@ -743,329 +832,346 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
743 |
*
|
744 |
*/
|
745 |
public function tab_license() {
|
746 |
-
global $wp_version, $bstwbsftwppdtplgns_options;
|
747 |
-
|
|
|
748 |
<?php $this->help_phrase(); ?>
|
749 |
-
|
750 |
<?php
|
751 |
foreach ( $this->licenses as $single_license ) {
|
752 |
-
$pro_plugin_name = ( strpos( $single_license['name'], 'Pro' ) ) ? $single_license['name'] : $single_license['name'] . '
|
753 |
-
if ( ! empty( $this->pro_page ) || ! empty( $single_license['pro_basename'] )
|
754 |
|
755 |
if ( $this->pro_plugin_is_activated && ( empty( $single_license['pro_basename'] ) || isset( $this->bws_license_plugin ) ) ) {
|
756 |
-
$url = 'https://bestwebsoft.com/wp-content/plugins/paid-products/plugins/downloads/?bws_first_download=' . $this->bws_license_plugin . '&bws_license_key=' . $bstwbsftwppdtplgns_options[ $this->bws_license_plugin ] . '&download_from=5';
|
|
|
757 |
<table class="form-table">
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
<strong><?php
|
763 |
<br>
|
764 |
-
<?php
|
765 |
</p>
|
766 |
<p>
|
767 |
-
<a class="button button-secondary" target="_parent" href="<?php echo esc_url( $url ); ?>"><?php
|
768 |
</p>
|
769 |
<br>
|
770 |
<p>
|
771 |
-
<strong><?php
|
772 |
<br>
|
773 |
-
<a target="_blank" href="https://bestwebsoft.com/documentation/how-to-install-a-wordpress-product/how-to-install-a-wordpress-plugin/"><?php
|
774 |
</p>
|
775 |
<br>
|
776 |
<p>
|
777 |
-
<strong><?php
|
778 |
<br>
|
779 |
-
<a target="_blank" href="https://bestwebsoft.com/documentation/"><?php
|
780 |
<br>
|
781 |
-
<a target="_blank" href="https://www.youtube.com/user/bestwebsoft"><?php
|
782 |
<br>
|
783 |
-
<a target="_blank" href="https://support.bestwebsoft.com"><?php
|
784 |
</p>
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
|
|
789 |
$attr = $license_key = '';
|
790 |
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['count'] ) &&
|
791 |
-
|
792 |
-
|
793 |
$attr = 'disabled="disabled"';
|
|
|
794 |
|
795 |
if ( ! empty( $single_license['pro_basename'] ) ) {
|
796 |
$license_key = ! empty( $bstwbsftwppdtplgns_options[ $single_license['pro_basename'] ] ) ? $bstwbsftwppdtplgns_options[ $single_license['pro_basename'] ] : '';
|
797 |
-
}
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
<?php
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
817 |
} else {
|
818 |
global $bstwbsftwppdtplgns_options;
|
819 |
-
$license_key = ( isset( $bstwbsftwppdtplgns_options[ $single_license['basename'] ] ) ) ? $bstwbsftwppdtplgns_options[ $single_license['basename'] ] : '';
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
|
|
|
|
|
|
|
|
846 |
|
847 |
/**
|
848 |
* Save plugin options to the database
|
|
|
849 |
* @access private
|
850 |
* @param ab
|
851 |
-
* @return array The
|
852 |
*/
|
853 |
private function save_options_license_key() {
|
854 |
-
global $wp_version, $bstwbsftwppdtplgns_options;
|
855 |
/*$empty_field_error - added to avoid error when 1 field is empty while another field contains license key*/
|
856 |
-
|
857 |
$error = $message = $empty_field_error = '';
|
858 |
-
|
859 |
-
foreach ( $this->licenses as $single_license) {
|
860 |
-
$bws_license_key = ( isset( $_POST[ ( ! empty( $single_license['pro_slug'] ) ) ? 'bws_license_key_' . $single_license['pro_slug'] : 'bws_license_key_' . $single_license['slug'] ] ) ) ? stripslashes( sanitize_text_field( $_POST[ ( ! empty( $single_license['pro_slug'] ) ) ? 'bws_license_key_' . $single_license['pro_slug'] : 'bws_license_key_' . $single_license['slug'] ] ) ) : '';
|
861 |
-
if ( '' != $bws_license_key ) {
|
862 |
-
if ( strlen( $bws_license_key ) != 18 ) {
|
863 |
-
$error = __( 'Wrong license key', 'bestwebsoft' );
|
864 |
-
} else {
|
865 |
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
872 |
}
|
873 |
-
$
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
912 |
}
|
913 |
|
914 |
-
if (
|
915 |
-
$
|
916 |
} else {
|
917 |
-
|
918 |
-
$single_response->time_out = NULL;
|
919 |
}
|
920 |
|
921 |
-
if ( isset( $single_response->
|
922 |
-
$
|
|
|
|
|
923 |
}
|
924 |
-
}
|
925 |
|
926 |
-
|
927 |
-
|
928 |
-
} else {
|
929 |
-
unset( $bstwbsftwppdtplgns_options['trial'][ $single_license['basename'] ] );
|
930 |
-
}
|
931 |
-
|
932 |
-
if ( isset( $single_response->nonprofit ) ) {
|
933 |
-
$bstwbsftwppdtplgns_options['nonprofit'][ $single_license['basename'] ] = 1;
|
934 |
-
} else {
|
935 |
-
unset( $bstwbsftwppdtplgns_options['nonprofit'][ $single_license['basename'] ] );
|
936 |
-
}
|
937 |
-
|
938 |
-
if ( ! isset( $bstwbsftwppdtplgns_options[ $single_license['basename'] ] ) || $bstwbsftwppdtplgns_options[ $single_license['basename'] ] != $bws_license_key ) {
|
939 |
-
$bstwbsftwppdtplgns_options[ $single_license['basename'] ] = $bws_license_key;
|
940 |
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
}
|
946 |
-
$update_option = true;
|
947 |
-
}
|
948 |
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
|
|
964 |
}
|
965 |
}
|
966 |
}
|
|
|
|
|
967 |
}
|
968 |
-
} else {
|
969 |
-
$error = __( 'Something went wrong. Please try again later. If the error appears again, please contact us', 'bestwebsoft' ) . ' <a href=https://support.bestwebsoft.com>BestWebSoft</a>. ' . __( 'We are sorry for inconvenience.', 'bestwebsoft' );
|
970 |
}
|
971 |
}
|
972 |
-
|
973 |
-
/* Go Pro */
|
974 |
-
} else {
|
975 |
-
|
976 |
-
$bws_license_plugin = stripslashes( sanitize_text_field( $_POST[ ( ! empty( $single_license['pro_slug'] ) ) ? 'bws_license_plugin_' . $single_license['pro_slug'] : 'bws_license_plugin_' . $single_license['slug'] ] ) );
|
977 |
-
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) {
|
978 |
-
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] + 1;
|
979 |
} else {
|
980 |
-
$
|
981 |
-
$
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
988 |
}
|
989 |
-
$this->all_plugins = get_plugins();
|
990 |
-
}
|
991 |
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
$
|
998 |
-
|
999 |
-
$options = array(
|
1000 |
-
'timeout' => ( ( defined( 'DOING_CRON' ) && DOING_CRON ) ? 30 : 3 ),
|
1001 |
-
'body' => array( 'plugins' => serialize( $to_send ) ),
|
1002 |
-
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
|
1003 |
-
);
|
1004 |
-
$raw_response = wp_remote_post( 'https://bestwebsoft.com/wp-content/plugins/paid-products/plugins/pro-license-check/1.0/', $options );
|
1005 |
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
$
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1022 |
}
|
1023 |
-
|
1024 |
-
|
1025 |
-
$bws_license_plugin = ( ! empty( $single_license['pro_basename'] ) ) ? $single_license['pro_basename'] : $single_license['basename'];
|
1026 |
|
1027 |
-
|
1028 |
-
|
|
|
|
|
|
|
1029 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1030 |
} else {
|
1031 |
-
|
|
|
1032 |
}
|
|
|
|
|
1033 |
}
|
1034 |
}
|
1035 |
-
|
1036 |
-
$bstwbsftwppdtplgns_options[ $
|
1037 |
-
|
1038 |
-
|
1039 |
-
if ( $this->is_multisite && is_plugin_active_for_network( ( ! empty( $single_license['pro_basename'] ) ) ? $single_license['pro_basename'] : $single_license['basename'] ) ) {
|
1040 |
-
/* if multisite and free plugin is network activated */
|
1041 |
-
$network_wide = true;
|
1042 |
-
} else {
|
1043 |
-
/* activate on a single blog */
|
1044 |
-
$network_wide = false;
|
1045 |
-
}
|
1046 |
-
activate_plugin( $bws_license_plugin, null, $network_wide );
|
1047 |
-
$this->pro_plugin_is_activated = true;
|
1048 |
}
|
1049 |
-
}
|
1050 |
-
/* add 'track_usage' for Pro version */
|
1051 |
-
if ( ! empty( $bstwbsftwppdtplgns_options['track_usage'][ ( ! empty( $single_license['pro_basename'] ) ) ? $single_license['pro_basename'] : $single_license['basename'] ] ) &&
|
1052 |
-
empty( $bstwbsftwppdtplgns_options['track_usage'][ $bws_license_plugin ] ) ) {
|
1053 |
-
$bstwbsftwppdtplgns_options['track_usage'][ $bws_license_plugin ] = $bstwbsftwppdtplgns_options['track_usage'][ ( ! empty( $single_license['pro_basename'] ) ) ? $single_license['pro_basename'] : $single_license['basename'] ];
|
1054 |
-
}
|
1055 |
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
|
1062 |
-
|
1063 |
-
|
|
|
1064 |
}
|
1065 |
}
|
|
|
|
|
1066 |
}
|
1067 |
-
} else {
|
1068 |
-
$empty_field_error = __( "Please, enter Your license key", 'bestwebsoft' );
|
1069 |
}
|
1070 |
}
|
1071 |
return compact( 'error', 'message', 'empty_field_error' );
|
@@ -1073,37 +1179,45 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
1073 |
|
1074 |
/**
|
1075 |
* Display help phrase
|
|
|
1076 |
* @access public
|
1077 |
* @param void
|
1078 |
-
* @return
|
1079 |
*/
|
1080 |
public function help_phrase() {
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
|
|
|
|
|
|
1088 |
echo '</a></div>';
|
|
|
1089 |
}
|
1090 |
|
1091 |
public function bws_pro_block_links() {
|
1092 |
-
global $wp_version;
|
1093 |
-
|
1094 |
-
|
1095 |
-
<?php
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
|
|
1099 |
</span>
|
1100 |
<?php } ?>
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
|
|
1104 |
|
1105 |
/**
|
1106 |
* Restore plugin options to defaults
|
|
|
1107 |
* @access public
|
1108 |
* @param void
|
1109 |
* @return void
|
@@ -1119,8 +1233,8 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
1119 |
*/
|
1120 |
$this->options = apply_filters( __CLASS__ . '_additional_restore_options', $this->default_options );
|
1121 |
if ( $this->is_network_options ) {
|
1122 |
-
$this->options['network_apply']
|
1123 |
-
$this->options['network_view']
|
1124 |
$this->options['network_change'] = '1';
|
1125 |
update_site_option( $this->prefix . '_options', $this->options );
|
1126 |
} else {
|
@@ -1128,35 +1242,37 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
1128 |
}
|
1129 |
}
|
1130 |
|
1131 |
-
public function add_request_feature() {
|
|
|
1132 |
<div id="bws_request_feature" class="widget-access-link">
|
1133 |
-
<button type="button" class="button" ><?php
|
1134 |
</div>
|
1135 |
-
<?php
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
|
|
1146 |
</label>
|
1147 |
</div>
|
1148 |
</div>
|
1149 |
<div class="bws-modal-footer">
|
1150 |
-
<a href="#" class="button disabled bws-modal-button button-primary">' .
|
1151 |
-
<span class="bws-modal-processing hidden">' .
|
1152 |
-
<span class="bws-modal-thank-you hidden">' .
|
1153 |
<div class="clear"></div>
|
1154 |
</div>
|
1155 |
</div>
|
1156 |
</div>';
|
1157 |
|
1158 |
-
$script =
|
1159 |
-
var modalHtml =
|
1160 |
\$modal = $( modalHtml );
|
1161 |
|
1162 |
\$modal.appendTo( $( 'body' ) );
|
@@ -1189,10 +1305,10 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
1189 |
var is_anonymous = ( \$modal.find( '.bws-modal-anonymous-label' ).find( 'input' ).is( ':checked' ) ) ? 0 : 1;
|
1190 |
|
1191 |
$.ajax({
|
1192 |
-
url
|
1193 |
-
method
|
1194 |
-
data
|
1195 |
-
'
|
1196 |
'plugin' : '" . $this->plugin_basename . "',
|
1197 |
'info' : info,
|
1198 |
'is_anonymous' : is_anonymous,
|
@@ -1246,14 +1362,13 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
1246 |
})(jQuery);";
|
1247 |
|
1248 |
/* add script in FOOTER */
|
1249 |
-
wp_register_script( 'bws-request-feature-dialog', '', array( 'jquery' ),
|
1250 |
wp_enqueue_script( 'bws-request-feature-dialog' );
|
1251 |
wp_add_inline_script( 'bws-request-feature-dialog', sprintf( $script ) );
|
1252 |
}
|
1253 |
}
|
1254 |
}
|
1255 |
|
1256 |
-
|
1257 |
/**
|
1258 |
* Called after the user has submitted his reason for deactivating the plugin.
|
1259 |
*
|
@@ -1263,67 +1378,75 @@ if ( ! function_exists( 'bws_submit_request_feature_action' ) ) {
|
|
1263 |
function bws_submit_request_feature_action() {
|
1264 |
global $bstwbsftwppdtplgns_options, $wp_version, $bstwbsftwppdtplgns_active_plugins, $current_user;
|
1265 |
|
1266 |
-
|
1267 |
|
1268 |
-
|
1269 |
-
$info = stripcslashes( sanitize_text_field( $_REQUEST['info'] ) );
|
1270 |
|
1271 |
-
|
1272 |
-
|
1273 |
-
}
|
1274 |
-
|
1275 |
-
$info = substr( $info, 0, 255 );
|
1276 |
-
$is_anonymous = isset( $_REQUEST['is_anonymous'] ) && 1 == $_REQUEST['is_anonymous'];
|
1277 |
|
1278 |
-
|
1279 |
-
|
1280 |
-
'info' => $info,
|
1281 |
-
);
|
1282 |
-
|
1283 |
-
if ( ! $is_anonymous ) {
|
1284 |
-
if ( ! isset( $bstwbsftwppdtplgns_options ) )
|
1285 |
-
$bstwbsftwppdtplgns_options = ( is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
1286 |
-
|
1287 |
-
if ( ! empty( $bstwbsftwppdtplgns_options['track_usage']['usage_id'] ) ) {
|
1288 |
-
$options['usage_id'] = $bstwbsftwppdtplgns_options['track_usage']['usage_id'];
|
1289 |
-
} else {
|
1290 |
-
$options['usage_id'] = false;
|
1291 |
-
$options['url'] = get_bloginfo( 'url' );
|
1292 |
-
$options['wp_version'] = $wp_version;
|
1293 |
-
$options['is_active'] = false;
|
1294 |
-
$options['version'] = $bstwbsftwppdtplgns_active_plugins[ $basename ]['Version'];
|
1295 |
}
|
1296 |
|
1297 |
-
$
|
1298 |
-
|
1299 |
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
'timeout' => 15,
|
1305 |
-
) );
|
1306 |
|
1307 |
-
if ( ! is_wp_error( $raw_response ) && 200 == wp_remote_retrieve_response_code( $raw_response ) ) {
|
1308 |
if ( ! $is_anonymous ) {
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
$bstwbsftwppdtplgns_options['track_usage']['usage_id'] = $response['usage_id'];
|
1313 |
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
|
|
|
|
|
|
|
|
1318 |
}
|
|
|
|
|
1319 |
}
|
1320 |
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1324 |
}
|
1325 |
exit;
|
1326 |
}
|
1327 |
}
|
1328 |
|
1329 |
-
add_action( 'wp_ajax_bws_submit_request_feature_action', 'bws_submit_request_feature_action' );
|
1 |
<?php
|
2 |
/**
|
3 |
* Displays the content on the plugin settings page
|
4 |
+
*
|
5 |
* @package BestWebSoft
|
6 |
* @since 1.9.8
|
7 |
*/
|
10 |
class Bws_Settings_Tabs {
|
11 |
private $tabs;
|
12 |
private $pro_plugin_is_activated = false;
|
13 |
+
private $custom_code_args = array();
|
14 |
+
private $bws_plugin_link = '';
|
15 |
|
16 |
public $plugin_basename;
|
17 |
public $prefix;
|
34 |
public $trial_days;
|
35 |
public $bws_hide_pro_option_exist = true;
|
36 |
|
37 |
+
public $forbid_view = false;
|
38 |
public $change_permission_attr = '';
|
39 |
|
40 |
public $version;
|
50 |
*
|
51 |
* The child class should call this constructor from its own constructor to override
|
52 |
* the default $args.
|
53 |
+
*
|
54 |
* @access public
|
55 |
*
|
56 |
* @param array|string $args
|
58 |
public function __construct( $args = array() ) {
|
59 |
global $wp_version;
|
60 |
|
61 |
+
$args = wp_parse_args(
|
62 |
+
$args,
|
63 |
+
array(
|
64 |
+
'plugin_basename' => '',
|
65 |
+
'prefix' => '',
|
66 |
+
'plugins_info' => array(),
|
67 |
+
'default_options' => array(),
|
68 |
+
'options' => array(),
|
69 |
+
'is_network_options' => false,
|
70 |
+
'tabs' => array(),
|
71 |
+
'doc_link' => '',
|
72 |
+
'doc_video_link' => '',
|
73 |
+
'wp_slug' => '',
|
74 |
+
'demo_data' => false,
|
75 |
+
/* if this is free version and pro exist */
|
76 |
+
'link_key' => '',
|
77 |
+
'link_pn' => '',
|
78 |
+
'trial_days' => false,
|
79 |
+
'licenses' => array(),
|
80 |
+
)
|
81 |
+
);
|
82 |
|
83 |
$args['plugins_info']['Name'] = str_replace( ' by BestWebSoft', '', $args['plugins_info']['Name'] );
|
84 |
|
85 |
+
$this->plugin_basename = $args['plugin_basename'];
|
86 |
+
$this->prefix = $args['prefix'];
|
87 |
+
$this->plugins_info = $args['plugins_info'];
|
88 |
+
$this->options = $args['options'];
|
89 |
+
$this->default_options = $args['default_options'];
|
90 |
+
$this->wp_slug = $args['wp_slug'];
|
91 |
+
$this->demo_data = $args['demo_data'];
|
92 |
|
93 |
+
$this->tabs = $args['tabs'];
|
94 |
+
$this->is_network_options = $args['is_network_options'];
|
95 |
|
96 |
+
$this->doc_link = $args['doc_link'];
|
97 |
+
$this->doc_video_link = $args['doc_video_link'];
|
98 |
|
99 |
+
$this->link_key = $args['link_key'];
|
100 |
+
$this->link_pn = $args['link_pn'];
|
101 |
+
$this->trial_days = $args['trial_days'];
|
102 |
+
$this->licenses = $args['licenses'];
|
103 |
|
104 |
$this->pro_page = $this->bws_license_plugin = '';
|
105 |
/* get $bws_plugins */
|
106 |
+
require dirname( __FILE__ ) . '/product_list.php';
|
107 |
if ( isset( $bws_plugins[ $this->plugin_basename ] ) ) {
|
108 |
if ( isset( $bws_plugins[ $this->plugin_basename ]['pro_settings'] ) ) {
|
109 |
+
$this->pro_page = $bws_plugins[ $this->plugin_basename ]['pro_settings'];
|
110 |
+
$this->bws_license_plugin = $bws_plugins[ $this->plugin_basename ]['pro_version'];
|
111 |
+
}
|
112 |
|
113 |
+
$this->bws_plugin_link = substr( $bws_plugins[ $this->plugin_basename ]['link'], 0, strpos( $bws_plugins[ $this->plugin_basename ]['link'], '?' ) );
|
114 |
|
115 |
+
if ( ! empty( $this->link_key ) && ! empty( $this->link_pn ) ) {
|
116 |
+
$this->bws_plugin_link .= '?k=' . $this->link_key . '&pn=' . $this->link_pn . '&v=' . $this->plugins_info['Version'] . '&wp_v=' . $wp_version;
|
117 |
+
}
|
118 |
}
|
119 |
|
120 |
$this->hide_pro_tabs = bws_hide_premium_options_check( $this->options );
|
121 |
+
$this->version = '1.0.0';
|
122 |
+
$this->is_multisite = is_multisite();
|
123 |
|
124 |
if ( empty( $this->pro_page ) && array_key_exists( 'license', $this->tabs ) ) {
|
125 |
+
$this->is_pro = true;
|
126 |
$this->licenses[ $this->plugins_info['TextDomain'] ] = array(
|
127 |
'name' => $this->plugins_info['Name'],
|
128 |
'slug' => $this->plugins_info['TextDomain'],
|
129 |
+
'basename' => $this->plugin_basename,
|
130 |
);
|
131 |
} else {
|
132 |
$this->licenses[ $this->plugins_info['TextDomain'] ] = array(
|
133 |
+
'name' => $this->plugins_info['Name'],
|
134 |
+
'slug' => $this->plugins_info['TextDomain'],
|
135 |
+
'pro_slug' => substr( $this->bws_license_plugin, 0, stripos( $this->bws_license_plugin, '/' ) ),
|
136 |
+
'basename' => $this->plugin_basename,
|
137 |
+
'pro_basename' => $this->bws_license_plugin,
|
138 |
);
|
139 |
}
|
140 |
}
|
141 |
|
142 |
/**
|
143 |
* Displays the content of the "Settings" on the plugin settings page
|
144 |
+
*
|
145 |
* @access public
|
146 |
* @param void
|
147 |
* @return void
|
162 |
$this->demo_data->bws_demo_confirm();
|
163 |
} else {
|
164 |
bws_show_settings_notice(); ?>
|
165 |
+
<form class="bws_form" method="post" action="" enctype="multipart/form-data">
|
166 |
+
<div id="poststuff">
|
167 |
+
<div id="post-body" class="metabox-holder columns-2">
|
168 |
+
<div id="post-body-content" style="position: relative;">
|
169 |
<?php $this->display_tabs(); ?>
|
170 |
+
</div><!-- #post-body-content -->
|
171 |
+
<div id="postbox-container-1" class="postbox-container">
|
172 |
+
<div class="meta-box-sortables ui-sortable">
|
173 |
+
<div id="submitdiv" class="postbox">
|
174 |
+
<h3 class="hndle"><?php esc_html_e( 'Information', 'bestwebsoft' ); ?></h3>
|
175 |
+
<div class="inside">
|
176 |
+
<div class="submitbox" id="submitpost">
|
177 |
+
<div id="minor-publishing">
|
178 |
+
<div id="misc-publishing-actions">
|
179 |
+
<?php
|
180 |
+
/**
|
181 |
+
* Action - Display additional content for #misc-publishing-Actions
|
182 |
+
*/
|
183 |
+
do_action( __CLASS__ . '_information_postbox_top' );
|
184 |
+
?>
|
185 |
+
<?php
|
186 |
+
if ( $this->is_pro ) {
|
187 |
if ( isset( $bstwbsftwppdtplgns_options['wrong_license_key'][ $this->plugin_basename ] ) || empty( $bstwbsftwppdtplgns_options['time_out'] ) || ! array_key_exists( $this->plugin_basename, $bstwbsftwppdtplgns_options['time_out'] ) ) {
|
188 |
+
$license_type = 'Pro';
|
189 |
$license_status = __( 'Inactive', 'bestwebsoft' ) . ' <a href="#' . $this->prefix . '_license_tab" class="bws_trigger_tab_click">' . __( 'Learn More', 'bestwebsoft' ) . '</a>';
|
190 |
} else {
|
191 |
$finish = strtotime( $bstwbsftwppdtplgns_options['time_out'][ $this->plugin_basename ] );
|
192 |
+
$today = strtotime( gmdate( 'm/d/Y' ) );
|
193 |
if ( isset( $bstwbsftwppdtplgns_options['trial'][ $this->plugin_basename ] ) ) {
|
194 |
$license_type = 'Trial Pro';
|
195 |
|
196 |
if ( $finish < $today ) {
|
197 |
$license_status = __( 'Expired', 'bestwebsoft' );
|
198 |
} else {
|
199 |
+
$daysleft = floor( ( $finish - $today ) / ( 60 * 60 * 24 ) );
|
200 |
$license_status = sprintf( __( '%s day(-s) left', 'bestwebsoft' ), $daysleft );
|
201 |
}
|
202 |
$license_status .= '. <a target="_blank" href="' . esc_url( $this->plugins_info['PluginURI'] ) . '">' . __( 'Upgrade to Pro', 'bestwebsoft' ) . '</a>';
|
208 |
$license_status = __( 'Active', 'bestwebsoft' );
|
209 |
}
|
210 |
}
|
211 |
+
}
|
212 |
+
?>
|
213 |
+
<div class="misc-pub-section">
|
214 |
+
<strong><?php esc_html_e( 'License', 'bestwebsoft' ); ?>:</strong> <?php echo esc_attr( $license_type ); ?>
|
215 |
+
</div>
|
216 |
+
<div class="misc-pub-section">
|
217 |
+
<strong><?php esc_html_e( 'Status', 'bestwebsoft' ); ?>:</strong> <?php echo wp_kses_post( $license_status ); ?>
|
218 |
+
</div><!-- .misc-pub-section -->
|
219 |
<?php } ?>
|
220 |
+
<div class="misc-pub-section">
|
221 |
+
<strong><?php esc_html_e( 'Version', 'bestwebsoft' ); ?>:</strong> <?php echo esc_attr( $this->plugins_info['Version'] ); ?>
|
222 |
+
</div><!-- .misc-pub-section -->
|
223 |
+
<?php
|
224 |
+
/**
|
225 |
+
* Action - Display additional content for #misc-publishing-Actions
|
226 |
+
*/
|
227 |
+
do_action( __CLASS__ . '_information_postbox_bottom' );
|
228 |
+
?>
|
229 |
+
</div>
|
230 |
+
<div class="clear"></div>
|
231 |
+
</div>
|
232 |
+
<div id="major-publishing-Actions">
|
233 |
+
<div id="publishing-Action">
|
234 |
+
<input type="hidden" name="<?php echo esc_attr( $this->prefix ); ?>_form_submit" value="submit" />
|
235 |
+
<input id="bws-submit-button" type="submit" class="button button-primary button-large" value="<?php esc_html_e( 'Save Changes', 'bestwebsoft' ); ?>" />
|
236 |
<?php wp_nonce_field( $this->plugin_basename, 'bws_nonce_name' ); ?>
|
237 |
+
</div>
|
238 |
+
<div class="clear"></div>
|
239 |
+
</div>
|
240 |
+
</div>
|
241 |
+
</div>
|
242 |
+
</div>
|
243 |
+
<?php
|
244 |
+
/**
|
245 |
+
* Action - Display custom metabox
|
246 |
*/
|
247 |
do_action( __CLASS__ . '_display_metabox' );
|
248 |
|
249 |
+
if ( function_exists( 'bws_affiliate_postbox' ) ) {
|
250 |
+
bws_affiliate_postbox();
|
251 |
+
}
|
252 |
+
?>
|
253 |
+
</div>
|
254 |
+
</div>
|
255 |
+
<div id="postbox-container-2" class="postbox-container">
|
256 |
+
<?php
|
257 |
+
/**
|
258 |
+
* Action - Display additional content for #postbox-container-2
|
259 |
*/
|
260 |
+
do_action( __CLASS__ . '_display_second_postbox' );
|
261 |
+
?>
|
262 |
+
<div class="submit">
|
263 |
+
<input type="submit" class="button button-primary button-large" value="<?php esc_html_e( 'Save Changes', 'bestwebsoft' ); ?>" />
|
264 |
+
<?php wp_nonce_field( $this->plugin_basename, 'bws_nonce_name' ); ?>
|
265 |
+
</div>
|
266 |
+
<?php
|
267 |
+
if ( ! empty( $this->wp_slug ) ) {
|
268 |
+
bws_plugin_reviews_block( $this->plugins_info['Name'], $this->wp_slug );}
|
269 |
+
?>
|
270 |
+
</div>
|
271 |
+
</div>
|
272 |
+
</form>
|
273 |
+
</div>
|
274 |
+
<?php
|
275 |
+
}
|
276 |
}
|
277 |
|
278 |
/**
|
279 |
* Displays the Tabs
|
280 |
+
*
|
281 |
* @access public
|
282 |
* @param void
|
283 |
* @return void
|
284 |
*/
|
285 |
+
public function display_tabs() {
|
286 |
+
?>
|
287 |
+
<div id="bws_settings_tabs_wrapper">
|
288 |
+
<ul id="bws_settings_tabs">
|
289 |
<?php $this->display_tabs_list(); ?>
|
290 |
+
</ul>
|
291 |
<?php $this->display_tabs_content(); ?>
|
292 |
+
<div class="clear"></div>
|
293 |
+
<input type="hidden" name="bws_active_tab" value="<?php
|
294 |
+
if ( isset( $_REQUEST['bws_active_tab'] ) ) {
|
295 |
+
echo esc_attr( sanitize_text_field( wp_unslash( $_REQUEST['bws_active_tab'] ) ) );
|
296 |
+
}
|
297 |
+
?>" />
|
298 |
+
</div>
|
299 |
+
<?php
|
300 |
+
}
|
301 |
|
302 |
/**
|
303 |
* Displays the list of tabs
|
304 |
+
*
|
305 |
* @access private
|
306 |
* @return void
|
307 |
*/
|
308 |
private function display_tabs_list() {
|
309 |
foreach ( $this->tabs as $tab_slug => $data ) {
|
310 |
+
if ( ! empty( $data['is_pro'] ) && $this->hide_pro_tabs ) {
|
311 |
continue;
|
312 |
+
}
|
313 |
$tab_class = 'bws-tab-' . $tab_slug;
|
314 |
+
if ( ! empty( $data['is_pro'] ) ) {
|
315 |
$tab_class .= ' bws_pro_tab';
|
316 |
+
}
|
317 |
+
if ( ! empty( $data['class'] ) ) {
|
318 |
+
$tab_class .= ' ' . $data['class'];
|
319 |
+
}
|
320 |
+
?>
|
321 |
+
<li class="<?php echo esc_attr( $tab_class ); ?>" data-slug="<?php echo esc_attr( $tab_slug ); ?>">
|
322 |
+
<a href="#<?php echo esc_attr( $this->prefix ); ?>_<?php echo esc_attr( $tab_slug ); ?>_tab">
|
323 |
+
<span><?php echo esc_html( $data['label'] ); ?></span>
|
324 |
+
</a>
|
325 |
+
</li>
|
326 |
+
<?php
|
327 |
+
}
|
328 |
}
|
329 |
|
330 |
/**
|
331 |
* Displays the content of tabs
|
332 |
+
*
|
333 |
* @access private
|
334 |
* @param string $tab_slug
|
335 |
* @return void
|
336 |
*/
|
337 |
public function display_tabs_content() {
|
338 |
foreach ( $this->tabs as $tab_slug => $data ) {
|
339 |
+
if ( ! empty( $data['is_pro'] ) && $this->hide_pro_tabs ) {
|
340 |
+
continue;
|
341 |
+
}
|
342 |
+
?>
|
343 |
+
<div class="bws_tab ui-tabs-panel ui-widget-content ui-corner-bottom" id="<?php echo esc_attr( $this->prefix . '_' . $tab_slug . '_tab' ); ?>" aria-labelledby="ui-id-2" role="tabpanel" aria-hidden="false" style="display: block;">
|
344 |
+
<?php
|
345 |
+
$tab_slug = str_replace( '-', '_', $tab_slug );
|
346 |
if ( method_exists( $this, 'tab_' . $tab_slug ) ) {
|
347 |
call_user_func( array( $this, 'tab_' . $tab_slug ) );
|
348 |
do_action_ref_array( __CLASS__ . '_after_tab_' . $tab_slug, array( &$this ) );
|
349 |
+
}
|
350 |
+
?>
|
351 |
+
</div>
|
352 |
+
<?php
|
353 |
+
}
|
354 |
}
|
355 |
|
356 |
/**
|
357 |
* Save all options from all tabs and display errors\messages
|
358 |
+
*
|
359 |
* @access public
|
360 |
* @param void
|
361 |
+
* @return array
|
362 |
*/
|
363 |
public function save_all_tabs_options() {
|
364 |
$message = $notice = $error = '';
|
369 |
/* Go Pro - check license key */
|
370 |
} elseif ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( $this->plugin_basename, 'bws_nonce_name' ) ) {
|
371 |
$result = $this->save_options_license_key();
|
372 |
+
if ( ! empty( $result['empty_field_error'] ) ) {
|
373 |
$error = $result['empty_field_error'];
|
374 |
+
}
|
375 |
+
if ( ! empty( $result['error'] ) ) {
|
376 |
$error = $result['error'];
|
377 |
+
}
|
378 |
+
if ( ! empty( $result['message'] ) ) {
|
379 |
$message = $result['message'];
|
380 |
+
}
|
381 |
+
if ( ! empty( $result['notice'] ) ) {
|
382 |
$notice = $result['notice'];
|
383 |
+
}
|
384 |
/* check demo data */
|
385 |
} else {
|
386 |
$demo_result = ! empty( $this->demo_data ) ? $this->demo_data->bws_handle_demo_data() : false;
|
388 |
if ( ! empty( $demo_result ) && is_array( $demo_result ) ) {
|
389 |
$error = $demo_result['error'];
|
390 |
$message = $demo_result['done'];
|
391 |
+
if ( ! empty( $demo_result['done'] ) && ! empty( $demo_result['options'] ) ) {
|
392 |
$this->options = $demo_result['options'];
|
393 |
+
}
|
394 |
}
|
395 |
/* Save options */
|
396 |
+
} elseif ( ! isset( $_REQUEST['bws_restore_default'] ) && ! isset( $_POST['bws_handle_demo'] ) && isset( $_REQUEST[ $this->prefix . '_form_submit' ] ) && check_admin_referer( $this->plugin_basename, 'bws_nonce_name' ) ) {
|
397 |
/* save tabs */
|
398 |
$result = $this->save_options();
|
399 |
+
if ( ! empty( $result['error'] ) ) {
|
400 |
$error = $result['error'];
|
401 |
+
}
|
402 |
+
if ( ! empty( $result['message'] ) ) {
|
403 |
$message = $result['message'];
|
404 |
+
}
|
405 |
+
if ( ! empty( $result['notice'] ) ) {
|
406 |
$notice = $result['notice'];
|
407 |
+
}
|
408 |
|
409 |
+
if ( '' === $this->change_permission_attr ) {
|
410 |
/* save `misc` tab */
|
411 |
$result = $this->save_options_misc();
|
412 |
+
if ( ! empty( $result['notice'] ) ) {
|
413 |
$notice .= $result['notice'];
|
414 |
+
}
|
|
|
|
|
|
|
|
|
415 |
}
|
416 |
}
|
417 |
}
|
421 |
|
422 |
/**
|
423 |
* Display error\message\notice
|
424 |
+
*
|
425 |
* @access public
|
426 |
* @param $save_results - array with error\message\notice
|
427 |
* @return void
|
428 |
*/
|
429 |
public function display_messages( $save_results ) {
|
430 |
/**
|
431 |
+
* Action - Display custom error\message\notice
|
432 |
*/
|
433 |
+
do_action( __CLASS__ . '_display_custom_messages', $save_results );
|
434 |
+
?>
|
435 |
+
<div class="updated fade inline"
|
436 |
+
<?php
|
437 |
+
if ( empty( $save_results['message'] ) ) {
|
438 |
+
echo 'style="display:none"';}
|
439 |
+
?>
|
440 |
+
><p><strong><?php echo esc_html( $save_results['message'] ); ?></strong></p></div>
|
441 |
+
<div class="updated bws-notice inline"
|
442 |
+
<?php
|
443 |
+
if ( empty( $save_results['notice'] ) ) {
|
444 |
+
echo 'style="display:none"';}
|
445 |
+
?>
|
446 |
+
><p><strong><?php echo esc_html( $save_results['notice'] ); ?></strong></p></div>
|
447 |
+
<div class="error inline"
|
448 |
+
<?php
|
449 |
+
if ( empty( $save_results['error'] ) ) {
|
450 |
+
echo 'style="display:none"';}
|
451 |
+
?>
|
452 |
+
><p><strong><?php echo esc_html( $save_results['error'] ); ?></strong></p></div>
|
453 |
+
<?php
|
454 |
+
}
|
455 |
|
456 |
/**
|
457 |
* Save plugin options to the database
|
458 |
+
*
|
459 |
* @access public
|
460 |
* @param ab
|
461 |
+
* @return array The Action results
|
462 |
* @abstract
|
463 |
*/
|
464 |
public function save_options() {
|
467 |
|
468 |
/**
|
469 |
* Get 'custom_code' status and content
|
470 |
+
*
|
471 |
* @access private
|
472 |
*/
|
473 |
private function get_custom_code() {
|
474 |
+
global $bstwbsftwppdtplgns_options, $wp_filesystem;
|
475 |
|
476 |
$this->custom_code_args = array(
|
477 |
'is_css_active' => false,
|
478 |
+
'content_css' => '',
|
479 |
+
'css_writeable' => false,
|
480 |
'is_php_active' => false,
|
481 |
+
'content_php' => '',
|
482 |
+
'php_writeable' => false,
|
483 |
+
'is_js_active' => false,
|
484 |
+
'content_js' => '',
|
485 |
+
'js_writeable' => false,
|
486 |
);
|
487 |
|
488 |
+
if ( ! $this->upload_dir ) {
|
489 |
$this->upload_dir = wp_upload_dir();
|
490 |
+
}
|
491 |
|
492 |
$folder = $this->upload_dir['basedir'] . '/bws-custom-code';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
|
494 |
+
if ( $this->is_multisite ) {
|
495 |
$this->custom_code_args['blog_id'] = get_current_blog_id();
|
496 |
+
}
|
497 |
+
|
498 |
+
WP_Filesystem();
|
499 |
|
500 |
foreach ( array( 'css', 'php', 'js' ) as $extension ) {
|
501 |
+
$file = 'bws-custom-code.' . $extension;
|
502 |
$real_file = $folder . '/' . $file;
|
503 |
+
|
504 |
+
if ( $wp_filesystem->exists( $real_file ) ) {
|
505 |
update_recently_edited( $real_file );
|
506 |
+
$this->custom_code_args[ "content_{$extension}" ] = $wp_filesystem->get_contents( $real_file );//file_get_contents( $real_file );
|
507 |
if ( ( $this->is_multisite && isset( $bstwbsftwppdtplgns_options['custom_code'][ $this->custom_code_args['blog_id'] ][ $file ] ) ) ||
|
508 |
+
( ! $this->is_multisite && isset( $bstwbsftwppdtplgns_options['custom_code'][ $file ] ) ) ) {
|
509 |
+
$this->custom_code_args[ "is_{$extension}_active" ] = true;
|
510 |
+
}
|
511 |
+
if ( is_writeable( $real_file ) ) {
|
512 |
+
$this->custom_code_args[ "{$extension}_writeable" ] = true;
|
513 |
}
|
|
|
|
|
514 |
} else {
|
515 |
+
$this->custom_code_args[ "{$extension}_writeable" ] = true;
|
516 |
+
if ( 'php' === $extension ) {
|
517 |
+
$this->custom_code_args[ "content_{$extension}" ] = '<?php' . "\n" . "if ( ! defined( 'ABSPATH' ) ) exit;" . "\n" . "if ( ! defined( 'BWS_GLOBAL' ) ) exit;" . "\n\n" . '/* Start your code here */' . "\n";
|
518 |
+
}
|
519 |
}
|
520 |
}
|
521 |
}
|
522 |
|
523 |
/**
|
524 |
* Display 'custom_code' tab
|
525 |
+
*
|
526 |
* @access private
|
527 |
*/
|
528 |
+
private function tab_custom_code() {
|
529 |
+
global $pdfprnt_options;
|
530 |
+
?>
|
531 |
+
<h3 class="bws_tab_label"><?php esc_html_e( 'Custom Code', 'bestwebsoft' ); ?></h3>
|
532 |
+
<?php
|
533 |
+
$this->help_phrase();
|
534 |
+
$bws_hide_premium = bws_hide_premium_options_check( $pdfprnt_options );
|
535 |
+
?>
|
536 |
+
<hr>
|
537 |
+
<h4><?php esc_html_e( 'The ability to add custom code is avaliable in the Pro version', 'bestwebsoft' ); ?></h4>
|
538 |
+
<?php
|
539 |
+
if ( ! $bws_hide_premium ) {
|
540 |
+
?>
|
541 |
+
<div class="bws_pro_version_bloc pdfprnt-pro-feature">
|
542 |
+
<div class="bws_pro_version_table_bloc">
|
543 |
+
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="Close"></button>
|
544 |
+
<div class="bws_table_bg"></div>
|
545 |
+
<div class="bws_pro_version">
|
546 |
+
<?php
|
547 |
+
if ( ! current_user_can( 'edit_plugins' ) ) {
|
548 |
+
echo '<p>' . esc_html__( 'You do not have sufficient permissions to edit plugins for this site.', 'bestwebsoft' ) . '</p>';
|
549 |
+
return;
|
550 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
551 |
|
552 |
+
$list = array(
|
553 |
+
'css' => array(
|
554 |
+
'description' => __( 'These styles will be added to the header on all pages of your site.', 'bestwebsoft' ),
|
555 |
+
'learn_more_link' => 'https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started',
|
556 |
+
),
|
557 |
+
'php' => array(
|
558 |
+
'description' => sprintf( __( 'This PHP code will be hooked to the %s Action and will be printed on front end only.', 'bestwebsoft' ), '<a href="https://codex.wordpress.org/Plugin_API/Action_Reference/init" target="_blank"><code>init</code></a>' ),
|
559 |
+
'learn_more_link' => 'https://php.net/',
|
560 |
+
),
|
561 |
+
'js' => array(
|
562 |
+
'description' => __( 'These code will be added to the header on all pages of your site.', 'bestwebsoft' ),
|
563 |
+
'learn_more_link' => 'https://developer.mozilla.org/en-US/docs/Web/JavaScript',
|
564 |
+
),
|
565 |
+
);
|
566 |
+
|
567 |
+
foreach ( $list as $extension => $extension_data ) {
|
568 |
+
$name = 'js' === $extension ? 'JavaScript' : strtoupper( $extension );
|
569 |
+
?>
|
570 |
+
<p><big>
|
571 |
+
<strong><?php echo esc_html( $name ); ?></strong>
|
572 |
+
<?php
|
573 |
+
if ( ! $this->custom_code_args[ "{$extension}_writeable" ] ) {
|
574 |
+
echo '(' . esc_html__( 'Browsing', 'bestwebsoft' ) . ')';}
|
575 |
+
?>
|
576 |
+
</big>
|
577 |
+
</p>
|
578 |
+
<p class="bws_info">
|
579 |
+
<label>
|
580 |
+
<input type="checkbox" value="1"
|
581 |
+
<?php
|
582 |
+
if ( $this->custom_code_args[ "is_{$extension}_active" ] ) {
|
583 |
+
echo 'checked';}
|
584 |
+
?>
|
585 |
+
/>
|
586 |
+
<?php printf( esc_html__( 'Activate custom %s code.', 'bestwebsoft' ), esc_html( $name ) ); ?>
|
587 |
+
</label>
|
588 |
+
</p>
|
589 |
+
<textarea cols="70" rows="25" id="bws_newcontent_<?php echo esc_attr( $extension ); ?>" disabled="disabled"><?php
|
590 |
+
if ( isset( $this->custom_code_args[ "content_{$extension}" ] ) ) {
|
591 |
+
echo esc_html( stripslashes_deep( $this->custom_code_args[ "content_{$extension}" ] ) ); }
|
592 |
+
?></textarea>
|
593 |
+
<p class="bws_info">
|
594 |
+
<?php echo esc_html( $extension_data['description'] ); ?>
|
595 |
+
<br>
|
596 |
+
<a href="<?php echo esc_url( $extension_data['learn_more_link'] ); ?>" target="_blank">
|
597 |
+
<?php printf( esc_html__( 'Learn more about %s', 'bestwebsoft' ), esc_html__( $name ) ); ?>
|
598 |
+
</a>
|
599 |
+
</p>
|
600 |
+
<?php
|
601 |
+
}
|
602 |
+
?>
|
603 |
+
</div>
|
604 |
+
</div>
|
605 |
+
<div class="bws_pro_version_tooltip">
|
606 |
+
<a class="bws_button" href="https://bestwebsoft.com/products/wordpress/plugins/pdf-print/?k=d9da7c9c2046bed8dfa38d005d4bffdb&pn=101&v=2.3.1&wp_v=5.8.3" target="_blank" title="PDF & Print">Upgrade to Pro</a>
|
607 |
+
<div class="clear"></div>
|
608 |
+
</div>
|
609 |
+
</div>
|
610 |
+
<?php
|
611 |
+
} else {
|
612 |
+
?>
|
613 |
+
<div class="bws_pro_version_tooltip">
|
614 |
+
<a class="bws_button" href="https://bestwebsoft.com/products/wordpress/plugins/pdf-print/?k=d9da7c9c2046bed8dfa38d005d4bffdb&pn=101&v=2.3.1&wp_v=5.8.3" target="_blank" title="PDF & Print">Upgrade to Pro</a>
|
615 |
+
<div class="clear"></div>
|
616 |
+
</div>
|
617 |
+
<?php
|
618 |
}
|
|
|
|
|
|
|
|
|
|
|
619 |
}
|
620 |
|
621 |
/**
|
622 |
* Display 'misc' tab
|
623 |
+
*
|
624 |
* @access private
|
625 |
*/
|
626 |
private function tab_misc() {
|
627 |
+
global $bstwbsftwppdtplgns_options;
|
628 |
+
?>
|
629 |
+
<h3 class="bws_tab_label"><?php esc_html_e( 'Miscellaneous Settings', 'bestwebsoft' ); ?></h3>
|
630 |
<?php $this->help_phrase(); ?>
|
631 |
+
<hr>
|
632 |
+
<?php
|
633 |
+
/**
|
634 |
+
* Action - Display custom options on the Import / Export' tab
|
635 |
*/
|
636 |
do_action( __CLASS__ . '_additional_misc_options' );
|
637 |
|
638 |
+
if ( ! $this->forbid_view && ! empty( $this->change_permission_attr ) ) {
|
639 |
+
?>
|
640 |
+
<div class="error inline bws_visible"><p><strong><?php esc_html_e( 'Notice', 'bestwebsoft' ); ?>:</strong> <strong><?php printf( esc_html__( 'It is prohibited to change %1$s settings on this site in the %2$s network settings.', 'bestwebsoft' ), esc_html( $this->plugins_info['Name'] ), esc_html( $this->plugins_info['Name'] ) ); ?></strong></p></div>
|
641 |
+
<?php
|
642 |
+
}
|
643 |
+
if ( $this->forbid_view ) {
|
644 |
+
?>
|
645 |
+
<div class="error inline bws_visible"><p><strong><?php esc_html_e( 'Notice', 'bestwebsoft' ); ?>:</strong> <strong><?php printf( esc_html__( 'It is prohibited to view %1$s settings on this site in the %2$s network settings.', 'bestwebsoft' ), esc_html( $this->plugins_info['Name'] ), esc_html( $this->plugins_info['Name'] ) ); ?></strong></p></div>
|
646 |
<?php } else { ?>
|
647 |
+
<table class="form-table">
|
648 |
+
<?php
|
649 |
+
/**
|
650 |
+
* Action - Display custom options on the 'misc' tab
|
651 |
*/
|
652 |
do_action( __CLASS__ . '_additional_misc_options_affected' );
|
653 |
+
if ( ! empty( $this->pro_page ) && $this->bws_hide_pro_option_exist ) {
|
654 |
+
?>
|
655 |
+
<tr>
|
656 |
+
<th scope="row"><?php esc_html_e( 'Pro Options', 'bestwebsoft' ); ?></th>
|
657 |
+
<td>
|
658 |
+
<label>
|
659 |
+
<input <?php echo esc_attr( wp_kses_data( $this->change_permission_attr ) ); ?> name="bws_hide_premium_options_submit" type="checkbox" value="1"
|
660 |
+
<?php
|
661 |
+
if ( ! $this->hide_pro_tabs ) {
|
662 |
+
echo 'checked="checked "';}
|
663 |
+
?>
|
664 |
+
/>
|
665 |
+
<span class="bws_info"><?php esc_html_e( 'Enable to display plugin Pro options.', 'bestwebsoft' ); ?></span>
|
666 |
+
</label>
|
667 |
+
</td>
|
668 |
+
</tr>
|
669 |
<?php } ?>
|
670 |
+
<tr>
|
671 |
+
<th scope="row"><?php esc_html_e( 'Track Usage', 'bestwebsoft' ); ?></th>
|
672 |
+
<td>
|
673 |
+
<label>
|
674 |
+
<input <?php echo esc_attr( wp_kses_data( $this->change_permission_attr ) ); ?> name="bws_track_usage" type="checkbox" value="1"
|
675 |
+
<?php
|
676 |
+
if ( ! empty( $bstwbsftwppdtplgns_options['track_usage']['products'][ $this->plugin_basename ] ) ) {
|
677 |
+
echo 'checked="checked "';}
|
678 |
+
?>
|
679 |
+
/>
|
680 |
+
<span class="bws_info"><?php esc_html_e( 'Enable to allow tracking plugin usage anonymously in order to make it better.', 'bestwebsoft' ); ?></span>
|
681 |
+
</label>
|
682 |
+
</td>
|
683 |
+
</tr>
|
684 |
+
<tr>
|
685 |
+
<th scope="row"><?php esc_html_e( 'Default Settings', 'bestwebsoft' ); ?></th>
|
686 |
+
<td>
|
687 |
+
<input<?php echo esc_attr( wp_kses_data( $this->change_permission_attr ) ); ?> name="bws_restore_default" type="submit" class="button" value="<?php esc_html_e( 'Restore Settings', 'bestwebsoft' ); ?>" />
|
688 |
+
<div class="bws_info"><?php esc_html_e( 'This will restore plugin settings to defaults.', 'bestwebsoft' ); ?></div>
|
689 |
+
</td>
|
690 |
+
</tr>
|
691 |
+
</table>
|
692 |
+
<?php
|
693 |
+
}
|
694 |
}
|
695 |
|
696 |
/**
|
697 |
* Display 'Import / Export' tab
|
698 |
+
*
|
699 |
* @access private
|
700 |
*/
|
701 |
+
public function tab_import_export() {
|
702 |
+
?>
|
703 |
+
<h3 class="bws_tab_label"><?php esc_html_e( 'Import / Export', 'bestwebsoft' ); ?></h3>
|
704 |
<?php $this->help_phrase(); ?>
|
705 |
+
<hr>
|
706 |
+
<?php
|
707 |
+
/**
|
708 |
+
* Action - Display custom options on the Import / Export' tab
|
709 |
*/
|
710 |
do_action( __CLASS__ . '_additional_import_export_options' );
|
711 |
|
712 |
+
if ( ! $this->forbid_view && ! empty( $this->change_permission_attr ) ) {
|
713 |
+
?>
|
714 |
+
<div class="error inline bws_visible"><p><strong><?php esc_html_e( 'Notice', 'bestwebsoft' ); ?>:</strong> <strong><?php printf( esc_html__( 'It is prohibited to change %1$s settings on this site in the %2$s network settings.', 'bestwebsoft' ), esc_html( $this->plugins_info['Name'] ), esc_html( $this->plugins_info['Name'] ) ); ?></strong></p></div>
|
715 |
+
<?php
|
716 |
+
}
|
717 |
+
if ( $this->forbid_view ) {
|
718 |
+
?>
|
719 |
+
<div class="error inline bws_visible"><p><strong><?php esc_html_e( 'Notice', 'bestwebsoft' ); ?>:</strong> <strong><?php printf( esc_html__( 'It is prohibited to view %1$s settings on this site in the %2$s network settings.', 'bestwebsoft' ), esc_html( $this->plugins_info['Name'] ), esc_html( $this->plugins_info['Name'] ) ); ?></strong></p></div>
|
720 |
<?php } else { ?>
|
721 |
+
<table class="form-table">
|
722 |
+
<?php
|
723 |
+
/**
|
724 |
+
* Action - Display custom options on the Import / Export' tab
|
725 |
*/
|
726 |
+
do_action( __CLASS__ . '_additional_import_export_options_affected' );
|
727 |
+
?>
|
728 |
+
</table>
|
729 |
+
<?php
|
730 |
+
}
|
731 |
}
|
732 |
|
733 |
/**
|
734 |
* Save plugin options to the database
|
735 |
+
*
|
736 |
* @access private
|
737 |
*/
|
738 |
private function save_options_misc() {
|
741 |
|
742 |
/* hide premium options */
|
743 |
if ( ! empty( $this->pro_page ) ) {
|
744 |
+
if ( isset( $_POST['bws_hide_premium_options'] ) && check_admin_referer( $this->plugin_basename, 'bws_nonce_name' ) ) {
|
745 |
+
$hide_result = bws_hide_premium_options( $this->options );
|
746 |
$this->hide_pro_tabs = true;
|
747 |
+
$this->options = $hide_result['options'];
|
748 |
+
if ( ! empty( $hide_result['message'] ) ) {
|
749 |
$notice = $hide_result['message'];
|
750 |
+
}
|
751 |
+
if ( $this->is_network_options ) {
|
752 |
update_site_option( $this->prefix . '_options', $this->options );
|
753 |
+
} else {
|
754 |
update_option( $this->prefix . '_options', $this->options );
|
755 |
+
}
|
756 |
+
} elseif ( isset( $_POST['bws_hide_premium_options_submit'] ) && check_admin_referer( $this->plugin_basename, 'bws_nonce_name' ) ) {
|
757 |
if ( ! empty( $this->options['hide_premium_options'] ) ) {
|
758 |
$key = array_search( get_current_user_id(), $this->options['hide_premium_options'] );
|
759 |
+
if ( false !== $key ) {
|
760 |
unset( $this->options['hide_premium_options'][ $key ] );
|
761 |
+
}
|
762 |
+
if ( $this->is_network_options ) {
|
763 |
update_site_option( $this->prefix . '_options', $this->options );
|
764 |
+
} else {
|
765 |
update_option( $this->prefix . '_options', $this->options );
|
766 |
+
}
|
767 |
}
|
768 |
$this->hide_pro_tabs = false;
|
769 |
} else {
|
770 |
if ( empty( $this->options['hide_premium_options'] ) ) {
|
771 |
$this->options['hide_premium_options'][] = get_current_user_id();
|
772 |
+
if ( $this->is_network_options ) {
|
773 |
update_site_option( $this->prefix . '_options', $this->options );
|
774 |
+
} else {
|
775 |
update_option( $this->prefix . '_options', $this->options );
|
776 |
+
}
|
777 |
}
|
778 |
$this->hide_pro_tabs = true;
|
779 |
}
|
780 |
}
|
781 |
/* Save 'Track Usage' option */
|
782 |
+
if ( isset( $_POST['bws_track_usage'] ) && check_admin_referer( $this->plugin_basename, 'bws_nonce_name' ) ) {
|
783 |
if ( empty( $bstwbsftwppdtplgns_options['track_usage']['products'][ $this->plugin_basename ] ) ) {
|
784 |
$bstwbsftwppdtplgns_options['track_usage']['products'][ $this->plugin_basename ] = true;
|
785 |
$track_usage = true;
|
786 |
}
|
787 |
} else {
|
788 |
if ( ! empty( $bstwbsftwppdtplgns_options['track_usage']['products'][ $this->plugin_basename ] ) ) {
|
789 |
+
unset( $bstwbsftwppdtplgns_options['track_usage']['products'][ $this->plugin_basename ] );
|
790 |
+
false;
|
791 |
$track_usage = false;
|
792 |
}
|
793 |
}
|
794 |
if ( isset( $track_usage ) ) {
|
795 |
$usage_id = ! empty( $bstwbsftwppdtplgns_options['track_usage']['usage_id'] ) ? $bstwbsftwppdtplgns_options['track_usage']['usage_id'] : false;
|
796 |
/* send data */
|
797 |
+
$options = array(
|
798 |
+
'timeout' => 3,
|
799 |
+
'body' => array(
|
800 |
+
'url' => get_bloginfo( 'url' ),
|
801 |
+
'wp_version' => $wp_version,
|
802 |
+
'is_active' => $track_usage,
|
803 |
+
'product' => $this->plugin_basename,
|
804 |
+
'version' => $this->plugins_info['Version'],
|
805 |
+
'usage_id' => $usage_id,
|
806 |
),
|
807 |
+
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ),
|
808 |
);
|
809 |
$raw_response = wp_remote_post( 'https://bestwebsoft.com/wp-content/plugins/products-statistics/track-usage/', $options );
|
810 |
|
811 |
+
if ( ! is_wp_error( $raw_response ) && 200 === intval( wp_remote_retrieve_response_code( $raw_response ) ) ) {
|
812 |
$response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
|
813 |
|
814 |
if ( is_array( $response ) &&
|
815 |
+
! empty( $response['usage_id'] ) &&
|
816 |
+
$response['usage_id'] !== $usage_id ) {
|
817 |
$bstwbsftwppdtplgns_options['track_usage']['usage_id'] = $response['usage_id'];
|
818 |
}
|
819 |
}
|
820 |
|
821 |
+
if ( $this->is_multisite ) {
|
822 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
823 |
+
} else {
|
824 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
825 |
+
}
|
826 |
}
|
827 |
|
828 |
return compact( 'notice' );
|
832 |
*
|
833 |
*/
|
834 |
public function tab_license() {
|
835 |
+
global $wp_version, $bstwbsftwppdtplgns_options;
|
836 |
+
?>
|
837 |
+
<h3 class="bws_tab_label"><?php esc_html_e( 'License Key', 'bestwebsoft' ); ?></h3>
|
838 |
<?php $this->help_phrase(); ?>
|
839 |
+
<hr>
|
840 |
<?php
|
841 |
foreach ( $this->licenses as $single_license ) {
|
842 |
+
$pro_plugin_name = ( strpos( $single_license['name'], 'Pro' ) ) ? $single_license['name'] : $single_license['name'] . ' Pro';
|
843 |
+
if ( ! empty( $this->pro_page ) || ! empty( $single_license['pro_basename'] ) ) {
|
844 |
|
845 |
if ( $this->pro_plugin_is_activated && ( empty( $single_license['pro_basename'] ) || isset( $this->bws_license_plugin ) ) ) {
|
846 |
+
$url = 'https://bestwebsoft.com/wp-content/plugins/paid-products/plugins/downloads/?bws_first_download=' . $this->bws_license_plugin . '&bws_license_key=' . $bstwbsftwppdtplgns_options[ $this->bws_license_plugin ] . '&download_from=5';
|
847 |
+
?>
|
848 |
<table class="form-table">
|
849 |
+
<tr>
|
850 |
+
<th scope="row"><?php echo wp_kses_data( $pro_plugin_name ) . ' License'; ?></th>
|
851 |
+
<td>
|
852 |
+
<p>
|
853 |
+
<strong><?php esc_html_e( 'Your Pro plugin is ready', 'bestwebsoft' ); ?></strong>
|
854 |
<br>
|
855 |
+
<?php esc_html_e( 'Your plugin has been zipped, and now is ready to download.', 'bestwebsoft' ); ?>
|
856 |
</p>
|
857 |
<p>
|
858 |
+
<a class="button button-secondary" target="_parent" href="<?php echo esc_url( $url ); ?>"><?php esc_html_e( 'Download Now', 'bestwebsoft' ); ?></a>
|
859 |
</p>
|
860 |
<br>
|
861 |
<p>
|
862 |
+
<strong><?php esc_html_e( 'Need help installing the plugin?', 'bestwebsoft' ); ?></strong>
|
863 |
<br>
|
864 |
+
<a target="_blank" href="https://bestwebsoft.com/documentation/how-to-install-a-wordpress-product/how-to-install-a-wordpress-plugin/"><?php esc_html_e( 'How to install WordPress plugin from your admin Dashboard (ZIP archive)', 'bestwebsoft' ); ?></a>
|
865 |
</p>
|
866 |
<br>
|
867 |
<p>
|
868 |
+
<strong><?php esc_html_e( 'Get Started', 'bestwebsoft' ); ?></strong>
|
869 |
<br>
|
870 |
+
<a target="_blank" href="https://bestwebsoft.com/documentation/"><?php esc_html_e( 'Documentation', 'bestwebsoft' ); ?></a>
|
871 |
<br>
|
872 |
+
<a target="_blank" href="https://www.youtube.com/user/bestwebsoft"><?php esc_html_e( 'Video Instructions', 'bestwebsoft' ); ?></a>
|
873 |
<br>
|
874 |
+
<a target="_blank" href="https://support.bestwebsoft.com"><?php esc_html_e( 'Knowledge Base', 'bestwebsoft' ); ?></a>
|
875 |
</p>
|
876 |
+
</td>
|
877 |
+
</tr>
|
878 |
+
</table>
|
879 |
+
<?php
|
880 |
+
} else {
|
881 |
$attr = $license_key = '';
|
882 |
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['count'] ) &&
|
883 |
+
'5' < $bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['count'] &&
|
884 |
+
$bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) {
|
885 |
$attr = 'disabled="disabled"';
|
886 |
+
}
|
887 |
|
888 |
if ( ! empty( $single_license['pro_basename'] ) ) {
|
889 |
$license_key = ! empty( $bstwbsftwppdtplgns_options[ $single_license['pro_basename'] ] ) ? $bstwbsftwppdtplgns_options[ $single_license['pro_basename'] ] : '';
|
890 |
+
}
|
891 |
+
?>
|
892 |
+
<table class="form-table">
|
893 |
+
<tr>
|
894 |
+
<th scope="row"><?php echo esc_html( $pro_plugin_name ) . ' License'; ?></th>
|
895 |
+
<td>
|
896 |
+
<input <?php echo wp_kses_data( $attr ); ?> type="text" name="bws_license_key_<?php echo esc_attr( ( ! empty( $single_license['pro_slug'] ) ) ? $single_license['pro_slug'] : $single_license['slug'] ); ?>" value="<?php echo esc_attr( $license_key ); ?>" />
|
897 |
+
<input <?php echo wp_kses_data( $attr ); ?> type="hidden" name="bws_license_plugin_<?php echo esc_attr( ( ! empty( $single_license['pro_slug'] ) ) ? $single_license['pro_slug'] : $single_license['slug'] ); ?>" value="<?php echo esc_attr( ( ! empty( $single_license['pro_slug'] ) ) ? $single_license['pro_slug'] : $single_license['slug'] ); ?>" />
|
898 |
+
<input <?php echo wp_kses_data( $attr ); ?> type="submit" class="button button-secondary" name="bws_license_submit" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" />
|
899 |
+
<input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce( 'bws_license_key_nonce' ); ?>" />
|
900 |
+
<div class="bws_info">
|
901 |
+
<?php printf( esc_html__( 'Enter your license key to activate %s and get premium plugin features.', 'bestwebsoft' ), '<a href="' . esc_url( $this->bws_plugin_link ) . '" target="_blank" title="' . esc_html( $pro_plugin_name ) . '">' . esc_html( $pro_plugin_name ) . '</a>' ); ?>
|
902 |
+
</div>
|
903 |
+
<?php if ( '' !== $attr ) { ?>
|
904 |
+
<p><?php esc_html_e( 'Unfortunately, you have exceeded the number of available tries per day. Please, upload the plugin manually.', 'bestwebsoft' ); ?></p>
|
905 |
+
<?php
|
906 |
+
}
|
907 |
+
if ( false !== $this->trial_days ) {
|
908 |
+
echo '<p>' . esc_html__( 'or', 'bestwebsoft' ) . ' <a href="' . esc_url( $this->plugins_info['PluginURI'] . 'trial/?k=' . $this->link_key . '&pn=' . $this->link_pn . '&v=' . $this->plugins_info['Version'] . '&wp_v=' . $wp_version ) . '" target="_blank">' . sprintf( esc_html__( 'Start Your Free %s-Day Trial Now', 'bestwebsoft' ), esc_attr( $this->trial_days ) ) . '</a></p>';
|
909 |
+
}
|
910 |
+
?>
|
911 |
+
</td>
|
912 |
+
</tr>
|
913 |
+
</table>
|
914 |
+
<?php
|
915 |
+
}
|
916 |
} else {
|
917 |
global $bstwbsftwppdtplgns_options;
|
918 |
+
$license_key = ( isset( $bstwbsftwppdtplgns_options[ $single_license['basename'] ] ) ) ? $bstwbsftwppdtplgns_options[ $single_license['basename'] ] : '';
|
919 |
+
?>
|
920 |
+
<table class="form-table">
|
921 |
+
<tr>
|
922 |
+
<th scope="row"><?php echo esc_html( $pro_plugin_name ) . ' License'; ?></th>
|
923 |
+
<td>
|
924 |
+
<input type="text" maxlength="100" name="bws_license_key_<?php echo esc_attr( $single_license['slug'] ); ?>" value="<?php echo esc_attr( $license_key ); ?>" />
|
925 |
+
<input type="submit" class="button button-secondary" name="bws_license_submit" value="<?php esc_html_e( 'Check license key', 'bestwebsoft' ); ?>" />
|
926 |
+
<div class="bws_info">
|
927 |
+
<?php esc_html_e( 'If necessary, you can check if the license key is correct or reenter it in the field below.', 'bestwebsoft' ); ?>
|
928 |
+
</div>
|
929 |
+
</td>
|
930 |
+
</tr>
|
931 |
+
</table>
|
932 |
+
<?php
|
933 |
+
}
|
934 |
+
}
|
935 |
+
?>
|
936 |
+
<table class="form-table">
|
937 |
+
<tr>
|
938 |
+
<th scope="row"><?php esc_html_e( 'Manage License Settings', 'bestwebsoft' ); ?></th>
|
939 |
+
<td>
|
940 |
+
<a class="button button-secondary" href="https://bestwebsoft.com/client-area" target="_blank"><?php esc_html_e( 'Login to Client Area', 'bestwebsoft' ); ?></a>
|
941 |
+
<div class="bws_info">
|
942 |
+
<?php esc_html_e( 'Manage active licenses, download BWS products, and view your payment history using BestWebSoft Client Area.', 'bestwebsoft' ); ?>
|
943 |
+
</div>
|
944 |
+
</td>
|
945 |
+
</tr>
|
946 |
+
</table>
|
947 |
+
<?php
|
948 |
+
}
|
949 |
|
950 |
/**
|
951 |
* Save plugin options to the database
|
952 |
+
*
|
953 |
* @access private
|
954 |
* @param ab
|
955 |
+
* @return array The Action results
|
956 |
*/
|
957 |
private function save_options_license_key() {
|
958 |
+
global $wp_version, $bstwbsftwppdtplgns_options, $wp_filesystem;
|
959 |
/*$empty_field_error - added to avoid error when 1 field is empty while another field contains license key*/
|
960 |
+
|
961 |
$error = $message = $empty_field_error = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
962 |
|
963 |
+
if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ), 'bws_license_key_nonce' ) ) {
|
964 |
+
die( __( 'Security check', 'bestwebsoft' ) );
|
965 |
+
} else {
|
966 |
+
|
967 |
+
foreach ( $this->licenses as $single_license ) {
|
968 |
+
$bws_license_key = ( isset( $_POST[ ( ! empty( $single_license['pro_slug'] ) ) ? 'bws_license_key_' . $single_license['pro_slug'] : 'bws_license_key_' . $single_license['slug'] ] ) ) ? sanitize_text_field( wp_unslash( $_POST[ ( ! empty( $single_license['pro_slug'] ) ) ? 'bws_license_key_' . $single_license['pro_slug'] : 'bws_license_key_' . $single_license['slug'] ] ) ) : '';
|
969 |
+
if ( '' !== $bws_license_key ) {
|
970 |
+
if ( strlen( $bws_license_key ) !== 18 ) {
|
971 |
+
$error = __( 'Wrong license key', 'bestwebsoft' );
|
972 |
+
} else {
|
973 |
+
/* CHECK license key */
|
974 |
+
if ( $this->is_pro && empty( $single_license['pro_basename'] ) ) {
|
975 |
+
delete_transient( 'bws_plugins_update' );
|
976 |
+
if ( ! $this->all_plugins ) {
|
977 |
+
if ( ! function_exists( 'get_plugins' ) ) {
|
978 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
979 |
+
}
|
980 |
+
$this->all_plugins = get_plugins();
|
981 |
}
|
982 |
+
$current = get_site_transient( 'update_plugins' );
|
983 |
+
|
984 |
+
if ( ! empty( $this->all_plugins ) && ! empty( $current ) && isset( $current->response ) && is_array( $current->response ) ) {
|
985 |
+
$to_send = array();
|
986 |
+
$to_send['plugins'][ $single_license['basename'] ] = $this->all_plugins[ $single_license['basename'] ];
|
987 |
+
$to_send['plugins'][ $single_license['basename'] ]['bws_license_key'] = $bws_license_key;
|
988 |
+
$to_send['plugins'][ $single_license['basename'] ]['bws_illegal_client'] = true;
|
989 |
+
$options = array(
|
990 |
+
'timeout' => ( ( defined( 'DOING_CRON' ) && DOING_CRON ) ? 30 : 3 ),
|
991 |
+
'body' => array( 'plugins' => serialize( $to_send ) ),
|
992 |
+
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ),
|
993 |
+
);
|
994 |
+
$raw_response = wp_remote_post( 'https://bestwebsoft.com/wp-content/plugins/paid-products/plugins/pro-license-check/1.0/', $options );
|
995 |
+
|
996 |
+
if ( is_wp_error( $raw_response ) || 200 !== intval( wp_remote_retrieve_response_code( $raw_response ) ) ) {
|
997 |
+
$error = __( 'Something went wrong. Please try again later. If the error appears again, please contact us', 'bestwebsoft' ) . ': <a href=https://support.bestwebsoft.com>BestWebSoft</a>. ' . __( 'We are sorry for inconvenience.', 'bestwebsoft' );
|
998 |
+
} else {
|
999 |
+
$response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
|
1000 |
+
if ( is_array( $response ) && ! empty( $response ) ) {
|
1001 |
+
foreach ( $response as $single_response ) {
|
1002 |
+
if ( 'wrong_license_key' === $single_response->package ) {
|
1003 |
+
$error = __( 'Wrong license key.', 'bestwebsoft' );
|
1004 |
+
} elseif ( 'wrong_domain' === $single_response->package ) {
|
1005 |
+
$error = __( 'This license key is bound to another site.', 'bestwebsoft' );
|
1006 |
+
} elseif ( 'time_out' === $single_response->package ) {
|
1007 |
+
$message = __( 'This license key is valid, but Your license has expired. If you want to update our plugin in future, you should extend the license.', 'bestwebsoft' );
|
1008 |
+
} elseif ( 'you_are_banned' === $single_response->package ) {
|
1009 |
+
$error = __( 'Unfortunately, you have exceeded the number of available tries.', 'bestwebsoft' );
|
1010 |
+
} elseif ( 'duplicate_domen_for_trial' === $single_response->package ) {
|
1011 |
+
$error = __( 'Unfortunately, the Pro Trial licence was already installed to this domain. The Pro Trial license can be installed only once.', 'bestwebsoft' );
|
1012 |
+
}
|
1013 |
+
if ( empty( $error ) ) {
|
1014 |
+
if ( empty( $message ) ) {
|
1015 |
+
if ( isset( $single_response->trial ) ) {
|
1016 |
+
$message = __( 'The Pro Trial license key is valid.', 'bestwebsoft' );
|
1017 |
+
} else {
|
1018 |
+
$message = __( 'The license key is valid.', 'bestwebsoft' );
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
if ( ! empty( $single_response->time_out ) ) {
|
1022 |
+
$message .= ' ' . __( 'Your license will expire on', 'bestwebsoft' ) . ' ' . $single_response->time_out . '.';
|
1023 |
+
} else {
|
1024 |
+
/* lifetime */
|
1025 |
+
$single_response->time_out = null;
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
if ( isset( $single_response->trial ) && $this->is_trial ) {
|
1029 |
+
$message .= ' ' . sprintf( __( 'In order to continue using the plugin it is necessary to buy a %s license.', 'bestwebsoft' ), '<a href="' . esc_url( $this->plugins_info['PluginURI'] . '?k=' . $this->link_key . '&pn=' . $this->link_pn . '&v=' . $this->plugins_info['Version'] . '&wp_v=' . $wp_version ) . '" target="_blank" title="' . $this->plugins_info['Name'] . '">Pro</a>' );
|
1030 |
+
}
|
1031 |
}
|
1032 |
|
1033 |
+
if ( isset( $single_response->trial ) ) {
|
1034 |
+
$bstwbsftwppdtplgns_options['trial'][ $single_license['basename'] ] = 1;
|
1035 |
} else {
|
1036 |
+
unset( $bstwbsftwppdtplgns_options['trial'][ $single_license['basename'] ] );
|
|
|
1037 |
}
|
1038 |
|
1039 |
+
if ( isset( $single_response->nonprofit ) ) {
|
1040 |
+
$bstwbsftwppdtplgns_options['nonprofit'][ $single_license['basename'] ] = 1;
|
1041 |
+
} else {
|
1042 |
+
unset( $bstwbsftwppdtplgns_options['nonprofit'][ $single_license['basename'] ] );
|
1043 |
}
|
|
|
1044 |
|
1045 |
+
if ( ! isset( $bstwbsftwppdtplgns_options[ $single_license['basename'] ] ) || $bstwbsftwppdtplgns_options[ $single_license['basename'] ] !== $bws_license_key ) {
|
1046 |
+
$bstwbsftwppdtplgns_options[ $single_license['basename'] ] = $bws_license_key;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1047 |
|
1048 |
+
WP_Filesystem();
|
1049 |
+
if ( $wp_filesystem->put_contents( dirname( dirname( __FILE__ ) ) . '/license_key.txt', $bws_license_key, 0755 ) ) {
|
1050 |
+
$update_option = true;
|
1051 |
+
}
|
1052 |
}
|
|
|
|
|
1053 |
|
1054 |
+
if ( isset( $bstwbsftwppdtplgns_options['wrong_license_key'][ $single_license['basename'] ] ) ) {
|
1055 |
+
unset( $bstwbsftwppdtplgns_options['wrong_license_key'][ $single_license['basename'] ] );
|
1056 |
+
$update_option = true;
|
1057 |
+
}
|
1058 |
|
1059 |
+
if ( ! isset( $bstwbsftwppdtplgns_options['time_out'][ $single_license['basename'] ] ) || $bstwbsftwppdtplgns_options['time_out'][ $single_license['basename'] ] !== $single_response->time_out ) {
|
1060 |
+
$bstwbsftwppdtplgns_options['time_out'][ $single_license['basename'] ] = $single_response->time_out;
|
1061 |
+
$update_option = true;
|
1062 |
+
}
|
1063 |
|
1064 |
+
if ( isset( $update_option ) ) {
|
1065 |
+
if ( $this->is_multisite ) {
|
1066 |
+
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1067 |
+
} else {
|
1068 |
+
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1069 |
+
}
|
1070 |
}
|
1071 |
}
|
1072 |
}
|
1073 |
+
} else {
|
1074 |
+
$error = __( 'Something went wrong. Please try again later. If the error appears again, please contact us', 'bestwebsoft' ) . ' <a href=https://support.bestwebsoft.com>BestWebSoft</a>. ' . __( 'We are sorry for inconvenience.', 'bestwebsoft' );
|
1075 |
}
|
|
|
|
|
1076 |
}
|
1077 |
}
|
1078 |
+
/* Go Pro */
|
|
|
|
|
|
|
|
|
|
|
|
|
1079 |
} else {
|
1080 |
+
$slug = ! empty( $single_license['pro_slug'] ) ? 'bws_license_plugin_' . $single_license['pro_slug'] : 'bws_license_plugin_' . $single_license['slug'];
|
1081 |
+
$bws_license_plugin = isset( $_POST[ $slug ] ) ? sanitize_text_field( wp_unslash( $_POST[ $slug ] ) ) : '';
|
1082 |
+
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) {
|
1083 |
+
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] + 1;
|
1084 |
+
} else {
|
1085 |
+
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = 1;
|
1086 |
+
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] = time();
|
|
|
1087 |
}
|
|
|
|
|
1088 |
|
1089 |
+
/* download Pro */
|
1090 |
+
if ( ! $this->all_plugins ) {
|
1091 |
+
if ( ! function_exists( 'get_plugins' ) ) {
|
1092 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
1093 |
+
}
|
1094 |
+
$this->all_plugins = get_plugins();
|
1095 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1096 |
|
1097 |
+
if ( ! array_key_exists( $bws_license_plugin, $this->all_plugins ) ) {
|
1098 |
+
$current = get_site_transient( 'update_plugins' );
|
1099 |
+
if ( ! empty( $current ) && isset( $current->response ) && is_array( $current->response ) ) {
|
1100 |
+
$to_send = array();
|
1101 |
+
$to_send['plugins'][ $bws_license_plugin ] = array();
|
1102 |
+
$to_send['plugins'][ $bws_license_plugin ]['bws_license_key'] = $bws_license_key;
|
1103 |
+
$to_send['plugins'][ $bws_license_plugin ]['bws_illegal_client'] = true;
|
1104 |
+
$options = array(
|
1105 |
+
'timeout' => ( ( defined( 'DOING_CRON' ) && DOING_CRON ) ? 30 : 3 ),
|
1106 |
+
'body' => array( 'plugins' => serialize( $to_send ) ),
|
1107 |
+
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ),
|
1108 |
+
);
|
1109 |
+
$raw_response = wp_remote_post( 'https://bestwebsoft.com/wp-content/plugins/paid-products/plugins/pro-license-check/1.0/', $options );
|
1110 |
+
|
1111 |
+
if ( is_wp_error( $raw_response ) || 200 !== intval( wp_remote_retrieve_response_code( $raw_response ) ) ) {
|
1112 |
+
$error = __( 'Something went wrong. Please try again later. If the error appears again, please contact us', 'bestwebsoft' ) . ': <a href="https://support.bestwebsoft.com">BestWebSoft</a>. ' . __( 'We are sorry for inconvenience.', 'bestwebsoft' );
|
1113 |
+
} else {
|
1114 |
+
$response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
|
1115 |
+
if ( is_array( $response ) && ! empty( $response ) ) {
|
1116 |
+
foreach ( $response as $single_response ) {
|
1117 |
+
if ( 'wrong_license_key' === $single_response->package ) {
|
1118 |
+
$error = __( 'Wrong license key.', 'bestwebsoft' );
|
1119 |
+
} elseif ( 'wrong_domain' === $single_response->package ) {
|
1120 |
+
$error = __( 'This license key is bound to another site.', 'bestwebsoft' );
|
1121 |
+
} elseif ( 'you_are_banned' === $single_response->package ) {
|
1122 |
+
$error = __( 'Unfortunately, you have exceeded the number of available tries per day. Please, upload the plugin manually.', 'bestwebsoft' );
|
1123 |
+
} elseif ( 'time_out' === $single_response->package ) {
|
1124 |
+
$error = sprintf( __( 'Unfortunately, Your license has expired. To continue getting top-priority support and plugin updates, you should extend it in your %s.', 'bestwebsoft' ), ' <a href="https://bestwebsoft.com/client-area">Client Area</a>' );
|
1125 |
+
} elseif ( 'duplicate_domen_for_trial' === $single_response->package ) {
|
1126 |
+
$error = __( 'Unfortunately, the Pro licence was already installed to this domain. The Pro Trial license can be installed only once.', 'bestwebsoft' );
|
1127 |
+
}
|
1128 |
}
|
1129 |
+
if ( empty( $error ) ) {
|
1130 |
+
$bws_license_plugin = ( ! empty( $single_license['pro_basename'] ) ) ? $single_license['pro_basename'] : $single_license['basename'];
|
|
|
1131 |
|
1132 |
+
$bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key;
|
1133 |
+
$this->pro_plugin_is_activated = true;
|
1134 |
+
}
|
1135 |
+
} else {
|
1136 |
+
$error = __( 'Something went wrong. Try again later or upload the plugin manually. We are sorry for inconvenience.', 'bestwebsoft' );
|
1137 |
}
|
1138 |
+
}
|
1139 |
+
}
|
1140 |
+
} else {
|
1141 |
+
$bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key;
|
1142 |
+
/* activate Pro */
|
1143 |
+
if ( ! is_plugin_active( $bws_license_plugin ) ) {
|
1144 |
+
if ( $this->is_multisite && is_plugin_active_for_network( ( ! empty( $single_license['pro_basename'] ) ) ? $single_license['pro_basename'] : $single_license['basename'] ) ) {
|
1145 |
+
/* if multisite and free plugin is network activated */
|
1146 |
+
$network_wide = true;
|
1147 |
} else {
|
1148 |
+
/* activate on a single blog */
|
1149 |
+
$network_wide = false;
|
1150 |
}
|
1151 |
+
activate_plugin( $bws_license_plugin, null, $network_wide );
|
1152 |
+
$this->pro_plugin_is_activated = true;
|
1153 |
}
|
1154 |
}
|
1155 |
+
/* add 'track_usage' for Pro version */
|
1156 |
+
if ( ! empty( $bstwbsftwppdtplgns_options['track_usage'][ ( ! empty( $single_license['pro_basename'] ) ) ? $single_license['pro_basename'] : $single_license['basename'] ] ) &&
|
1157 |
+
empty( $bstwbsftwppdtplgns_options['track_usage'][ $bws_license_plugin ] ) ) {
|
1158 |
+
$bstwbsftwppdtplgns_options['track_usage'][ $bws_license_plugin ] = $bstwbsftwppdtplgns_options['track_usage'][ ( ! empty( $single_license['pro_basename'] ) ) ? $single_license['pro_basename'] : $single_license['basename'] ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1159 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1160 |
|
1161 |
+
if ( $this->is_multisite ) {
|
1162 |
+
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1163 |
+
} else {
|
1164 |
+
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1165 |
+
}
|
1166 |
|
1167 |
+
if ( $this->pro_plugin_is_activated ) {
|
1168 |
+
delete_transient( 'bws_plugins_update' );
|
1169 |
+
}
|
1170 |
}
|
1171 |
}
|
1172 |
+
} else {
|
1173 |
+
$empty_field_error = __( 'Please, enter Your license key', 'bestwebsoft' );
|
1174 |
}
|
|
|
|
|
1175 |
}
|
1176 |
}
|
1177 |
return compact( 'error', 'message', 'empty_field_error' );
|
1179 |
|
1180 |
/**
|
1181 |
* Display help phrase
|
1182 |
+
*
|
1183 |
* @access public
|
1184 |
* @param void
|
1185 |
+
* @return html The Action results
|
1186 |
*/
|
1187 |
public function help_phrase() {
|
1188 |
+
/*pls */
|
1189 |
+
echo '<div class="bws_tab_description">' . esc_html__( 'Need Help?', 'bestwebsoft' ) . ' ';
|
1190 |
+
if ( '' !== $this->doc_link ) {
|
1191 |
+
echo '<a href="' . esc_url( $this->doc_link ) . '" target="_blank">' . esc_html__( 'Read the Instruction', 'bestwebsoft' );
|
1192 |
+
} else {
|
1193 |
+
echo '<a href="https://support.bestwebsoft.com/hc/en-us/" target="_blank">' . esc_html__( 'Visit Help Center', 'bestwebsoft' );
|
1194 |
+
}
|
1195 |
+
if ( '' !== $this->doc_video_link ) {
|
1196 |
+
echo '</a> ' . esc_html__( 'or', 'bestwebsoft' ) . ' <a href="' . esc_url( $this->doc_video_link ) . '" target="_blank">' . esc_html__( 'Watch the Video', 'bestwebsoft' );
|
1197 |
+
}
|
1198 |
echo '</a></div>';
|
1199 |
+
/* pls*/
|
1200 |
}
|
1201 |
|
1202 |
public function bws_pro_block_links() {
|
1203 |
+
global $wp_version;
|
1204 |
+
?>
|
1205 |
+
<div class="bws_pro_version_tooltip">
|
1206 |
+
<a class="bws_button" href="<?php echo esc_url( $this->plugins_info['PluginURI'] ); ?>?k=<?php echo esc_attr( $this->link_key ); ?>&pn=<?php echo esc_attr( $this->link_pn ); ?>&v=<?php echo esc_attr( $this->plugins_info['Version'] ); ?>&wp_v=<?php echo esc_attr( $wp_version ); ?>" target="_blank" title="<?php echo esc_html( $this->plugins_info['Name'] ); ?>"><?php esc_html_e( 'Upgrade to Pro', 'bestwebsoft' ); ?></a>
|
1207 |
+
<?php if ( false !== $this->trial_days ) { ?>
|
1208 |
+
<span class="bws_trial_info">
|
1209 |
+
<?php esc_html_e( 'or', 'bestwebsoft' ); ?>
|
1210 |
+
<a href="<?php echo esc_url( $this->plugins_info['PluginURI'] . '?k=' . $this->link_key . '&pn=' . $this->link_pn . '&v=' . $this->plugins_info['Version'] . '&wp_v=' . $wp_version ); ?>" target="_blank" title="<?php echo esc_html( $this->plugins_info['Name'] ); ?>"><?php esc_html_e( 'Start Your Free Trial', 'bestwebsoft' ); ?></a>
|
1211 |
</span>
|
1212 |
<?php } ?>
|
1213 |
+
<div class="clear"></div>
|
1214 |
+
</div>
|
1215 |
+
<?php
|
1216 |
+
}
|
1217 |
|
1218 |
/**
|
1219 |
* Restore plugin options to defaults
|
1220 |
+
*
|
1221 |
* @access public
|
1222 |
* @param void
|
1223 |
* @return void
|
1233 |
*/
|
1234 |
$this->options = apply_filters( __CLASS__ . '_additional_restore_options', $this->default_options );
|
1235 |
if ( $this->is_network_options ) {
|
1236 |
+
$this->options['network_apply'] = 'default';
|
1237 |
+
$this->options['network_view'] = '1';
|
1238 |
$this->options['network_change'] = '1';
|
1239 |
update_site_option( $this->prefix . '_options', $this->options );
|
1240 |
} else {
|
1242 |
}
|
1243 |
}
|
1244 |
|
1245 |
+
public function add_request_feature() {
|
1246 |
+
?>
|
1247 |
<div id="bws_request_feature" class="widget-access-link">
|
1248 |
+
<button type="button" class="button" ><?php esc_html_e( 'Request a Feature', 'bestwebsoft' ); ?></button>
|
1249 |
</div>
|
1250 |
+
<?php
|
1251 |
+
$modal_html = '<div class="bws-modal bws-modal-deactivation-feedback bws-modal-request-feature">
|
1252 |
+
<div class="bws-modal-dialog">
|
1253 |
+
<div class="bws-modal-body">
|
1254 |
+
<h2>' . sprintf( esc_html__( 'How can we improve %s?', 'bestwebsoft' ), $this->plugins_info['Name'] ) . '</h2>
|
1255 |
+
<div class="bws-modal-panel active">
|
1256 |
+
<p>' . esc_html__( 'We look forward to hear your ideas.', 'bestwebsoft' ) . '</p>
|
1257 |
+
<p>
|
1258 |
+
<textarea placeholder="' . esc_html__( 'Describe your idea', 'bestwebsoft' ) . '..."></textarea>
|
1259 |
+
</p>
|
1260 |
+
<label class="bws-modal-anonymous-label">
|
1261 |
+
<input type="checkbox" /> ' . esc_html__( 'Send website data and allow to contact me back', 'bestwebsoft' ) . '
|
1262 |
</label>
|
1263 |
</div>
|
1264 |
</div>
|
1265 |
<div class="bws-modal-footer">
|
1266 |
+
<a href="#" class="button disabled bws-modal-button button-primary">' . esc_html__( 'Submit', 'bestwebsoft' ) . '</a>
|
1267 |
+
<span class="bws-modal-processing hidden">' . esc_html__( 'Processing', 'bestwebsoft' ) . '...</span>
|
1268 |
+
<span class="bws-modal-thank-you hidden">' . esc_html__( 'Thank you!', 'bestwebsoft' ) . '</span>
|
1269 |
<div class="clear"></div>
|
1270 |
</div>
|
1271 |
</div>
|
1272 |
</div>';
|
1273 |
|
1274 |
+
$script = '(function($) {
|
1275 |
+
var modalHtml = ' . wp_json_encode( $modal_html ) . ",
|
1276 |
\$modal = $( modalHtml );
|
1277 |
|
1278 |
\$modal.appendTo( $( 'body' ) );
|
1305 |
var is_anonymous = ( \$modal.find( '.bws-modal-anonymous-label' ).find( 'input' ).is( ':checked' ) ) ? 0 : 1;
|
1306 |
|
1307 |
$.ajax({
|
1308 |
+
url : ajaxurl,
|
1309 |
+
method : 'POST',
|
1310 |
+
data : {
|
1311 |
+
'Action' : 'bws_submit_request_feature_action',
|
1312 |
'plugin' : '" . $this->plugin_basename . "',
|
1313 |
'info' : info,
|
1314 |
'is_anonymous' : is_anonymous,
|
1362 |
})(jQuery);";
|
1363 |
|
1364 |
/* add script in FOOTER */
|
1365 |
+
wp_register_script( 'bws-request-feature-dialog', '', array( 'jquery' ), '2.4.2', true );
|
1366 |
wp_enqueue_script( 'bws-request-feature-dialog' );
|
1367 |
wp_add_inline_script( 'bws-request-feature-dialog', sprintf( $script ) );
|
1368 |
}
|
1369 |
}
|
1370 |
}
|
1371 |
|
|
|
1372 |
/**
|
1373 |
* Called after the user has submitted his reason for deactivating the plugin.
|
1374 |
*
|
1378 |
function bws_submit_request_feature_action() {
|
1379 |
global $bstwbsftwppdtplgns_options, $wp_version, $bstwbsftwppdtplgns_active_plugins, $current_user;
|
1380 |
|
1381 |
+
if ( isset( $_REQUEST['bws_ajax_nonce'] ) ) {
|
1382 |
|
1383 |
+
wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['bws_ajax_nonce'] ) ), 'bws_ajax_nonce' );
|
|
|
1384 |
|
1385 |
+
$basename = isset( $_REQUEST['plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['plugin'] ) ) : '';
|
1386 |
+
$info = isset( $_REQUEST['info'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['info'] ) ) : '';
|
|
|
|
|
|
|
|
|
1387 |
|
1388 |
+
if ( empty( $info ) || empty( $basename ) ) {
|
1389 |
+
exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1390 |
}
|
1391 |
|
1392 |
+
$info = substr( $info, 0, 255 );
|
1393 |
+
$is_anonymous = isset( $_REQUEST['is_anonymous'] ) && 1 === intval( $_REQUEST['is_anonymous'] );
|
1394 |
|
1395 |
+
$options = array(
|
1396 |
+
'product' => $basename,
|
1397 |
+
'info' => $info,
|
1398 |
+
);
|
|
|
|
|
1399 |
|
|
|
1400 |
if ( ! $is_anonymous ) {
|
1401 |
+
if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
|
1402 |
+
$bstwbsftwppdtplgns_options = ( is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
1403 |
+
}
|
|
|
1404 |
|
1405 |
+
if ( ! empty( $bstwbsftwppdtplgns_options['track_usage']['usage_id'] ) ) {
|
1406 |
+
$options['usage_id'] = $bstwbsftwppdtplgns_options['track_usage']['usage_id'];
|
1407 |
+
} else {
|
1408 |
+
$options['usage_id'] = false;
|
1409 |
+
$options['url'] = get_bloginfo( 'url' );
|
1410 |
+
$options['wp_version'] = $wp_version;
|
1411 |
+
$options['is_active'] = false;
|
1412 |
+
$options['version'] = $bstwbsftwppdtplgns_active_plugins[ $basename ]['Version'];
|
1413 |
}
|
1414 |
+
|
1415 |
+
$options['email'] = $current_user->data->user_email;
|
1416 |
}
|
1417 |
|
1418 |
+
/* send data */
|
1419 |
+
$raw_response = wp_remote_post(
|
1420 |
+
'https://bestwebsoft.com/wp-content/plugins/products-statistics/request-feature/',
|
1421 |
+
array(
|
1422 |
+
'method' => 'POST',
|
1423 |
+
'body' => $options,
|
1424 |
+
'timeout' => 15,
|
1425 |
+
)
|
1426 |
+
);
|
1427 |
+
|
1428 |
+
if ( ! is_wp_error( $raw_response ) && 200 === intval( wp_remote_retrieve_response_code( $raw_response ) ) ) {
|
1429 |
+
if ( ! $is_anonymous ) {
|
1430 |
+
$response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
|
1431 |
+
|
1432 |
+
if ( is_array( $response ) && ! empty( $response['usage_id'] ) && $response['usage_id'] !== $options['usage_id'] ) {
|
1433 |
+
$bstwbsftwppdtplgns_options['track_usage']['usage_id'] = $response['usage_id'];
|
1434 |
+
|
1435 |
+
if ( is_multisite() ) {
|
1436 |
+
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1437 |
+
} else {
|
1438 |
+
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
1439 |
+
}
|
1440 |
+
}
|
1441 |
+
}
|
1442 |
+
|
1443 |
+
echo 'done';
|
1444 |
+
} else {
|
1445 |
+
echo wp_kses_data( $response->get_error_code() ) . ': ' . wp_kses_data( $response->get_error_message() );
|
1446 |
+
}
|
1447 |
}
|
1448 |
exit;
|
1449 |
}
|
1450 |
}
|
1451 |
|
1452 |
+
add_action( 'wp_ajax_bws_submit_request_feature_action', 'bws_submit_request_feature_action' );
|
bws_menu/css/codemirror.css
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
/* custom */
|
2 |
.CodeMirror span.bws-readonly {
|
3 |
-
|
4 |
}
|
5 |
/* BASICS */
|
6 |
|
7 |
.CodeMirror {
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
}
|
13 |
.CodeMirror-scroll {
|
14 |
-
|
15 |
-
|
16 |
}
|
17 |
|
18 |
/* PADDING */
|
19 |
|
20 |
.CodeMirror-lines {
|
21 |
-
|
22 |
}
|
23 |
.CodeMirror pre {
|
24 |
-
|
25 |
}
|
26 |
|
27 |
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
28 |
-
|
29 |
}
|
30 |
|
31 |
/* GUTTER */
|
32 |
|
33 |
.CodeMirror-gutters {
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
}
|
38 |
.CodeMirror-linenumbers {}
|
39 |
.CodeMirror-linenumber {
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
}
|
47 |
|
48 |
/* CURSOR */
|
49 |
|
50 |
.CodeMirror div.CodeMirror-cursor {
|
51 |
-
|
52 |
}
|
53 |
/* Shown when moving in bi-directional text */
|
54 |
.CodeMirror div.CodeMirror-secondarycursor {
|
55 |
-
|
56 |
}
|
57 |
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
}
|
62 |
/* Can style cursor different in overwrite (non-insert) mode */
|
63 |
div.CodeMirror-overwrite div.CodeMirror-cursor {}
|
@@ -65,8 +65,8 @@ div.CodeMirror-overwrite div.CodeMirror-cursor {}
|
|
65 |
.cm-tab { display: inline-block; }
|
66 |
|
67 |
.CodeMirror-ruler {
|
68 |
-
|
69 |
-
|
70 |
}
|
71 |
|
72 |
/* DEFAULT THEME */
|
@@ -110,155 +110,155 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
|
110 |
/* STOP */
|
111 |
|
112 |
/* The rest of this file contains styles related to the mechanics of
|
113 |
-
|
114 |
|
115 |
.CodeMirror {
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
}
|
122 |
|
123 |
.CodeMirror-scroll {
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
}
|
134 |
.CodeMirror-sizer {
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
}
|
140 |
|
141 |
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
142 |
-
|
143 |
-
|
144 |
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
}
|
149 |
.CodeMirror-vscrollbar {
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
}
|
154 |
.CodeMirror-hscrollbar {
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
}
|
159 |
.CodeMirror-scrollbar-filler {
|
160 |
-
|
161 |
}
|
162 |
.CodeMirror-gutter-filler {
|
163 |
-
|
164 |
}
|
165 |
|
166 |
.CodeMirror-gutters {
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
}
|
171 |
.CodeMirror-gutter {
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
}
|
183 |
.CodeMirror-gutter-elt {
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
}
|
188 |
|
189 |
.CodeMirror-lines {
|
190 |
-
|
191 |
}
|
192 |
.CodeMirror pre {
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
}
|
208 |
.CodeMirror-wrap pre {
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
}
|
213 |
|
214 |
.CodeMirror-linebackground {
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
}
|
219 |
|
220 |
.CodeMirror-linewidget {
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
}
|
225 |
|
226 |
.CodeMirror-widget {}
|
227 |
|
228 |
.CodeMirror-wrap .CodeMirror-scroll {
|
229 |
-
|
230 |
}
|
231 |
|
232 |
.CodeMirror-measure {
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
}
|
239 |
.CodeMirror-measure pre { position: static; }
|
240 |
|
241 |
.CodeMirror div.CodeMirror-cursor {
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
}
|
246 |
|
247 |
div.CodeMirror-cursors {
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
}
|
252 |
.CodeMirror-focused div.CodeMirror-cursors {
|
253 |
-
|
254 |
}
|
255 |
|
256 |
.CodeMirror-selected { background: #d9d9d9; }
|
257 |
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
258 |
|
259 |
.cm-searching {
|
260 |
-
|
261 |
-
|
262 |
}
|
263 |
|
264 |
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
@@ -268,8 +268,8 @@ div.CodeMirror-cursors {
|
|
268 |
.cm-force-border { padding-right: .1px; }
|
269 |
|
270 |
@media print {
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
}
|
1 |
/* custom */
|
2 |
.CodeMirror span.bws-readonly {
|
3 |
+
color: #aaa;
|
4 |
}
|
5 |
/* BASICS */
|
6 |
|
7 |
.CodeMirror {
|
8 |
+
/* Set height, width, borders, and global font properties here */
|
9 |
+
font-family: monospace;
|
10 |
+
height: 500px;
|
11 |
+
border: 1px solid #ddd;
|
12 |
}
|
13 |
.CodeMirror-scroll {
|
14 |
+
/* Set scrolling behaviour here */
|
15 |
+
overflow: auto;
|
16 |
}
|
17 |
|
18 |
/* PADDING */
|
19 |
|
20 |
.CodeMirror-lines {
|
21 |
+
padding: 4px 0; /* Vertical padding around content */
|
22 |
}
|
23 |
.CodeMirror pre {
|
24 |
+
padding: 0 4px; /* Horizontal padding of content */
|
25 |
}
|
26 |
|
27 |
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
28 |
+
background-color: white; /* The little square between H and V scrollbars */
|
29 |
}
|
30 |
|
31 |
/* GUTTER */
|
32 |
|
33 |
.CodeMirror-gutters {
|
34 |
+
border-right: 1px solid #ddd;
|
35 |
+
background-color: #f7f7f7;
|
36 |
+
white-space: nowrap;
|
37 |
}
|
38 |
.CodeMirror-linenumbers {}
|
39 |
.CodeMirror-linenumber {
|
40 |
+
padding: 0 3px 0 5px;
|
41 |
+
min-width: 20px;
|
42 |
+
text-align: right;
|
43 |
+
color: #999;
|
44 |
+
-moz-box-sizing: content-box;
|
45 |
+
box-sizing: content-box;
|
46 |
}
|
47 |
|
48 |
/* CURSOR */
|
49 |
|
50 |
.CodeMirror div.CodeMirror-cursor {
|
51 |
+
border-left: 1px solid black;
|
52 |
}
|
53 |
/* Shown when moving in bi-directional text */
|
54 |
.CodeMirror div.CodeMirror-secondarycursor {
|
55 |
+
border-left: 1px solid silver;
|
56 |
}
|
57 |
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
|
58 |
+
width: auto;
|
59 |
+
border: 0;
|
60 |
+
background: #7e7;
|
61 |
}
|
62 |
/* Can style cursor different in overwrite (non-insert) mode */
|
63 |
div.CodeMirror-overwrite div.CodeMirror-cursor {}
|
65 |
.cm-tab { display: inline-block; }
|
66 |
|
67 |
.CodeMirror-ruler {
|
68 |
+
border-left: 1px solid #ccc;
|
69 |
+
position: absolute;
|
70 |
}
|
71 |
|
72 |
/* DEFAULT THEME */
|
110 |
/* STOP */
|
111 |
|
112 |
/* The rest of this file contains styles related to the mechanics of
|
113 |
+
the editor. You probably shouldn't touch them. */
|
114 |
|
115 |
.CodeMirror {
|
116 |
+
line-height: 1;
|
117 |
+
position: relative;
|
118 |
+
overflow: hidden;
|
119 |
+
background: white;
|
120 |
+
color: black;
|
121 |
}
|
122 |
|
123 |
.CodeMirror-scroll {
|
124 |
+
/* 30px is the magic margin used to hide the element's real scrollbars */
|
125 |
+
/* See overflow: hidden in .CodeMirror */
|
126 |
+
margin-bottom: -30px; margin-right: -30px;
|
127 |
+
padding-bottom: 30px;
|
128 |
+
height: 100%;
|
129 |
+
outline: none; /* Prevent dragging from highlighting the element */
|
130 |
+
position: relative;
|
131 |
+
-moz-box-sizing: content-box;
|
132 |
+
box-sizing: content-box;
|
133 |
}
|
134 |
.CodeMirror-sizer {
|
135 |
+
position: relative;
|
136 |
+
border-right: 30px solid transparent;
|
137 |
+
-moz-box-sizing: content-box;
|
138 |
+
box-sizing: content-box;
|
139 |
}
|
140 |
|
141 |
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
142 |
+
before actuall scrolling happens, thus preventing shaking and
|
143 |
+
flickering artifacts. */
|
144 |
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
145 |
+
position: absolute;
|
146 |
+
z-index: 6;
|
147 |
+
display: none;
|
148 |
}
|
149 |
.CodeMirror-vscrollbar {
|
150 |
+
right: 0; top: 0;
|
151 |
+
overflow-x: hidden;
|
152 |
+
overflow-y: scroll;
|
153 |
}
|
154 |
.CodeMirror-hscrollbar {
|
155 |
+
bottom: 0; left: 0;
|
156 |
+
overflow-y: hidden;
|
157 |
+
overflow-x: scroll;
|
158 |
}
|
159 |
.CodeMirror-scrollbar-filler {
|
160 |
+
right: 0; bottom: 0;
|
161 |
}
|
162 |
.CodeMirror-gutter-filler {
|
163 |
+
left: 0; bottom: 0;
|
164 |
}
|
165 |
|
166 |
.CodeMirror-gutters {
|
167 |
+
position: absolute; left: 0; top: 0;
|
168 |
+
padding-bottom: 30px;
|
169 |
+
z-index: 3;
|
170 |
}
|
171 |
.CodeMirror-gutter {
|
172 |
+
white-space: normal;
|
173 |
+
height: 100%;
|
174 |
+
-moz-box-sizing: content-box;
|
175 |
+
box-sizing: content-box;
|
176 |
+
padding-bottom: 30px;
|
177 |
+
margin-bottom: -32px;
|
178 |
+
display: inline-block;
|
179 |
+
/* Hack to make IE7 behave */
|
180 |
+
*zoom:1;
|
181 |
+
*display:inline;
|
182 |
}
|
183 |
.CodeMirror-gutter-elt {
|
184 |
+
position: absolute;
|
185 |
+
cursor: default;
|
186 |
+
z-index: 4;
|
187 |
}
|
188 |
|
189 |
.CodeMirror-lines {
|
190 |
+
cursor: text;
|
191 |
}
|
192 |
.CodeMirror pre {
|
193 |
+
/* Reset some styles that the rest of the page might have set */
|
194 |
+
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
195 |
+
border-width: 0;
|
196 |
+
background: transparent;
|
197 |
+
font-family: inherit;
|
198 |
+
font-size: inherit;
|
199 |
+
margin: 0;
|
200 |
+
white-space: pre;
|
201 |
+
word-wrap: normal;
|
202 |
+
line-height: inherit;
|
203 |
+
color: inherit;
|
204 |
+
z-index: 2;
|
205 |
+
position: relative;
|
206 |
+
overflow: visible;
|
207 |
}
|
208 |
.CodeMirror-wrap pre {
|
209 |
+
word-wrap: break-word;
|
210 |
+
white-space: pre-wrap;
|
211 |
+
word-break: normal;
|
212 |
}
|
213 |
|
214 |
.CodeMirror-linebackground {
|
215 |
+
position: absolute;
|
216 |
+
left: 0; right: 0; top: 0; bottom: 0;
|
217 |
+
z-index: 0;
|
218 |
}
|
219 |
|
220 |
.CodeMirror-linewidget {
|
221 |
+
position: relative;
|
222 |
+
z-index: 2;
|
223 |
+
overflow: auto;
|
224 |
}
|
225 |
|
226 |
.CodeMirror-widget {}
|
227 |
|
228 |
.CodeMirror-wrap .CodeMirror-scroll {
|
229 |
+
overflow-x: hidden;
|
230 |
}
|
231 |
|
232 |
.CodeMirror-measure {
|
233 |
+
position: absolute;
|
234 |
+
width: 100%;
|
235 |
+
height: 0;
|
236 |
+
overflow: hidden;
|
237 |
+
visibility: hidden;
|
238 |
}
|
239 |
.CodeMirror-measure pre { position: static; }
|
240 |
|
241 |
.CodeMirror div.CodeMirror-cursor {
|
242 |
+
position: absolute;
|
243 |
+
border-right: none;
|
244 |
+
width: 0;
|
245 |
}
|
246 |
|
247 |
div.CodeMirror-cursors {
|
248 |
+
visibility: hidden;
|
249 |
+
position: relative;
|
250 |
+
z-index: 1;
|
251 |
}
|
252 |
.CodeMirror-focused div.CodeMirror-cursors {
|
253 |
+
visibility: visible;
|
254 |
}
|
255 |
|
256 |
.CodeMirror-selected { background: #d9d9d9; }
|
257 |
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
258 |
|
259 |
.cm-searching {
|
260 |
+
background: #ffa;
|
261 |
+
background: rgba(255, 255, 0, .4);
|
262 |
}
|
263 |
|
264 |
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
268 |
.cm-force-border { padding-right: .1px; }
|
269 |
|
270 |
@media print {
|
271 |
+
/* Hide the cursor when printing */
|
272 |
+
.CodeMirror div.CodeMirror-cursors {
|
273 |
+
visibility: hidden;
|
274 |
+
}
|
275 |
}
|
bws_menu/css/general_style.css
CHANGED
@@ -2,133 +2,138 @@
|
|
2 |
* bwsicons fonts
|
3 |
*/
|
4 |
@font-face {
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
}
|
14 |
.bwsicons {
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
}
|
26 |
.bwsicons-editor-code:before {
|
27 |
-
|
28 |
}
|
29 |
.bwsicons-shortcode:before {
|
30 |
-
|
31 |
}
|
32 |
.bwsicons-bws-logo:before {
|
33 |
-
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
/*
|
37 |
* styles for bws_panel top level menu
|
38 |
*/
|
39 |
#adminmenu #toplevel_page_bws_panel .wp-menu-image {
|
40 |
-
|
41 |
}
|
42 |
#adminmenu #toplevel_page_bws_panel .wp-menu-image:before {
|
43 |
-
|
44 |
-
|
45 |
}
|
46 |
#adminmenu #toplevel_page_bws_panel .wp-submenu li:nth-child(5) a {
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
}
|
51 |
/* general styles */
|
52 |
.bws_info {
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
}
|
57 |
div.bws_info {
|
58 |
-
|
59 |
-
|
60 |
}
|
61 |
.bws_info_small {
|
62 |
-
|
63 |
}
|
64 |
body:not(.rtl) div.updated.bws-notice {
|
65 |
-
|
66 |
}
|
67 |
.rtl div.updated.bws-notice {
|
68 |
-
|
69 |
}
|
70 |
/*
|
71 |
* styles for rate-support div on the settings page
|
72 |
*/
|
73 |
.bws-plugin-reviews {
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
}
|
78 |
.bws-plugin-reviews-rate,
|
79 |
.bws-plugin-reviews-support {
|
80 |
-
|
81 |
}
|
82 |
.bws-plugin-reviews a {
|
83 |
-
|
84 |
}
|
85 |
.bws-plugin-reviews-rate .dashicons {
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
}
|
91 |
.bws-plugin-reviews-rate,
|
92 |
.bws-plugin-reviews-support,
|
93 |
.bws-plugin-reviews-donate {
|
94 |
-
|
95 |
-
|
96 |
}
|
97 |
-
|
98 |
@media screen and (min-width: 1600px) {
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
}
|
106 |
@media screen and (max-width: 1600px) {
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
}
|
113 |
/*
|
114 |
* styles for Go PRO tab
|
115 |
*/
|
116 |
.bws_go_pro_tab {
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
}
|
123 |
.bws_go_pro_tab:hover {
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
}
|
128 |
.bws_go_pro_tab.nav-tab-active {
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
}
|
133 |
/*
|
134 |
* styles for pro_version settings and tooltip
|
@@ -137,754 +142,761 @@ td.bws_pro_version,
|
|
137 |
tr.bws_pro_version,
|
138 |
.nav-tab.bws_plugin_menu_pro_version,
|
139 |
.nav-tab.bws_plugin_menu_pro_version:hover {
|
140 |
-
|
141 |
}
|
142 |
td.bws_pro_version_tooltip {
|
143 |
-
|
144 |
-
|
145 |
}
|
146 |
.bws_pro_version_bloc {
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
}
|
151 |
.bws_table_bg {
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
}
|
159 |
.bws_network_apply_all {
|
160 |
-
|
161 |
}
|
162 |
.bws_hide_premium_options {
|
163 |
-
|
164 |
}
|
165 |
.bws_pro_version_table_bloc table.bws_pro_version {
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
}
|
171 |
table.bws_pro_version {
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
}
|
177 |
table.bws_pro_version tbody {
|
178 |
-
|
179 |
}
|
180 |
table.bws_pro_version th,
|
181 |
table.bws_pro_version td {
|
182 |
-
|
183 |
}
|
184 |
.bws_pro_version_tooltip {
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
}
|
190 |
.bws_pro_version_tooltip .bws_button,
|
191 |
.bws_pro_version_tooltip .bws_button:hover {
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
}
|
203 |
.bws_pro_version_tooltip .bws_info {
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
}
|
209 |
.bws_pro_version_tooltip .bws_pro_links,
|
210 |
.bws_pro_version_tooltip .bws_pro_links .bws_button {
|
211 |
-
|
212 |
}
|
213 |
.bws_pro_version_tooltip .bws_trial_info {
|
214 |
-
|
215 |
-
|
216 |
}
|
217 |
div.bws_pro_version {
|
218 |
-
|
219 |
}
|
220 |
a.bws_plugin_pro_version {
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
}
|
228 |
.bws_pro_version_single_link,
|
229 |
.bws_pro_version_single_link:hover {
|
230 |
-
|
231 |
-
|
232 |
}
|
233 |
@media screen and (max-width: 768px) {
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
}
|
255 |
/*
|
256 |
* styles for addon ads block
|
257 |
*/
|
258 |
.bws-addon-block.postbox {
|
259 |
-
|
260 |
}
|
261 |
.bws-addon-block .bws_table_bg {
|
262 |
-
|
263 |
-
|
264 |
}
|
265 |
.bws-addon-block .bws_button {
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
}
|
280 |
/*
|
281 |
* styles for banner
|
282 |
*/
|
283 |
.bws_banner_on_plugin_page {
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
}
|
290 |
.bws_banner_on_plugin_page .text {
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
}
|
299 |
.bws_banner_on_plugin_page .text span {
|
300 |
-
|
301 |
-
|
302 |
}
|
303 |
div.bws_banner_on_plugin_page .button {
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
}
|
323 |
.bws_banner_on_plugin_page .button:hover,
|
324 |
.bws_banner_on_plugin_page .button:focus {
|
325 |
-
|
326 |
-
|
327 |
}
|
328 |
div.bws_banner_on_plugin_page .icon {
|
329 |
-
|
330 |
-
|
331 |
}
|
332 |
.bws_banner_on_plugin_page .icon img {
|
333 |
-
|
334 |
}
|
335 |
.bws_go_pro_banner .icon:before {
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
}
|
347 |
.bws_banner_on_plugin_page .text + .icon {
|
348 |
-
|
349 |
}
|
350 |
.bws_banner_to_settings_joint .bws-text {
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
}
|
356 |
.bws_banner_to_settings_joint .icon span.dashicons-admin-plugins {
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
}
|
362 |
.bws_banner_on_plugin_page.bws_banner_to_settings_joint .icon {
|
363 |
-
|
364 |
}
|
365 |
.bws_banner_to_settings_joint .bws-details {
|
366 |
-
|
367 |
-
|
368 |
}
|
369 |
.bws_banner_to_settings_joint a {
|
370 |
-
|
371 |
}
|
372 |
.bws_banner_to_settings_joint .bws-more-links {
|
373 |
-
|
374 |
}
|
375 |
.bws_banner_to_settings_joint .bws-more:after {
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
}
|
382 |
.bws_banner_to_settings_joint .bws-less:after {
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
}
|
389 |
.bws_banner_to_settings_joint .bws-details strong {
|
390 |
-
|
391 |
-
|
392 |
}
|
393 |
.rtl div.bws_banner_on_plugin_page .button {
|
394 |
-
|
395 |
}
|
396 |
.rtl .bws_pro_version_tooltip .bws_button,
|
397 |
.rtl div.bws_banner_on_plugin_page .icon,
|
398 |
.rtl .bws_banner_on_plugin_page .text,
|
399 |
.rtl .bws_pro_version_tooltip .bws_info {
|
400 |
-
|
401 |
}
|
402 |
.rtl .bws_banner_on_plugin_page.bws_banner_to_settings_joint .icon {
|
403 |
-
|
404 |
}
|
405 |
.rtl table.bws_pro_version th,
|
406 |
.rtl table.bws_pro_version td {
|
407 |
-
|
408 |
}
|
409 |
@media screen and (max-width: 768px) {
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
}
|
423 |
@media screen and (max-width: 600px) {
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
}
|
428 |
-
/*
|
429 |
* affiliate postbox
|
430 |
*/
|
431 |
#bws-affiliate-postbox {
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
}
|
439 |
#bws-affiliate-postbox .notice-dismiss:active:before,
|
440 |
#bws-affiliate-postbox .notice-dismiss:focus:before,
|
441 |
#bws-affiliate-postbox .notice-dismiss:hover:before {
|
442 |
-
|
443 |
}
|
444 |
#bws-affiliate-postbox h3 {
|
445 |
-
|
446 |
-
|
447 |
}
|
448 |
.bws-affiliate-get {
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
}
|
454 |
#bws-affiliate-postbox img {
|
455 |
-
|
456 |
-
|
457 |
}
|
458 |
.bws-row {
|
459 |
-
|
460 |
}
|
461 |
.bws-cell {
|
462 |
-
|
463 |
-
|
464 |
}
|
465 |
.bws-cell div {
|
466 |
-
|
467 |
}
|
468 |
#bws-affiliate-postbox .button {
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
}
|
475 |
#bws-affiliate-postbox .button:hover {
|
476 |
-
|
477 |
}
|
478 |
/* display code */
|
479 |
span.bws_code {
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
}
|
485 |
/*
|
486 |
* styles help tooltips
|
487 |
*/
|
488 |
.bws_help_box {
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
}
|
498 |
.bws_help_box:not(.dashicons) {
|
499 |
-
|
500 |
}
|
501 |
.bws_help_box.dashicons-editor-help,
|
502 |
.setting span .bws_help_box.dashicons-editor-help {
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
}
|
513 |
.bws_help_box.dashicons-editor-help:hover {
|
514 |
-
|
515 |
}
|
516 |
.bws_hidden_help_text {
|
517 |
-
|
518 |
}
|
519 |
.bws-tooltip-content {
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
}
|
533 |
.bws-tooltip-content a {
|
534 |
-
|
535 |
}
|
536 |
/*
|
537 |
* styles for Request a Feature link near screen-meta
|
538 |
*/
|
539 |
#bws_request_feature {
|
540 |
-
|
541 |
}
|
542 |
#bws_request_feature button {
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
}
|
554 |
#bws_request_feature button:hover {
|
555 |
-
|
556 |
}
|
557 |
-
/*
|
558 |
* bws shortcode insert
|
559 |
*/
|
560 |
.mce-toolbar .mce-btn-group .mce-btn.mce-bws_shortcode_button {
|
561 |
-
|
562 |
-
|
563 |
}
|
564 |
#bws_shortcode_content,
|
565 |
#bws_shortcode_select_plugin {
|
566 |
-
|
567 |
}
|
568 |
#bws_shortcode_content * {
|
569 |
-
|
570 |
}
|
571 |
#bws_shortcode_popup_block h4 {
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
}
|
576 |
#bws_shortcode_content_bottom p {
|
577 |
-
|
578 |
-
|
579 |
}
|
580 |
#bws_shortcode_block {
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
}
|
586 |
#bws_shortcode_display {
|
587 |
-
|
588 |
}
|
589 |
#bws_shortcode_content fieldset label {
|
590 |
-
|
591 |
-
|
592 |
}
|
593 |
#bws_shortcode_content .title {
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
}
|
598 |
#bws_shortcode_content .title,
|
599 |
#bws_shortcode_content .checkbox-title {
|
600 |
-
|
601 |
}
|
602 |
/*
|
603 |
* styles for notices (license has expired, Illegal use notification ond other) on the /plugins.php page
|
604 |
*/
|
605 |
.bws-plugin-update-tr .update-message {
|
606 |
-
|
607 |
}
|
608 |
.bws-plugin-update-tr .update-message :before {
|
609 |
-
|
610 |
}
|
611 |
/*
|
612 |
* Bws_Settings_Tabs
|
613 |
*/
|
614 |
.bws_form #postbox-container-2 > div {
|
615 |
-
|
616 |
-
|
617 |
}
|
618 |
.bws_form #postbox-container-2 > div.submit {
|
619 |
-
|
620 |
-
|
621 |
}
|
622 |
#bws_settings_tabs_wrapper {
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
}
|
634 |
#bws_settings_tabs {
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
}
|
649 |
#bws_settings_tabs .ui-state-default,
|
650 |
#bws_settings_tabs .ui-widget-content .ui-state-default,
|
651 |
#bws_settings_tabs .ui-widget-header .ui-state-default {
|
652 |
-
|
653 |
}
|
654 |
#bws_settings_tabs li {
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
}
|
661 |
#bws_settings_tabs li a {
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
}
|
677 |
#bws_settings_tabs li.ui-tabs-active {
|
678 |
-
|
679 |
}
|
680 |
#bws_settings_tabs li.ui-tabs-active a,
|
681 |
#bws_settings_tabs li a:hover {
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
}
|
689 |
#bws_settings_tabs li a:before {
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
}
|
696 |
#bws_settings_tabs li.bws-tab-display a:before {
|
697 |
-
|
698 |
}
|
699 |
#bws_settings_tabs li.bws-tab-misc a:before {
|
700 |
-
|
701 |
}
|
702 |
#bws_settings_tabs li.bws-tab-custom_code a:before {
|
703 |
-
|
704 |
-
|
705 |
}
|
706 |
#bws_settings_tabs li.bws-tab-license a:before {
|
707 |
-
|
708 |
}
|
709 |
/* custom tabs */
|
710 |
#bws_settings_tabs li.bws-tab-images a:before {
|
711 |
-
|
712 |
}
|
713 |
#bws_settings_tabs li.bws-tab-cover a:before {
|
714 |
-
|
715 |
}
|
716 |
#bws_settings_tabs li.bws-tab-lightbox a:before {
|
717 |
-
|
718 |
}
|
719 |
#bws_settings_tabs li.bws-tab-social a:before {
|
720 |
-
|
721 |
}
|
722 |
#bws_settings_tabs li.bws-tab-import-export a:before {
|
723 |
-
|
724 |
}
|
725 |
#bws_settings_tabs li.bws-tab-errors a:before,
|
726 |
#bws_settings_tabs li.bws-tab-messages a:before {
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
}
|
732 |
#bws_settings_tabs li.bws-tab-notifications a:before {
|
733 |
-
|
734 |
}
|
735 |
#bws_settings_tabs li.bws-tab-reports a:before {
|
736 |
-
|
737 |
}
|
738 |
#bws_settings_tabs li.bws-tab-output a:before {
|
739 |
-
|
740 |
}
|
741 |
|
742 |
#bws_settings_tabs li:last-child a {
|
743 |
-
|
744 |
}
|
745 |
#bws_settings_tabs_wrapper .bws_tab {
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
}
|
754 |
.bws_tab a {
|
755 |
-
|
756 |
}
|
757 |
.bws_tab a:hover {
|
758 |
-
|
759 |
}
|
760 |
.bws_tab input, .bws_tab select, .bws_tab textarea, .bws_tab button {
|
761 |
-
|
762 |
-
|
763 |
}
|
764 |
#bws_settings_tabs_wrapper .bws_tab > *:not(.bws_pro_version_bloc):not(.bws_tab_sub_label):not(hr):not(.inline) {
|
765 |
-
|
766 |
-
|
767 |
-
|
|
|
|
|
|
|
768 |
}
|
769 |
#bws_settings_tabs_wrapper .bws_tab button,
|
770 |
#bws_settings_tabs_wrapper .bws_tab input[type="submit"],
|
771 |
#bws_settings_tabs_wrapper .bws_tab input[type="button"] {
|
772 |
-
|
773 |
-
|
|
|
|
|
|
|
|
|
774 |
}
|
775 |
.bws_form .postbox .hndle {
|
776 |
-
|
777 |
}
|
778 |
#poststuff h3.bws_tab_label {
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
}
|
783 |
.bws_tab_sub_label {
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
}
|
790 |
.bws_tab .form-table textarea {
|
791 |
-
|
792 |
}
|
793 |
#poststuff h3.bws_tab_label + hr {
|
794 |
-
|
795 |
}
|
796 |
.bws_tab_description + hr {
|
797 |
-
|
798 |
}
|
799 |
.rtl #bws_settings_tabs {
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
}
|
804 |
.rtl #bws_settings_tabs li a {
|
805 |
-
|
806 |
}
|
807 |
.rtl #bws_settings_tabs li.ui-tabs-active a,
|
808 |
.rtl #bws_settings_tabs li a:hover {
|
809 |
-
|
810 |
}
|
811 |
.rtl #bws_settings_tabs li a:before {
|
812 |
-
|
813 |
}
|
814 |
.rtl .bws_form #postbox-container-2 > div {
|
815 |
-
|
816 |
-
|
817 |
}
|
818 |
.bws_margined_box {
|
819 |
-
|
820 |
}
|
821 |
@media only screen and (max-width: 1100px) {
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
}
|
858 |
@media only screen and (max-width: 850px) {
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
}
|
871 |
@media screen and (max-width: 782px) {
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
}
|
876 |
@media screen and (max-width: 440px) {
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
}
|
2 |
* bwsicons fonts
|
3 |
*/
|
4 |
@font-face {
|
5 |
+
font-family: 'bwsicons';
|
6 |
+
src: url('../fonts/bwsicons.eot?edecf2');
|
7 |
+
src: url('../fonts/bwsicons.eot?edecf2#iefix') format('embedded-opentype'),
|
8 |
+
url('../fonts/bwsicons.ttf?edecf2') format('truetype'),
|
9 |
+
url('../fonts/bwsicons.woff?edecf2') format('woff'),
|
10 |
+
url('../fonts/bwsicons.svg?edecf2#bwsicons') format('svg');
|
11 |
+
font-weight: normal;
|
12 |
+
font-style: normal;
|
13 |
}
|
14 |
.bwsicons {
|
15 |
+
/* use !important to prevent issues with browser extensions that change fonts */
|
16 |
+
font-family: 'bwsicons' !important;
|
17 |
+
speak: none;
|
18 |
+
font-style: normal;
|
19 |
+
font-weight: normal;
|
20 |
+
font-variant: normal;
|
21 |
+
text-transform: none;
|
22 |
+
line-height: 1;
|
23 |
+
-webkit-font-smoothing: antialiased;
|
24 |
+
-moz-osx-font-smoothing: grayscale;
|
25 |
}
|
26 |
.bwsicons-editor-code:before {
|
27 |
+
content: "\e93a";
|
28 |
}
|
29 |
.bwsicons-shortcode:before {
|
30 |
+
content: "\e93b";
|
31 |
}
|
32 |
.bwsicons-bws-logo:before {
|
33 |
+
content: "\e93c";
|
34 |
}
|
35 |
|
36 |
+
.bws_tab .ui-accordion .ui-accordion-header.ui-state-active {
|
37 |
+
color: inherit;
|
38 |
+
}
|
39 |
+
.bws_tab .ui-accordion .ui-state-active .ui-icon {
|
40 |
+
background-color: #ccc;
|
41 |
+
}
|
42 |
/*
|
43 |
* styles for bws_panel top level menu
|
44 |
*/
|
45 |
#adminmenu #toplevel_page_bws_panel .wp-menu-image {
|
46 |
+
font-family: 'bwsicons' !important;
|
47 |
}
|
48 |
#adminmenu #toplevel_page_bws_panel .wp-menu-image:before {
|
49 |
+
content: "\e93c";
|
50 |
+
font-family: 'bwsicons' !important;
|
51 |
}
|
52 |
#adminmenu #toplevel_page_bws_panel .wp-submenu li:nth-child(5) a {
|
53 |
+
border-top: 1px solid #444;
|
54 |
+
padding-top: 12px;
|
55 |
+
margin-top: 6px;
|
56 |
}
|
57 |
/* general styles */
|
58 |
.bws_info {
|
59 |
+
color: #888;
|
60 |
+
font-size: 13px;
|
61 |
+
font-style: italic;
|
62 |
}
|
63 |
div.bws_info {
|
64 |
+
margin-top: 7px;
|
65 |
+
word-break: break-all;
|
66 |
}
|
67 |
.bws_info_small {
|
68 |
+
font-size: 11px !important;
|
69 |
}
|
70 |
body:not(.rtl) div.updated.bws-notice {
|
71 |
+
border-left: 4px solid #ffba00;
|
72 |
}
|
73 |
.rtl div.updated.bws-notice {
|
74 |
+
border-right: 4px solid #ffba00;
|
75 |
}
|
76 |
/*
|
77 |
* styles for rate-support div on the settings page
|
78 |
*/
|
79 |
.bws-plugin-reviews {
|
80 |
+
background: none repeat scroll 0 0 #BEE1F1;
|
81 |
+
border: 1px solid #70A8C2;
|
82 |
+
border-radius: 3px;
|
83 |
}
|
84 |
.bws-plugin-reviews-rate,
|
85 |
.bws-plugin-reviews-support {
|
86 |
+
border-right: 1px solid #70A8C2;
|
87 |
}
|
88 |
.bws-plugin-reviews a {
|
89 |
+
text-decoration: none;
|
90 |
}
|
91 |
.bws-plugin-reviews-rate .dashicons {
|
92 |
+
font-size: 12px;
|
93 |
+
height: 13px;
|
94 |
+
width: 9px;
|
95 |
+
vertical-align: middle;
|
96 |
}
|
97 |
.bws-plugin-reviews-rate,
|
98 |
.bws-plugin-reviews-support,
|
99 |
.bws-plugin-reviews-donate {
|
100 |
+
padding: 10px;
|
101 |
+
display: block;
|
102 |
}
|
|
|
103 |
@media screen and (min-width: 1600px) {
|
104 |
+
.bws-plugin-reviews-rate,
|
105 |
+
.bws-plugin-reviews-support,
|
106 |
+
.bws-plugin-reviews-donate {
|
107 |
+
display: inline-block;
|
108 |
+
width: 30%;
|
109 |
+
}
|
110 |
}
|
111 |
@media screen and (max-width: 1600px) {
|
112 |
+
.bws-plugin-reviews-rate,
|
113 |
+
.bws-plugin-reviews-support {
|
114 |
+
border-bottom: 1px solid #70A8C2;
|
115 |
+
border-right: none;
|
116 |
+
}
|
117 |
}
|
118 |
/*
|
119 |
* styles for Go PRO tab
|
120 |
*/
|
121 |
.bws_go_pro_tab {
|
122 |
+
background-color: #2A95C5;
|
123 |
+
border-color: #11688F;
|
124 |
+
color: #fff;
|
125 |
+
font-weight: normal;
|
126 |
+
text-shadow: none;
|
127 |
}
|
128 |
.bws_go_pro_tab:hover {
|
129 |
+
background-color: #2080AB;
|
130 |
+
color: #fff;
|
131 |
+
border-color: #11688F;
|
132 |
}
|
133 |
.bws_go_pro_tab.nav-tab-active {
|
134 |
+
background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
|
135 |
+
border-color: #CCCCCC #CCCCCC #F1F1F1;
|
136 |
+
color: #000000;
|
137 |
}
|
138 |
/*
|
139 |
* styles for pro_version settings and tooltip
|
142 |
tr.bws_pro_version,
|
143 |
.nav-tab.bws_plugin_menu_pro_version,
|
144 |
.nav-tab.bws_plugin_menu_pro_version:hover {
|
145 |
+
background: rgba(245, 225, 119, 0.3);
|
146 |
}
|
147 |
td.bws_pro_version_tooltip {
|
148 |
+
border: 1px solid #AAA;
|
149 |
+
position: inherit;
|
150 |
}
|
151 |
.bws_pro_version_bloc {
|
152 |
+
position: relative;
|
153 |
+
border: 1px solid #dcd6b8;
|
154 |
+
overflow: hidden;
|
155 |
}
|
156 |
.bws_table_bg {
|
157 |
+
background: #f5e177;
|
158 |
+
opacity: 0.3;
|
159 |
+
width: 100%;
|
160 |
+
height: 100%;
|
161 |
+
position: absolute;
|
162 |
+
z-index: 1;
|
163 |
}
|
164 |
.bws_network_apply_all {
|
165 |
+
padding-left: 15px;
|
166 |
}
|
167 |
.bws_hide_premium_options {
|
168 |
+
z-index: 5;
|
169 |
}
|
170 |
.bws_pro_version_table_bloc table.bws_pro_version {
|
171 |
+
background: transparent;
|
172 |
+
margin: 0;
|
173 |
+
border: none;
|
174 |
+
width: 100%;
|
175 |
}
|
176 |
table.bws_pro_version {
|
177 |
+
background: #E0E0E0;
|
178 |
+
border: 1px solid #AAA;
|
179 |
+
margin-bottom: 5px;
|
180 |
+
width: auto;
|
181 |
}
|
182 |
table.bws_pro_version tbody {
|
183 |
+
display: block;
|
184 |
}
|
185 |
table.bws_pro_version th,
|
186 |
table.bws_pro_version td {
|
187 |
+
padding-left: 10px;
|
188 |
}
|
189 |
.bws_pro_version_tooltip {
|
190 |
+
position: relative;
|
191 |
+
z-index: 2;
|
192 |
+
padding: 10px;
|
193 |
+
font-size: 14px;
|
194 |
}
|
195 |
.bws_pro_version_tooltip .bws_button,
|
196 |
.bws_pro_version_tooltip .bws_button:hover {
|
197 |
+
background: #dd5738;
|
198 |
+
border: none;
|
199 |
+
text-decoration: none;
|
200 |
+
color: #fff;
|
201 |
+
padding: 7px 10px;
|
202 |
+
border-radius: 3px;
|
203 |
+
margin: 5px 0;
|
204 |
+
font-size: 13px;
|
205 |
+
line-height: 1.4em;
|
206 |
+
float: left;
|
207 |
}
|
208 |
.bws_pro_version_tooltip .bws_info {
|
209 |
+
float: left;
|
210 |
+
padding-top: 10px;
|
211 |
+
font-size: 14px;
|
212 |
+
color: #444;
|
213 |
}
|
214 |
.bws_pro_version_tooltip .bws_pro_links,
|
215 |
.bws_pro_version_tooltip .bws_pro_links .bws_button {
|
216 |
+
float: right;
|
217 |
}
|
218 |
.bws_pro_version_tooltip .bws_trial_info {
|
219 |
+
padding: 10px;
|
220 |
+
display: inline-block;
|
221 |
}
|
222 |
div.bws_pro_version {
|
223 |
+
padding: 5px 10px;
|
224 |
}
|
225 |
a.bws_plugin_pro_version {
|
226 |
+
display: block;
|
227 |
+
background: rgba(245, 225, 119, 0.3);
|
228 |
+
border: 1px solid #dcd6b8;
|
229 |
+
padding: 5px;
|
230 |
+
text-decoration: none;
|
231 |
+
color: #666;
|
232 |
}
|
233 |
.bws_pro_version_single_link,
|
234 |
.bws_pro_version_single_link:hover {
|
235 |
+
text-decoration: none;
|
236 |
+
color: #666;
|
237 |
}
|
238 |
@media screen and (max-width: 768px) {
|
239 |
+
.bws_pro_version_tooltip {
|
240 |
+
padding: 10px;
|
241 |
+
text-align: center;
|
242 |
+
}
|
243 |
+
.bws_pro_version_tooltip .bws_info {
|
244 |
+
float: none;
|
245 |
+
text-align: center;
|
246 |
+
}
|
247 |
+
.bws_pro_version_tooltip a {
|
248 |
+
display: inline-block;
|
249 |
+
line-height: 1.5;
|
250 |
+
}
|
251 |
+
.bws_pro_version_tooltip .bws_info a {
|
252 |
+
display: block;
|
253 |
+
}
|
254 |
+
.bws_pro_version_tooltip .bws_button,
|
255 |
+
.bws_pro_version_tooltip .bws_button:hover {
|
256 |
+
margin: 10px 10px 5px;
|
257 |
+
float: none;
|
258 |
+
}
|
259 |
}
|
260 |
/*
|
261 |
* styles for addon ads block
|
262 |
*/
|
263 |
.bws-addon-block.postbox {
|
264 |
+
border: none;
|
265 |
}
|
266 |
.bws-addon-block .bws_table_bg {
|
267 |
+
background: #fff;
|
268 |
+
opacity: 0.3;
|
269 |
}
|
270 |
.bws-addon-block .bws_button {
|
271 |
+
display: inline-block;
|
272 |
+
background: #0faa00;
|
273 |
+
border: 1px solid #0b8200;
|
274 |
+
text-decoration: none;
|
275 |
+
color: #fff;
|
276 |
+
padding: 4px 10px;
|
277 |
+
border-radius: 3px;
|
278 |
+
font-size: 13px;
|
279 |
+
line-height: 1.4em;
|
280 |
+
z-index: 2;
|
281 |
+
position: relative;
|
282 |
+
-webkit-box-shadow: 0 1px 0 #0c8c00;
|
283 |
+
box-shadow: 0 1px 0 #0c8c00;
|
284 |
}
|
285 |
/*
|
286 |
* styles for banner
|
287 |
*/
|
288 |
.bws_banner_on_plugin_page {
|
289 |
+
border: 1px solid #d4d4d4;
|
290 |
+
margin: 12px 0;
|
291 |
+
background: #FFF;
|
292 |
+
position: relative;
|
293 |
+
overflow: hidden
|
294 |
}
|
295 |
.bws_banner_on_plugin_page .text {
|
296 |
+
color: #000;
|
297 |
+
font-size: 15px;
|
298 |
+
line-height: 26px;
|
299 |
+
margin: 18px 18px 14px;
|
300 |
+
float: left;
|
301 |
+
width: auto;
|
302 |
+
max-width: 80%;
|
303 |
}
|
304 |
.bws_banner_on_plugin_page .text span {
|
305 |
+
font-size: 14px;
|
306 |
+
opacity: 0.7;
|
307 |
}
|
308 |
div.bws_banner_on_plugin_page .button {
|
309 |
+
float: right;
|
310 |
+
border: none;
|
311 |
+
font-size: 14px;
|
312 |
+
margin: 18px 40px;
|
313 |
+
padding: 12px 29px;
|
314 |
+
color: #FFF;
|
315 |
+
text-shadow: none;
|
316 |
+
font-weight: bold;
|
317 |
+
background: #0074A2;
|
318 |
+
-moz-border-radius: 3px;
|
319 |
+
border-radius: 3px;
|
320 |
+
-webkit-border-radius: 3px;
|
321 |
+
text-decoration: none;
|
322 |
+
height: 50px;
|
323 |
+
text-align: center;
|
324 |
+
text-transform: uppercase;
|
325 |
+
box-shadow: none;
|
326 |
+
line-height: 26px;
|
327 |
}
|
328 |
.bws_banner_on_plugin_page .button:hover,
|
329 |
.bws_banner_on_plugin_page .button:focus {
|
330 |
+
background: #222;
|
331 |
+
color: #FFF;
|
332 |
}
|
333 |
div.bws_banner_on_plugin_page .icon {
|
334 |
+
float: left;
|
335 |
+
margin: 12px 8px 8px 12px;
|
336 |
}
|
337 |
.bws_banner_on_plugin_page .icon img {
|
338 |
+
max-width: 64px;
|
339 |
}
|
340 |
.bws_go_pro_banner .icon:before {
|
341 |
+
content: 'PRO';
|
342 |
+
background: #F26E50;
|
343 |
+
border-radius: 4px;
|
344 |
+
color: #FFF;
|
345 |
+
font-size: 11px;
|
346 |
+
font-weight: bold;
|
347 |
+
display: block;
|
348 |
+
padding: 0px 4px;
|
349 |
+
margin: 0 15px -7px;
|
350 |
+
position: relative;
|
351 |
}
|
352 |
.bws_banner_on_plugin_page .text + .icon {
|
353 |
+
display: none;
|
354 |
}
|
355 |
.bws_banner_to_settings_joint .bws-text {
|
356 |
+
color: #000;
|
357 |
+
font-size: 16px;
|
358 |
+
line-height: 26px;
|
359 |
+
padding: 13px 14px 14px;
|
360 |
}
|
361 |
.bws_banner_to_settings_joint .icon span.dashicons-admin-plugins {
|
362 |
+
font-size: 48px;
|
363 |
+
color: #d6d6d6;
|
364 |
+
width: 48px;
|
365 |
+
height: 48px;
|
366 |
}
|
367 |
.bws_banner_on_plugin_page.bws_banner_to_settings_joint .icon {
|
368 |
+
margin: 2px 16px 0 0;
|
369 |
}
|
370 |
.bws_banner_to_settings_joint .bws-details {
|
371 |
+
background: #f2f2f2;
|
372 |
+
padding: 15px 78px 21px;
|
373 |
}
|
374 |
.bws_banner_to_settings_joint a {
|
375 |
+
text-decoration: none;
|
376 |
}
|
377 |
.bws_banner_to_settings_joint .bws-more-links {
|
378 |
+
font-size: 14px;
|
379 |
}
|
380 |
.bws_banner_to_settings_joint .bws-more:after {
|
381 |
+
content: "\f347";
|
382 |
+
font-family: dashicons;
|
383 |
+
margin: 0 5px;
|
384 |
+
top: 2px;
|
385 |
+
position: relative;
|
386 |
}
|
387 |
.bws_banner_to_settings_joint .bws-less:after {
|
388 |
+
content: "\f343";
|
389 |
+
font-family: dashicons;
|
390 |
+
margin: 0 5px;
|
391 |
+
top: 2px;
|
392 |
+
position: relative;
|
393 |
}
|
394 |
.bws_banner_to_settings_joint .bws-details strong {
|
395 |
+
font-size: 14px;
|
396 |
+
line-height: 30px;
|
397 |
}
|
398 |
.rtl div.bws_banner_on_plugin_page .button {
|
399 |
+
float: left;
|
400 |
}
|
401 |
.rtl .bws_pro_version_tooltip .bws_button,
|
402 |
.rtl div.bws_banner_on_plugin_page .icon,
|
403 |
.rtl .bws_banner_on_plugin_page .text,
|
404 |
.rtl .bws_pro_version_tooltip .bws_info {
|
405 |
+
float: right;
|
406 |
}
|
407 |
.rtl .bws_banner_on_plugin_page.bws_banner_to_settings_joint .icon {
|
408 |
+
margin: 2px 0 0 16px;
|
409 |
}
|
410 |
.rtl table.bws_pro_version th,
|
411 |
.rtl table.bws_pro_version td {
|
412 |
+
padding-right: 10px;
|
413 |
}
|
414 |
@media screen and (max-width: 768px) {
|
415 |
+
.bws_banner_on_plugin_page .text,
|
416 |
+
.bws_banner_on_plugin_page .icon,
|
417 |
+
.bws_banner_on_plugin_page .button_div,
|
418 |
+
.bws_banner_on_plugin_page .button {
|
419 |
+
float: none;
|
420 |
+
text-align: center;
|
421 |
+
max-width: 100%;
|
422 |
+
}
|
423 |
+
.bws_banner_on_plugin_page .icon {
|
424 |
+
position: relative;
|
425 |
+
left: 8px;
|
426 |
+
}
|
427 |
}
|
428 |
@media screen and (max-width: 600px) {
|
429 |
+
.bws_banner_to_settings_joint .bws-details {
|
430 |
+
padding: 15px 20px 21px;
|
431 |
+
}
|
432 |
}
|
433 |
+
/*
|
434 |
* affiliate postbox
|
435 |
*/
|
436 |
#bws-affiliate-postbox {
|
437 |
+
background: url("../images/affiliate-background.png") no-repeat center #1a3e59;
|
438 |
+
overflow: hidden;
|
439 |
+
position: relative;
|
440 |
+
padding: 12px;
|
441 |
+
color: #ffffff;
|
442 |
+
text-align: center;
|
443 |
}
|
444 |
#bws-affiliate-postbox .notice-dismiss:active:before,
|
445 |
#bws-affiliate-postbox .notice-dismiss:focus:before,
|
446 |
#bws-affiliate-postbox .notice-dismiss:hover:before {
|
447 |
+
color: #fff;
|
448 |
}
|
449 |
#bws-affiliate-postbox h3 {
|
450 |
+
color: #ffffff;
|
451 |
+
font-size: 1.3em;
|
452 |
}
|
453 |
.bws-affiliate-get {
|
454 |
+
color: #f67f48;
|
455 |
+
font-size: 1.3em;
|
456 |
+
font-weight: bold;
|
457 |
+
margin: 10px 0 5px;
|
458 |
}
|
459 |
#bws-affiliate-postbox img {
|
460 |
+
max-width: 65px;
|
461 |
+
margin-bottom: 5px;
|
462 |
}
|
463 |
.bws-row {
|
464 |
+
margin-top: 25px;
|
465 |
}
|
466 |
.bws-cell {
|
467 |
+
float: left;
|
468 |
+
width: 33.33%;
|
469 |
}
|
470 |
.bws-cell div {
|
471 |
+
margin: 5px;
|
472 |
}
|
473 |
#bws-affiliate-postbox .button {
|
474 |
+
background: #dd6930;
|
475 |
+
border-color: #dd6930;
|
476 |
+
color: #fff;
|
477 |
+
margin-top: 5px;
|
478 |
+
font-weight: bold;
|
479 |
}
|
480 |
#bws-affiliate-postbox .button:hover {
|
481 |
+
color: rgba(255, 255, 255, 0.8);
|
482 |
}
|
483 |
/* display code */
|
484 |
span.bws_code {
|
485 |
+
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.07);
|
486 |
+
font-size: 13px;
|
487 |
+
margin: 0 1px;
|
488 |
+
padding: 3px 5px 2px;
|
489 |
}
|
490 |
/*
|
491 |
* styles help tooltips
|
492 |
*/
|
493 |
.bws_help_box {
|
494 |
+
background-image: url("../images/tooltip_icons.png");
|
495 |
+
background-repeat: no-repeat;
|
496 |
+
cursor: pointer;
|
497 |
+
height: 28px;
|
498 |
+
position: relative;
|
499 |
+
margin: 3px 5px;
|
500 |
+
width: 28px;
|
501 |
+
display: inline-block;
|
502 |
}
|
503 |
.bws_help_box:not(.dashicons) {
|
504 |
+
vertical-align: middle;
|
505 |
}
|
506 |
.bws_help_box.dashicons-editor-help,
|
507 |
.setting span .bws_help_box.dashicons-editor-help {
|
508 |
+
background: none;
|
509 |
+
color: #0074a2;
|
510 |
+
height: auto;
|
511 |
+
width: auto;
|
512 |
+
margin: 0;
|
513 |
+
padding: 0;
|
514 |
+
z-index: 2;
|
515 |
+
min-width: auto;
|
516 |
+
float: none;
|
517 |
}
|
518 |
.bws_help_box.dashicons-editor-help:hover {
|
519 |
+
color: #2ea2cc;
|
520 |
}
|
521 |
.bws_hidden_help_text {
|
522 |
+
display: none;
|
523 |
}
|
524 |
.bws-tooltip-content {
|
525 |
+
font-size: 11px;
|
526 |
+
color: #fff;
|
527 |
+
text-shadow: 0 0 2px #000;
|
528 |
+
padding: 4px 8px;
|
529 |
+
border: 1px solid rgba(255,255,255,0.25);
|
530 |
+
background: rgba(25,25,25,0.92);
|
531 |
+
border-radius: 3px;
|
532 |
+
-webkit-border-radius: 3px;
|
533 |
+
-moz-border-radius: 3px;
|
534 |
+
box-shadow: 0 0 3px #555;
|
535 |
+
-webkit-box-shadow: 0 0 3px #555;
|
536 |
+
-moz-box-shadow: 0 0 3px #555;
|
537 |
}
|
538 |
.bws-tooltip-content a {
|
539 |
+
color: #00a0d2;
|
540 |
}
|
541 |
/*
|
542 |
* styles for Request a Feature link near screen-meta
|
543 |
*/
|
544 |
#bws_request_feature {
|
545 |
+
margin-top: 0;
|
546 |
}
|
547 |
#bws_request_feature button {
|
548 |
+
border: 1px solid #ccd0d4;
|
549 |
+
border-top: none;
|
550 |
+
height: auto;
|
551 |
+
margin-bottom: 0;
|
552 |
+
color: #fff;
|
553 |
+
border-radius: 0 0 4px 4px;
|
554 |
+
background-color: #0071a1;
|
555 |
+
line-height: 1.7;
|
556 |
+
box-shadow: 0 0 0 transparent;
|
557 |
+
transition: box-shadow .1s linear;
|
558 |
}
|
559 |
#bws_request_feature button:hover {
|
560 |
+
background-color: #00a0d2;
|
561 |
}
|
562 |
+
/*
|
563 |
* bws shortcode insert
|
564 |
*/
|
565 |
.mce-toolbar .mce-btn-group .mce-btn.mce-bws_shortcode_button {
|
566 |
+
background-color: #fff;
|
567 |
+
border: 1px solid #e5e5e5;
|
568 |
}
|
569 |
#bws_shortcode_content,
|
570 |
#bws_shortcode_select_plugin {
|
571 |
+
margin-bottom: 10px;
|
572 |
}
|
573 |
#bws_shortcode_content * {
|
574 |
+
white-space: normal;
|
575 |
}
|
576 |
#bws_shortcode_popup_block h4 {
|
577 |
+
padding: 0;
|
578 |
+
line-height: 2.5;
|
579 |
+
text-transform: uppercase;
|
580 |
}
|
581 |
#bws_shortcode_content_bottom p {
|
582 |
+
font-style: italic;
|
583 |
+
color: #666;
|
584 |
}
|
585 |
#bws_shortcode_block {
|
586 |
+
background-color: #fdfdfd;
|
587 |
+
border: 1px solid #dfdfdf;
|
588 |
+
overflow: auto;
|
589 |
+
padding: 10px;
|
590 |
}
|
591 |
#bws_shortcode_display {
|
592 |
+
margin: 0 auto;
|
593 |
}
|
594 |
#bws_shortcode_content fieldset label {
|
595 |
+
margin-top: 5px;
|
596 |
+
display: inline-block;
|
597 |
}
|
598 |
#bws_shortcode_content .title {
|
599 |
+
margin-right: 5px;
|
600 |
+
margin-left: 5px;
|
601 |
+
line-height: 2.5;
|
602 |
}
|
603 |
#bws_shortcode_content .title,
|
604 |
#bws_shortcode_content .checkbox-title {
|
605 |
+
white-space: normal;
|
606 |
}
|
607 |
/*
|
608 |
* styles for notices (license has expired, Illegal use notification ond other) on the /plugins.php page
|
609 |
*/
|
610 |
.bws-plugin-update-tr .update-message {
|
611 |
+
margin-top: 0 !important;
|
612 |
}
|
613 |
.bws-plugin-update-tr .update-message :before {
|
614 |
+
content: '';
|
615 |
}
|
616 |
/*
|
617 |
* Bws_Settings_Tabs
|
618 |
*/
|
619 |
.bws_form #postbox-container-2 > div {
|
620 |
+
width: calc( 100% - 162px );
|
621 |
+
margin-left: 160px;
|
622 |
}
|
623 |
.bws_form #postbox-container-2 > div.submit {
|
624 |
+
margin-bottom: 20px;
|
625 |
+
padding: 0;
|
626 |
}
|
627 |
#bws_settings_tabs_wrapper {
|
628 |
+
position: relative;
|
629 |
+
max-width: 100%;
|
630 |
+
min-width: 100%;
|
631 |
+
width: 100%;
|
632 |
+
box-sizing: border-box;
|
633 |
+
font-size: 13px;
|
634 |
+
border: none;
|
635 |
+
padding: 0;
|
636 |
+
background: none;
|
637 |
+
font-family: inherit;
|
638 |
}
|
639 |
#bws_settings_tabs {
|
640 |
+
z-index: 2;
|
641 |
+
position: relative;
|
642 |
+
width: 159px;
|
643 |
+
float: left;
|
644 |
+
background: #f5f5f5;
|
645 |
+
border-top: 1px solid #ddd;
|
646 |
+
border-left: 1px solid #ddd;
|
647 |
+
border-bottom: 1px solid #ddd;
|
648 |
+
border-right: 0;
|
649 |
+
margin: 0;
|
650 |
+
padding: 0;
|
651 |
+
border-radius: 0;
|
652 |
+
line-height: inherit;
|
653 |
}
|
654 |
#bws_settings_tabs .ui-state-default,
|
655 |
#bws_settings_tabs .ui-widget-content .ui-state-default,
|
656 |
#bws_settings_tabs .ui-widget-header .ui-state-default {
|
657 |
+
border: none;
|
658 |
}
|
659 |
#bws_settings_tabs li {
|
660 |
+
margin: 0;
|
661 |
+
padding: 0;
|
662 |
+
float: none;
|
663 |
+
background: none;
|
664 |
+
white-space: normal;
|
665 |
}
|
666 |
#bws_settings_tabs li a {
|
667 |
+
display: block;
|
668 |
+
margin: 0 20px;
|
669 |
+
padding: 20px 0 20px 25px;
|
670 |
+
text-decoration: none;
|
671 |
+
color: #666;
|
672 |
+
border-bottom: 1px solid #ddd;
|
673 |
+
word-break: break-word;
|
674 |
+
box-shadow: none;
|
675 |
+
-webkit-box-sizing: border-box;
|
676 |
+
-moz-box-sizing: border-box;
|
677 |
+
box-sizing: border-box;
|
678 |
+
transition: none;
|
679 |
+
-webkit-transition: none;
|
680 |
+
float: none;
|
681 |
}
|
682 |
#bws_settings_tabs li.ui-tabs-active {
|
683 |
+
width: 161px;
|
684 |
}
|
685 |
#bws_settings_tabs li.ui-tabs-active a,
|
686 |
#bws_settings_tabs li a:hover {
|
687 |
+
width: 161px;
|
688 |
+
margin: -1px 0 0 0;
|
689 |
+
border-top: 1px solid #ddd;
|
690 |
+
padding: 20px 21px 20px 45px;
|
691 |
+
color: #000 !important;
|
692 |
+
background: #fff !important;
|
693 |
}
|
694 |
#bws_settings_tabs li a:before {
|
695 |
+
content: "\f111";
|
696 |
+
font-family: 'dashicons';
|
697 |
+
font-size: 20px;
|
698 |
+
position: absolute;
|
699 |
+
left: 20px;
|
700 |
}
|
701 |
#bws_settings_tabs li.bws-tab-display a:before {
|
702 |
+
content: "\f163";
|
703 |
}
|
704 |
#bws_settings_tabs li.bws-tab-misc a:before {
|
705 |
+
content: "\f107";
|
706 |
}
|
707 |
#bws_settings_tabs li.bws-tab-custom_code a:before {
|
708 |
+
font-family: 'bwsicons';
|
709 |
+
content: "\e93a";
|
710 |
}
|
711 |
#bws_settings_tabs li.bws-tab-license a:before {
|
712 |
+
content: "\f112";
|
713 |
}
|
714 |
/* custom tabs */
|
715 |
#bws_settings_tabs li.bws-tab-images a:before {
|
716 |
+
content: "\f128";
|
717 |
}
|
718 |
#bws_settings_tabs li.bws-tab-cover a:before {
|
719 |
+
content: "\f318";
|
720 |
}
|
721 |
#bws_settings_tabs li.bws-tab-lightbox a:before {
|
722 |
+
content: "\f211";
|
723 |
}
|
724 |
#bws_settings_tabs li.bws-tab-social a:before {
|
725 |
+
content: "\f237";
|
726 |
}
|
727 |
#bws_settings_tabs li.bws-tab-import-export a:before {
|
728 |
+
content: "\f317";
|
729 |
}
|
730 |
#bws_settings_tabs li.bws-tab-errors a:before,
|
731 |
#bws_settings_tabs li.bws-tab-messages a:before {
|
732 |
+
font-family: 'bwsicons';
|
733 |
+
content: "\e93d";
|
734 |
+
font-size: 18px;
|
735 |
+
left: 21px;
|
736 |
}
|
737 |
#bws_settings_tabs li.bws-tab-notifications a:before {
|
738 |
+
content: "\f466";
|
739 |
}
|
740 |
#bws_settings_tabs li.bws-tab-reports a:before {
|
741 |
+
content: "\f535";
|
742 |
}
|
743 |
#bws_settings_tabs li.bws-tab-output a:before {
|
744 |
+
content: "\f498";
|
745 |
}
|
746 |
|
747 |
#bws_settings_tabs li:last-child a {
|
748 |
+
border-bottom: none;
|
749 |
}
|
750 |
#bws_settings_tabs_wrapper .bws_tab {
|
751 |
+
position: relative;
|
752 |
+
padding: 5px 10px 15px;
|
753 |
+
width: calc( 100% - 183px );
|
754 |
+
float: right;
|
755 |
+
border: 1px solid #ddd;
|
756 |
+
background: #fff;
|
757 |
+
color: #444;
|
758 |
}
|
759 |
.bws_tab a {
|
760 |
+
color: #0073aa;
|
761 |
}
|
762 |
.bws_tab a:hover {
|
763 |
+
color: #00a0d2;
|
764 |
}
|
765 |
.bws_tab input, .bws_tab select, .bws_tab textarea, .bws_tab button {
|
766 |
+
font-family: inherit;
|
767 |
+
font-size: inherit;
|
768 |
}
|
769 |
#bws_settings_tabs_wrapper .bws_tab > *:not(.bws_pro_version_bloc):not(.bws_tab_sub_label):not(hr):not(.inline) {
|
770 |
+
margin-left: 10px;
|
771 |
+
margin-right: 10px;
|
772 |
+
width: calc( 100% - 20px );
|
773 |
+
}
|
774 |
+
.bws_tab h4 {
|
775 |
+
color: red;
|
776 |
}
|
777 |
#bws_settings_tabs_wrapper .bws_tab button,
|
778 |
#bws_settings_tabs_wrapper .bws_tab input[type="submit"],
|
779 |
#bws_settings_tabs_wrapper .bws_tab input[type="button"] {
|
780 |
+
white-space: normal;
|
781 |
+
height: auto;
|
782 |
+
}
|
783 |
+
.toplevel_page_rrrlgvwr #bws_settings_tabs_wrapper .bws_tab .form-table th.th-full {
|
784 |
+
overflow-wrap: break-word;
|
785 |
+
max-width: 200px;
|
786 |
}
|
787 |
.bws_form .postbox .hndle {
|
788 |
+
cursor: inherit;
|
789 |
}
|
790 |
#poststuff h3.bws_tab_label {
|
791 |
+
margin-bottom: 10px;
|
792 |
+
padding-left: 0;
|
793 |
+
padding-right: 0;
|
794 |
}
|
795 |
.bws_tab_sub_label {
|
796 |
+
font-weight: bold;
|
797 |
+
background-color: #f1f1f1;
|
798 |
+
padding: 7px 10px;
|
799 |
+
margin-top: 10px;
|
800 |
+
font-size: 15px;
|
801 |
}
|
802 |
.bws_tab .form-table textarea {
|
803 |
+
width: 100%;
|
804 |
}
|
805 |
#poststuff h3.bws_tab_label + hr {
|
806 |
+
margin-top: 18px;
|
807 |
}
|
808 |
.bws_tab_description + hr {
|
809 |
+
margin-top: 15px;
|
810 |
}
|
811 |
.rtl #bws_settings_tabs {
|
812 |
+
float: right;
|
813 |
+
border-right: 1px solid #ddd;
|
814 |
+
border-left: none;
|
815 |
}
|
816 |
.rtl #bws_settings_tabs li a {
|
817 |
+
padding: 20px 25px 20px 0;
|
818 |
}
|
819 |
.rtl #bws_settings_tabs li.ui-tabs-active a,
|
820 |
.rtl #bws_settings_tabs li a:hover {
|
821 |
+
padding: 20px 45px 20px 20px;
|
822 |
}
|
823 |
.rtl #bws_settings_tabs li a:before {
|
824 |
+
right: 20px;
|
825 |
}
|
826 |
.rtl .bws_form #postbox-container-2 > div {
|
827 |
+
margin-right: 160px;
|
828 |
+
margin-left: 0;
|
829 |
}
|
830 |
.bws_margined_box {
|
831 |
+
margin: 1em 0;
|
832 |
}
|
833 |
@media only screen and (max-width: 1100px) {
|
834 |
+
#bws_settings_tabs {
|
835 |
+
width: 59px;
|
836 |
+
}
|
837 |
+
#bws_settings_tabs li a {
|
838 |
+
margin: 0;
|
839 |
+
padding: 20px 0;
|
840 |
+
width: 60px;
|
841 |
+
height: 60px;
|
842 |
+
}
|
843 |
+
#bws_settings_tabs li.ui-tabs-active a,
|
844 |
+
#bws_settings_tabs li a:hover,
|
845 |
+
.rtl #bws_settings_tabs li.ui-tabs-active a,
|
846 |
+
.rtl #bws_settings_tabs li a:hover {
|
847 |
+
padding: 20px 0;
|
848 |
+
height: 61px;
|
849 |
+
}
|
850 |
+
#bws_settings_tabs li.ui-tabs-active,
|
851 |
+
#bws_settings_tabs li.ui-tabs-active a,
|
852 |
+
#bws_settings_tabs li a:hover {
|
853 |
+
width: 61px;
|
854 |
+
}
|
855 |
+
#bws_settings_tabs_wrapper .bws_tab {
|
856 |
+
width: calc( 100% - 83px );
|
857 |
+
}
|
858 |
+
#bws_settings_tabs span {
|
859 |
+
display: none;
|
860 |
+
}
|
861 |
+
.bws_form #postbox-container-2 > div {
|
862 |
+
margin-left: 60px;
|
863 |
+
width: calc( 100% - 62px );
|
864 |
+
}
|
865 |
+
.rtl .bws_form #postbox-container-2 > div {
|
866 |
+
margin-right: 60px;
|
867 |
+
margin-left: 0;
|
868 |
+
}
|
869 |
}
|
870 |
@media only screen and (max-width: 850px) {
|
871 |
+
.bws_form #postbox-container-2 > div,
|
872 |
+
.rtl .bws_form #postbox-container-2 > div {
|
873 |
+
width: calc( 100% - 2px );
|
874 |
+
margin: 0;
|
875 |
+
}
|
876 |
+
.bws_form #postbox-container-2 .postbox {
|
877 |
+
margin-bottom: 20px;
|
878 |
+
}
|
879 |
+
.bws_form .postbox-container div.submit {
|
880 |
+
display: none;
|
881 |
+
}
|
882 |
}
|
883 |
@media screen and (max-width: 782px) {
|
884 |
+
.bws-hide-for-mobile {
|
885 |
+
display: none;
|
886 |
+
}
|
887 |
}
|
888 |
@media screen and (max-width: 440px) {
|
889 |
+
#bws_settings_tabs_wrapper .bws_tab .form-table td input[type=file] {
|
890 |
+
width: 182px;
|
891 |
+
}
|
892 |
+
#bws_settings_tabs_wrapper .bws_tab .form-table td input[type=text]:not(.small-text),
|
893 |
+
#bws_settings_tabs_wrapper .bws_tab .form-table td input[type=password],
|
894 |
+
#bws_settings_tabs_wrapper .bws_tab .form-table td input[type=search],
|
895 |
+
#bws_settings_tabs_wrapper .bws_tab .form-table td input[type=number]:not(.small-text),
|
896 |
+
#bws_settings_tabs_wrapper .bws_tab .form-table td select,
|
897 |
+
#bws_settings_tabs_wrapper .bws_tab .form-table td textarea {
|
898 |
+
width: 100%;
|
899 |
+
padding-left: 0;
|
900 |
+
padding-right: 0;
|
901 |
+
}
|
902 |
+
}
|
bws_menu/css/jquery-ui-styles/1.9.2/jquery-ui.css
CHANGED
@@ -53,8 +53,8 @@
|
|
53 |
.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; }
|
54 |
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
55 |
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
56 |
-
.ui-button-icons-only { width: 3.4em; }
|
57 |
-
button.ui-button-icons-only { width: 3.7em; }
|
58 |
|
59 |
/*button text element */
|
60 |
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
@@ -92,7 +92,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|
92 |
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
93 |
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
94 |
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
95 |
-
.ui-datepicker select.ui-datepicker-month,
|
96 |
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
97 |
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
98 |
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
@@ -129,13 +129,13 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|
129 |
|
130 |
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
131 |
.ui-datepicker-cover {
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
}
|
140 |
.ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 300px; overflow: hidden; }
|
141 |
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
@@ -471,4 +471,4 @@ body .ui-tooltip { border-width: 2px; }
|
|
471 |
|
472 |
/* Overlays */
|
473 |
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); }
|
474 |
-
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
|
53 |
.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; }
|
54 |
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
55 |
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
56 |
+
.ui-button-icons-only { width: 3.4em; }
|
57 |
+
button.ui-button-icons-only { width: 3.7em; }
|
58 |
|
59 |
/*button text element */
|
60 |
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
92 |
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
93 |
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
94 |
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
95 |
+
.ui-datepicker select.ui-datepicker-month,
|
96 |
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
97 |
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
98 |
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
129 |
|
130 |
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
131 |
.ui-datepicker-cover {
|
132 |
+
position: absolute; /*must have*/
|
133 |
+
z-index: -1; /*must have*/
|
134 |
+
filter: mask(); /*must have*/
|
135 |
+
top: -4px; /*must have*/
|
136 |
+
left: -4px; /*must have*/
|
137 |
+
width: 200px; /*must have*/
|
138 |
+
height: 200px; /*must have*/
|
139 |
}
|
140 |
.ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 300px; overflow: hidden; }
|
141 |
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
471 |
|
472 |
/* Overlays */
|
473 |
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); }
|
474 |
+
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
|
bws_menu/css/modal.css
CHANGED
@@ -1,127 +1,127 @@
|
|
1 |
.bws-modal {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
}
|
11 |
.bws-modal.active {
|
12 |
-
|
13 |
}
|
14 |
.bws-modal.active:before {
|
15 |
-
|
16 |
}
|
17 |
.bws-modal .bws-modal-dialog {
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
}
|
27 |
.bws-modal.active .bws-modal-dialog {
|
28 |
-
|
29 |
}
|
30 |
.bws-modal .bws-modal-body,
|
31 |
.bws-modal .bws-modal-footer {
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
}
|
36 |
.bws-modal .bws-modal-body {
|
37 |
-
|
38 |
}
|
39 |
.bws-modal .bws-modal-body p {
|
40 |
-
|
41 |
}
|
42 |
.bws-modal .bws-modal-body h2 {
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
}
|
47 |
.bws-modal .bws-modal-footer {
|
48 |
-
|
49 |
}
|
50 |
.bws-modal .bws-modal-footer .bws-modal-skip-link {
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
}
|
56 |
.bws-modal .bws-modal-footer .button {
|
57 |
-
|
58 |
-
|
59 |
}
|
60 |
.rtl .bws-modal .bws-modal-footer .bws-modal-skip-link {
|
61 |
-
|
62 |
}
|
63 |
.rtl .bws-modal .bws-modal-footer .button {
|
64 |
-
|
65 |
}
|
66 |
.bws-modal .bws-modal-footer .button:first-child {
|
67 |
-
|
68 |
}
|
69 |
.bws-modal .bws-modal-panel>.notice.inline {
|
70 |
-
|
71 |
-
|
72 |
}
|
73 |
.bws-modal .bws-modal-panel:not(.active) {
|
74 |
-
|
75 |
}
|
76 |
body.has-bws-modal {
|
77 |
-
|
78 |
}
|
79 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-reason-input,
|
80 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-internal-message {
|
81 |
-
|
82 |
}
|
83 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-reason-input input,
|
84 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-reason-input textarea,
|
85 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-internal-message input,
|
86 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-internal-message textarea,
|
87 |
.bws-modal.bws-modal-request-feature textarea {
|
88 |
-
|
89 |
}
|
90 |
.bws-modal.bws-modal-deactivation-feedback li.bws-modal-reason.has-internal-message .bws-modal-internal-message {
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
}
|
95 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-anonymous-label {
|
96 |
-
|
97 |
}
|
98 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-panel {
|
99 |
-
|
100 |
}
|
101 |
|
102 |
@media (max-width: 650px) {
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
}
|
1 |
.bws-modal {
|
2 |
+
position: fixed;
|
3 |
+
overflow: auto;
|
4 |
+
height: 100%;
|
5 |
+
width: 100%;
|
6 |
+
top: 0;
|
7 |
+
z-index: 100000;
|
8 |
+
display: none;
|
9 |
+
background: rgba(0, 0, 0, 0.6);
|
10 |
}
|
11 |
.bws-modal.active {
|
12 |
+
display: block;
|
13 |
}
|
14 |
.bws-modal.active:before {
|
15 |
+
display: block;
|
16 |
}
|
17 |
.bws-modal .bws-modal-dialog {
|
18 |
+
background: transparent;
|
19 |
+
position: absolute;
|
20 |
+
left: 50%;
|
21 |
+
margin-left: -298px;
|
22 |
+
padding-bottom: 30px;
|
23 |
+
top: -100%;
|
24 |
+
z-index: 100001;
|
25 |
+
width: 596px;
|
26 |
}
|
27 |
.bws-modal.active .bws-modal-dialog {
|
28 |
+
top: 10%;
|
29 |
}
|
30 |
.bws-modal .bws-modal-body,
|
31 |
.bws-modal .bws-modal-footer {
|
32 |
+
border: 0;
|
33 |
+
background: #fff;
|
34 |
+
padding: 25px 25px 15px;
|
35 |
}
|
36 |
.bws-modal .bws-modal-body {
|
37 |
+
border-bottom: 0;
|
38 |
}
|
39 |
.bws-modal .bws-modal-body p {
|
40 |
+
font-size: 1.3em;
|
41 |
}
|
42 |
.bws-modal .bws-modal-body h2 {
|
43 |
+
font-size: 1.6em;
|
44 |
+
font-weight: bold;
|
45 |
+
margin-top: 0;
|
46 |
}
|
47 |
.bws-modal .bws-modal-footer {
|
48 |
+
border-top: #eeeeee solid 1px;
|
49 |
}
|
50 |
.bws-modal .bws-modal-footer .bws-modal-skip-link {
|
51 |
+
text-decoration: none;
|
52 |
+
float: right;
|
53 |
+
display: inline-block;
|
54 |
+
padding: 7px;
|
55 |
}
|
56 |
.bws-modal .bws-modal-footer .button {
|
57 |
+
margin: 0 7px;
|
58 |
+
float: left;
|
59 |
}
|
60 |
.rtl .bws-modal .bws-modal-footer .bws-modal-skip-link {
|
61 |
+
float: left;
|
62 |
}
|
63 |
.rtl .bws-modal .bws-modal-footer .button {
|
64 |
+
float: right;
|
65 |
}
|
66 |
.bws-modal .bws-modal-footer .button:first-child {
|
67 |
+
margin: 0;
|
68 |
}
|
69 |
.bws-modal .bws-modal-panel>.notice.inline {
|
70 |
+
margin: 0;
|
71 |
+
display: none;
|
72 |
}
|
73 |
.bws-modal .bws-modal-panel:not(.active) {
|
74 |
+
display: none;
|
75 |
}
|
76 |
body.has-bws-modal {
|
77 |
+
overflow: hidden;
|
78 |
}
|
79 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-reason-input,
|
80 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-internal-message {
|
81 |
+
margin: 3px 0 3px 22px;
|
82 |
}
|
83 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-reason-input input,
|
84 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-reason-input textarea,
|
85 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-internal-message input,
|
86 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-internal-message textarea,
|
87 |
.bws-modal.bws-modal-request-feature textarea {
|
88 |
+
width: 100%;
|
89 |
}
|
90 |
.bws-modal.bws-modal-deactivation-feedback li.bws-modal-reason.has-internal-message .bws-modal-internal-message {
|
91 |
+
border: 1px solid #ccc;
|
92 |
+
padding: 7px;
|
93 |
+
display: none;
|
94 |
}
|
95 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-anonymous-label {
|
96 |
+
padding-top: 15px;
|
97 |
}
|
98 |
.bws-modal.bws-modal-deactivation-feedback .bws-modal-panel {
|
99 |
+
margin-top: 0 !important;
|
100 |
}
|
101 |
|
102 |
@media (max-width: 650px) {
|
103 |
+
.bws-modal .bws-modal-dialog {
|
104 |
+
margin-left: -50%;
|
105 |
+
box-sizing: border-box;
|
106 |
+
padding-left: 10px;
|
107 |
+
padding-right: 10px;
|
108 |
+
width: 100%;
|
109 |
+
}
|
110 |
+
.bws-modal .bws-modal-dialog .bws-modal-panel>h3>strong {
|
111 |
+
font-size: 1.3em;
|
112 |
+
}
|
113 |
+
.bws-modal.bws-modal-deactivation-feedback li.bws-modal-reason li.bws-modal-reason {
|
114 |
+
margin-bottom: 10px;
|
115 |
+
}
|
116 |
+
.bws-modal.bws-modal-deactivation-feedback li.bws-modal-reason li.bws-modal-reason .bws-modal-reason-input,
|
117 |
+
.bws-modal.bws-modal-deactivation-feedback li.bws-modal-reason li.bws-modal-reason .bws-modal-internal-message {
|
118 |
+
margin-left: 29px;
|
119 |
+
}
|
120 |
+
.bws-modal.bws-modal-deactivation-feedback li.bws-modal-reason li.bws-modal-reason label {
|
121 |
+
display: table;
|
122 |
+
}
|
123 |
+
.bws-modal.bws-modal-deactivation-feedback li.bws-modal-reason li.bws-modal-reason label>span {
|
124 |
+
display: table-cell;
|
125 |
+
font-size: 1.3em;
|
126 |
+
}
|
127 |
+
}
|
bws_menu/css/style.css
CHANGED
@@ -1,487 +1,487 @@
|
|
1 |
a.toplevel_page_bws_panel.wp-has-current-submenu:after {
|
2 |
-
|
3 |
}
|
4 |
.toplevel_page_bws_panel #wpcontent,
|
5 |
.bws-panel_page_bws_themes #wpcontent,
|
6 |
.bws-panel_page_bws_system_status #wpcontent,
|
7 |
body[class*="-bws-panel"] #wpcontent {
|
8 |
-
|
9 |
-
|
10 |
}
|
11 |
.toplevel_page_bws_panel .update-nag,
|
12 |
.bws-panel_page_bws_themes .update-nag,
|
13 |
.bws-panel_page_bws_system_status .update-nag,
|
14 |
body[class*="-bws-panel"] .update-nag {
|
15 |
-
|
16 |
}
|
17 |
.bws-wrap-content {
|
18 |
-
|
19 |
}
|
20 |
.rtl .bws-wrap-content {
|
21 |
-
|
22 |
-
|
23 |
}
|
24 |
-
/*
|
25 |
* panel
|
26 |
*/
|
27 |
.bws-header {
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
}
|
32 |
-
.bws-title,
|
33 |
.bws-nav-tab-wrapper,
|
34 |
.bws-help-links-wrapper {
|
35 |
-
|
36 |
}
|
37 |
.bws-title {
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
}
|
44 |
.bws-title a {
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
}
|
49 |
.bws-logo.bwsicons {
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
}
|
55 |
.bws-title span {
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
}
|
60 |
.bws-nav-tab-wrapper {
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
}
|
65 |
.bws-help-links-wrapper a,
|
66 |
.bws-nav-tab-wrapper a {
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
}
|
73 |
.bws-help-links-wrapper a {
|
74 |
-
|
75 |
}
|
76 |
.bws-nav-tab-wrapper a.bws-nav-tab {
|
77 |
-
|
78 |
}
|
79 |
.bws-nav-tab-active {
|
80 |
-
|
81 |
-
|
82 |
}
|
83 |
.bws-help-links-wrapper a:hover,
|
84 |
.bws-nav-tab-wrapper a:hover {
|
85 |
-
|
86 |
-
|
87 |
}
|
88 |
.bws-help-links-wrapper {
|
89 |
-
|
90 |
-
|
91 |
}
|
92 |
.bws-menu-item-icon {
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
}
|
99 |
.bws-menu-item-icon.bws-active {
|
100 |
-
|
101 |
}
|
102 |
.rtl .bws-nav-tab-wrapper {
|
103 |
-
|
104 |
-
|
105 |
}
|
106 |
.rtl .bws-help-links-wrapper {
|
107 |
-
|
108 |
}
|
109 |
-
/*
|
110 |
* membership
|
111 |
*/
|
112 |
.bws-membership-wrap {
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
}
|
118 |
.bws-membership-backround {
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
}
|
126 |
.bws-membership {
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
}
|
132 |
-
.bws-membership-title {
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
}
|
138 |
.bws-membership-form {
|
139 |
-
|
140 |
}
|
141 |
.bws-membership-form * {
|
142 |
-
|
143 |
}
|
144 |
.bws_form_input_wrap {
|
145 |
-
|
146 |
}
|
147 |
.bws-membership input[type="text"] {
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
}
|
155 |
.bws-button {
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
}
|
168 |
.bws-membership-link {
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
}
|
174 |
.bws-membership-link a {
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
}
|
180 |
.bws-membership-link a:hover {
|
181 |
-
|
182 |
}
|
183 |
.bws_error {
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
}
|
188 |
.bws_error a {
|
189 |
-
|
190 |
-
|
191 |
}
|
192 |
.bws_input_error {
|
193 |
-
|
194 |
}
|
195 |
/*
|
196 |
* themes
|
197 |
*/
|
198 |
.bws-availablethemes {
|
199 |
-
|
200 |
}
|
201 |
.bws_browse_link {
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
}
|
213 |
.bws_browse_link .dashicons {
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
}
|
218 |
/*
|
219 |
* system status
|
220 |
*/
|
221 |
table.bws-system-info {
|
222 |
-
|
223 |
}
|
224 |
table.bws-system-info td:first-child {
|
225 |
-
|
226 |
}
|
227 |
table.bws-system-info tbody tr:nth-child(odd) {
|
228 |
-
|
229 |
}
|
230 |
/*
|
231 |
* PLUGINS
|
232 |
*/
|
233 |
.bws-products {
|
234 |
-
|
235 |
-
|
236 |
}
|
237 |
.bws-products .description {
|
238 |
-
|
239 |
}
|
240 |
.bws_product_box {
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
}
|
249 |
.bws_product_active {
|
250 |
-
|
251 |
}
|
252 |
.bws_product_content,
|
253 |
.bws_product_image {
|
254 |
-
|
255 |
}
|
256 |
.bws_product_image {
|
257 |
-
|
258 |
}
|
259 |
.bws_product_image a {
|
260 |
-
|
261 |
}
|
262 |
.bws_product_image img {
|
263 |
-
|
264 |
}
|
265 |
.bws_product_content {
|
266 |
-
|
267 |
-
|
268 |
}
|
269 |
.bws_product_title {
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
}
|
274 |
.bws_product_title a {
|
275 |
-
|
276 |
-
|
277 |
}
|
278 |
.bws_product_title a:hover {
|
279 |
-
|
280 |
}
|
281 |
.bws-version {
|
282 |
-
|
283 |
}
|
284 |
.bws-version span {
|
285 |
-
|
286 |
-
|
287 |
}
|
288 |
.bws-version span.bws-update-available {
|
289 |
-
|
290 |
}
|
291 |
.bws-update-now {
|
292 |
-
|
293 |
-
|
294 |
}
|
295 |
.bws_product_description {
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
}
|
301 |
.bws_product_links {
|
302 |
-
|
303 |
}
|
304 |
.bws_product_links span {
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
}
|
309 |
.bws_product_links form {
|
310 |
-
|
311 |
}
|
312 |
.bws_product_content a {
|
313 |
-
|
314 |
-
|
315 |
}
|
316 |
.bws_product_content a.bws_upgrade_button,
|
317 |
.bws_product_content a.bws_upgrade_button:hover {
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
}
|
323 |
a.bws_settings,
|
324 |
a.bws_donate {
|
325 |
-
|
326 |
}
|
327 |
.rtl .bws_product_box {
|
328 |
-
|
329 |
-
|
330 |
}
|
331 |
.rtl .bws-products,
|
332 |
.rtl .bws_product_content,
|
333 |
.rtl .bws_product_image {
|
334 |
-
|
335 |
}
|
336 |
.rtl a.bws_settings {
|
337 |
-
|
338 |
}
|
339 |
/* filter */
|
340 |
#bws-filter-wrapper {
|
341 |
-
|
342 |
}
|
343 |
.bws-filter {
|
344 |
-
|
345 |
}
|
346 |
.bws_fixed {
|
347 |
-
|
348 |
-
|
349 |
}
|
350 |
.bws-filter-top {
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
}
|
356 |
.bws-filter-top h2 {
|
357 |
-
|
358 |
}
|
359 |
.bws-toggle-indicator:before {
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
}
|
367 |
.bws-filter-top-inside {
|
368 |
-
|
369 |
-
|
370 |
}
|
371 |
-
.bws-filter-top.bws-opened .bws-toggle-indicator:before {
|
372 |
-
|
373 |
}
|
374 |
.bws-filter-top.bws-opened .bws-filter-top-inside {
|
375 |
-
|
376 |
}
|
377 |
.bws-filter-title {
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
}
|
382 |
.bws-category {
|
383 |
-
|
384 |
}
|
385 |
.bws-category li {
|
386 |
-
|
387 |
}
|
388 |
.bws-category a {
|
389 |
-
|
390 |
}
|
391 |
.bws-category a.bws-active {
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
}
|
398 |
.subsubsub span,
|
399 |
.bws-category span {
|
400 |
-
|
401 |
}
|
402 |
.bws-category a.bws-active span {
|
403 |
-
|
404 |
}
|
405 |
|
406 |
@media screen and (max-width: 1700px) {
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
}
|
411 |
@media screen and (max-width: 1425px) {
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
}
|
416 |
@media screen and (max-width: 1120px) {
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
}
|
429 |
@media screen and (max-width: 782px) {
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
}
|
479 |
@media screen and (max-width: 370px) {
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
}
|
1 |
a.toplevel_page_bws_panel.wp-has-current-submenu:after {
|
2 |
+
display: none;
|
3 |
}
|
4 |
.toplevel_page_bws_panel #wpcontent,
|
5 |
.bws-panel_page_bws_themes #wpcontent,
|
6 |
.bws-panel_page_bws_system_status #wpcontent,
|
7 |
body[class*="-bws-panel"] #wpcontent {
|
8 |
+
padding-left: 0;
|
9 |
+
padding-right: 0;
|
10 |
}
|
11 |
.toplevel_page_bws_panel .update-nag,
|
12 |
.bws-panel_page_bws_themes .update-nag,
|
13 |
.bws-panel_page_bws_system_status .update-nag,
|
14 |
body[class*="-bws-panel"] .update-nag {
|
15 |
+
display: none;
|
16 |
}
|
17 |
.bws-wrap-content {
|
18 |
+
padding-left: 20px;
|
19 |
}
|
20 |
.rtl .bws-wrap-content {
|
21 |
+
padding-left: 0;
|
22 |
+
padding-right: 20px;
|
23 |
}
|
24 |
+
/*
|
25 |
* panel
|
26 |
*/
|
27 |
.bws-header {
|
28 |
+
background: #0074a2;
|
29 |
+
color: #8bbed2;
|
30 |
+
padding: 0 17px;
|
31 |
}
|
32 |
+
.bws-title,
|
33 |
.bws-nav-tab-wrapper,
|
34 |
.bws-help-links-wrapper {
|
35 |
+
display: inline-block;
|
36 |
}
|
37 |
.bws-title {
|
38 |
+
text-transform: uppercase;
|
39 |
+
font-weight: 600;
|
40 |
+
font-size: 18px;
|
41 |
+
letter-spacing: 0.1em;
|
42 |
+
margin-top: 15px;
|
43 |
}
|
44 |
.bws-title a {
|
45 |
+
color: #fff;
|
46 |
+
text-decoration: none;
|
47 |
+
box-shadow: none;
|
48 |
}
|
49 |
.bws-logo.bwsicons {
|
50 |
+
font-size: 25px;
|
51 |
+
color: #fff;
|
52 |
+
margin: 0 3px;
|
53 |
+
vertical-align: middle;
|
54 |
}
|
55 |
.bws-title span {
|
56 |
+
color: #8bbed2;
|
57 |
+
font-size: 10px;
|
58 |
+
vertical-align: top;
|
59 |
}
|
60 |
.bws-nav-tab-wrapper {
|
61 |
+
height: 100%;
|
62 |
+
font-size: 15px;
|
63 |
+
margin-left: 28px;
|
64 |
}
|
65 |
.bws-help-links-wrapper a,
|
66 |
.bws-nav-tab-wrapper a {
|
67 |
+
color: #8bbed2;
|
68 |
+
text-decoration: none;
|
69 |
+
display: inline-block;
|
70 |
+
padding: 17px 20px 20px;
|
71 |
+
box-shadow: none;
|
72 |
}
|
73 |
.bws-help-links-wrapper a {
|
74 |
+
padding: 17px 12px 20px;
|
75 |
}
|
76 |
.bws-nav-tab-wrapper a.bws-nav-tab {
|
77 |
+
color: #fff;
|
78 |
}
|
79 |
.bws-nav-tab-active {
|
80 |
+
background: #005d82;
|
81 |
+
color: #fff;
|
82 |
}
|
83 |
.bws-help-links-wrapper a:hover,
|
84 |
.bws-nav-tab-wrapper a:hover {
|
85 |
+
color: #8bbed2;
|
86 |
+
background: #006894;
|
87 |
}
|
88 |
.bws-help-links-wrapper {
|
89 |
+
float: right;
|
90 |
+
font-size: 14px;
|
91 |
}
|
92 |
.bws-menu-item-icon {
|
93 |
+
display: none;
|
94 |
+
float: right;
|
95 |
+
font-size: 26px;
|
96 |
+
padding: 17px 11px;
|
97 |
+
color: #fff;
|
98 |
}
|
99 |
.bws-menu-item-icon.bws-active {
|
100 |
+
color: #8bbed2;
|
101 |
}
|
102 |
.rtl .bws-nav-tab-wrapper {
|
103 |
+
margin-left: 0;
|
104 |
+
margin-right: 28px;
|
105 |
}
|
106 |
.rtl .bws-help-links-wrapper {
|
107 |
+
float: left;
|
108 |
}
|
109 |
+
/*
|
110 |
* membership
|
111 |
*/
|
112 |
.bws-membership-wrap {
|
113 |
+
background: url("../images/membership-background.jpg") no-repeat center #fff;
|
114 |
+
overflow: hidden;
|
115 |
+
position: relative;
|
116 |
+
margin: 20px 20px 0 20px;
|
117 |
}
|
118 |
.bws-membership-backround {
|
119 |
+
background-color: #000;
|
120 |
+
opacity: 0.8;
|
121 |
+
position: absolute;
|
122 |
+
height: 100%;
|
123 |
+
width: 100%;
|
124 |
+
z-index: 5;
|
125 |
}
|
126 |
.bws-membership {
|
127 |
+
color: #fff;
|
128 |
+
padding: 23px 22px 23px 20px;
|
129 |
+
z-index: 6;
|
130 |
+
position: relative;
|
131 |
}
|
132 |
+
.bws-membership-title {
|
133 |
+
font-size: 18px;
|
134 |
+
line-height: 30px;
|
135 |
+
font-weight: 600;
|
136 |
+
float: left;
|
137 |
}
|
138 |
.bws-membership-form {
|
139 |
+
float: right;
|
140 |
}
|
141 |
.bws-membership-form * {
|
142 |
+
vertical-align: top;
|
143 |
}
|
144 |
.bws_form_input_wrap {
|
145 |
+
display: inline-block;
|
146 |
}
|
147 |
.bws-membership input[type="text"] {
|
148 |
+
border-radius: 3px;
|
149 |
+
border: none;
|
150 |
+
font-size: 13px;
|
151 |
+
padding: 8px 19px 8px 9px;
|
152 |
+
text-align: left;
|
153 |
+
line-height: 1;
|
154 |
}
|
155 |
.bws-button {
|
156 |
+
background: #dd6930;
|
157 |
+
color: #fff;
|
158 |
+
text-align: center;
|
159 |
+
display: inline-block;
|
160 |
+
text-decoration: none;
|
161 |
+
font-size: 13px;
|
162 |
+
padding: 8px 9px;
|
163 |
+
border-radius: 3px;
|
164 |
+
border: none;
|
165 |
+
cursor: pointer;
|
166 |
+
margin: 0 6px;
|
167 |
}
|
168 |
.bws-membership-link {
|
169 |
+
font-size: 15px;
|
170 |
+
color: #999;
|
171 |
+
padding: 0 8px;
|
172 |
+
line-height: 27px;
|
173 |
}
|
174 |
.bws-membership-link a {
|
175 |
+
color: #fff;
|
176 |
+
text-decoration: none;
|
177 |
+
border-bottom: 1px solid #999;
|
178 |
+
padding: 0 3px;
|
179 |
}
|
180 |
.bws-membership-link a:hover {
|
181 |
+
border-bottom: none;
|
182 |
}
|
183 |
.bws_error {
|
184 |
+
color: #c5412b;
|
185 |
+
margin-top: 1px;
|
186 |
+
max-width: 230px;
|
187 |
}
|
188 |
.bws_error a {
|
189 |
+
color: #fff;
|
190 |
+
text-decoration: none;
|
191 |
}
|
192 |
.bws_input_error {
|
193 |
+
border: 1px solid #c5412b !important;
|
194 |
}
|
195 |
/*
|
196 |
* themes
|
197 |
*/
|
198 |
.bws-availablethemes {
|
199 |
+
margin-top: 10px;
|
200 |
}
|
201 |
.bws_browse_link {
|
202 |
+
color: #666;
|
203 |
+
font-size: 18px;
|
204 |
+
text-decoration: none;
|
205 |
+
background-color: #ddd;
|
206 |
+
display: block;
|
207 |
+
width: 100%;
|
208 |
+
text-align: center;
|
209 |
+
padding: 8px 0;
|
210 |
+
font-weight: bold;
|
211 |
+
border-radius: 5px;
|
212 |
}
|
213 |
.bws_browse_link .dashicons {
|
214 |
+
line-height: inherit;
|
215 |
+
vertical-align: text-top;
|
216 |
+
font-size: 17px;
|
217 |
}
|
218 |
/*
|
219 |
* system status
|
220 |
*/
|
221 |
table.bws-system-info {
|
222 |
+
margin-bottom: 15px;
|
223 |
}
|
224 |
table.bws-system-info td:first-child {
|
225 |
+
width: 33%;
|
226 |
}
|
227 |
table.bws-system-info tbody tr:nth-child(odd) {
|
228 |
+
background-color: #f9f9f9;
|
229 |
}
|
230 |
/*
|
231 |
* PLUGINS
|
232 |
*/
|
233 |
.bws-products {
|
234 |
+
float: left;
|
235 |
+
width: 1350px;
|
236 |
}
|
237 |
.bws-products .description {
|
238 |
+
margin-top: 20px;
|
239 |
}
|
240 |
.bws_product_box {
|
241 |
+
background: #f2f2f2;
|
242 |
+
border: 1px solid #CACACA;
|
243 |
+
float: left;
|
244 |
+
margin: 10px 10px 0 0;
|
245 |
+
width: 320px;
|
246 |
+
border-radius: 3px;
|
247 |
+
min-height: 180px;
|
248 |
}
|
249 |
.bws_product_active {
|
250 |
+
background: #fff;
|
251 |
}
|
252 |
.bws_product_content,
|
253 |
.bws_product_image {
|
254 |
+
float: left;
|
255 |
}
|
256 |
.bws_product_image {
|
257 |
+
padding: 20px;
|
258 |
}
|
259 |
.bws_product_image a {
|
260 |
+
box-shadow: none;
|
261 |
}
|
262 |
.bws_product_image img {
|
263 |
+
height: 64px;
|
264 |
}
|
265 |
.bws_product_content {
|
266 |
+
max-width: 200px;
|
267 |
+
padding: 15px 0 7px;
|
268 |
}
|
269 |
.bws_product_title {
|
270 |
+
font-size: 15px;
|
271 |
+
line-height: initial;
|
272 |
+
font-weight: bolder;
|
273 |
}
|
274 |
.bws_product_title a {
|
275 |
+
color: #444;
|
276 |
+
font-weight: 600;
|
277 |
}
|
278 |
.bws_product_title a:hover {
|
279 |
+
color: #00a0d2;
|
280 |
}
|
281 |
.bws-version {
|
282 |
+
margin-top: 6px;
|
283 |
}
|
284 |
.bws-version span {
|
285 |
+
color: #999;
|
286 |
+
font-size: 13px;
|
287 |
}
|
288 |
.bws-version span.bws-update-available {
|
289 |
+
color: #dd6930;
|
290 |
}
|
291 |
.bws-update-now {
|
292 |
+
background: #eee;
|
293 |
+
padding: 2px 5px;
|
294 |
}
|
295 |
.bws_product_description {
|
296 |
+
font-size: 13px;
|
297 |
+
line-height: 18px;
|
298 |
+
margin: 6px 0 2px;
|
299 |
+
color: #666;
|
300 |
}
|
301 |
.bws_product_links {
|
302 |
+
margin: 15px 0;
|
303 |
}
|
304 |
.bws_product_links span {
|
305 |
+
color: #999;
|
306 |
+
vertical-align: sub;
|
307 |
+
margin-right: 10px;
|
308 |
}
|
309 |
.bws_product_links form {
|
310 |
+
display: inline-block;
|
311 |
}
|
312 |
.bws_product_content a {
|
313 |
+
text-decoration: none;
|
314 |
+
margin-right: 10px;
|
315 |
}
|
316 |
.bws_product_content a.bws_upgrade_button,
|
317 |
.bws_product_content a.bws_upgrade_button:hover {
|
318 |
+
background: #dd6930;
|
319 |
+
border: 1px solid #c16436;
|
320 |
+
color: #fff;
|
321 |
+
margin-right: 12px;
|
322 |
}
|
323 |
a.bws_settings,
|
324 |
a.bws_donate {
|
325 |
+
vertical-align: sub;
|
326 |
}
|
327 |
.rtl .bws_product_box {
|
328 |
+
float: right;
|
329 |
+
margin: 12px 0 10px 10px;
|
330 |
}
|
331 |
.rtl .bws-products,
|
332 |
.rtl .bws_product_content,
|
333 |
.rtl .bws_product_image {
|
334 |
+
float: right;
|
335 |
}
|
336 |
.rtl a.bws_settings {
|
337 |
+
margin-right: 10px;
|
338 |
}
|
339 |
/* filter */
|
340 |
#bws-filter-wrapper {
|
341 |
+
display: table;
|
342 |
}
|
343 |
.bws-filter {
|
344 |
+
width: 200px;
|
345 |
}
|
346 |
.bws_fixed {
|
347 |
+
position: fixed;
|
348 |
+
top: 40px;
|
349 |
}
|
350 |
.bws-filter-top {
|
351 |
+
display: none;
|
352 |
+
background: #e2e2e2;
|
353 |
+
padding: 1px 20px;
|
354 |
+
margin: 0 -12px 0 -20px;
|
355 |
}
|
356 |
.bws-filter-top h2 {
|
357 |
+
margin: 14px 0;
|
358 |
}
|
359 |
.bws-toggle-indicator:before {
|
360 |
+
content: "\f140";
|
361 |
+
display: inline-block;
|
362 |
+
font: 400 20px/1 dashicons;
|
363 |
+
width: 20px;
|
364 |
+
vertical-align: bottom;
|
365 |
+
margin-left: -5px;
|
366 |
}
|
367 |
.bws-filter-top-inside {
|
368 |
+
display: none;
|
369 |
+
margin: 25px 0;
|
370 |
}
|
371 |
+
.bws-filter-top.bws-opened .bws-toggle-indicator:before {
|
372 |
+
content: "\f142";
|
373 |
}
|
374 |
.bws-filter-top.bws-opened .bws-filter-top-inside {
|
375 |
+
display: block;
|
376 |
}
|
377 |
.bws-filter-title {
|
378 |
+
font-size: 14px;
|
379 |
+
color: #999;
|
380 |
+
margin-top: 10px;
|
381 |
}
|
382 |
.bws-category {
|
383 |
+
margin-top: 15px;
|
384 |
}
|
385 |
.bws-category li {
|
386 |
+
margin-bottom: 10px;
|
387 |
}
|
388 |
.bws-category a {
|
389 |
+
text-decoration: none;
|
390 |
}
|
391 |
.bws-category a.bws-active {
|
392 |
+
background: #0074a2;
|
393 |
+
color: #fff;
|
394 |
+
padding: 2px 5px;
|
395 |
+
display: inline-block;
|
396 |
+
border-radius: 3px;
|
397 |
}
|
398 |
.subsubsub span,
|
399 |
.bws-category span {
|
400 |
+
color: #999;
|
401 |
}
|
402 |
.bws-category a.bws-active span {
|
403 |
+
color: #8bbed2;
|
404 |
}
|
405 |
|
406 |
@media screen and (max-width: 1700px) {
|
407 |
+
.bws-products {
|
408 |
+
width: 1020px;
|
409 |
+
}
|
410 |
}
|
411 |
@media screen and (max-width: 1425px) {
|
412 |
+
.bws-products {
|
413 |
+
width: 700px;
|
414 |
+
}
|
415 |
}
|
416 |
@media screen and (max-width: 1120px) {
|
417 |
+
.bws-products {
|
418 |
+
width: 370px;
|
419 |
+
}
|
420 |
+
.bws-membership-title,
|
421 |
+
.bws-membership-form {
|
422 |
+
float: none;
|
423 |
+
text-align: center;
|
424 |
+
}
|
425 |
+
.bws-membership-title {
|
426 |
+
margin-bottom: 10px;
|
427 |
+
}
|
428 |
}
|
429 |
@media screen and (max-width: 782px) {
|
430 |
+
.bws-header {
|
431 |
+
padding: 0 0 4px;
|
432 |
+
}
|
433 |
+
.bws-title {
|
434 |
+
margin-left: 11px;
|
435 |
+
}
|
436 |
+
.bws-menu-item-icon {
|
437 |
+
display: block;
|
438 |
+
}
|
439 |
+
.bws-nav-tab-wrapper,
|
440 |
+
.bws-help-links-wrapper {
|
441 |
+
margin: 0;
|
442 |
+
width: 100%;
|
443 |
+
float: none;
|
444 |
+
display: none;
|
445 |
+
}
|
446 |
+
.bws-nav-tab-wrapper a,
|
447 |
+
.bws-help-links-wrapper a {
|
448 |
+
width: 100%;
|
449 |
+
padding: 17px 20px 20px;
|
450 |
+
}
|
451 |
+
.bws-membership * {
|
452 |
+
text-align: center;
|
453 |
+
}
|
454 |
+
.bws-membership-title,
|
455 |
+
.bws-membership-link {
|
456 |
+
margin-bottom: 10px;
|
457 |
+
display: block;
|
458 |
+
}
|
459 |
+
.bws-membership .bws-button,
|
460 |
+
.bws_form_input_wrap,
|
461 |
+
.bws-membership input[type="text"] {
|
462 |
+
width: 100%;
|
463 |
+
margin: 0;
|
464 |
+
}
|
465 |
+
.bws-membership .bws-button {
|
466 |
+
margin-top: 8px;
|
467 |
+
}
|
468 |
+
.bws-filter {
|
469 |
+
display: none;
|
470 |
+
}
|
471 |
+
.bws-filter-top {
|
472 |
+
display: block;
|
473 |
+
}
|
474 |
+
.bws-products {
|
475 |
+
float: none;
|
476 |
+
width: 100%;
|
477 |
+
}
|
478 |
}
|
479 |
@media screen and (max-width: 370px) {
|
480 |
+
.bws_product_box {
|
481 |
+
width: auto;
|
482 |
+
}
|
483 |
+
.bws_product_content {
|
484 |
+
max-width: 160px;
|
485 |
+
padding-right: 10px;
|
486 |
+
}
|
487 |
+
}
|
bws_menu/deactivation-form.php
CHANGED
@@ -1,11 +1,13 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Displays the content of the dialog box when the user clicks on the "Deactivate" link on the plugin settings page
|
|
|
4 |
* @package BestWebSoft
|
5 |
* @since 2.1.3
|
6 |
*/
|
7 |
-
if ( ! defined( 'ABSPATH' ) )
|
8 |
exit;
|
|
|
9 |
|
10 |
/**
|
11 |
* Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins
|
@@ -16,8 +18,9 @@ if ( ! defined( 'ABSPATH' ) )
|
|
16 |
if ( ! function_exists( 'bws_add_deactivation_feedback_dialog_box' ) ) {
|
17 |
function bws_add_deactivation_feedback_dialog_box() {
|
18 |
global $bstwbsftwppdtplgns_active_plugins;
|
19 |
-
if ( empty( $bstwbsftwppdtplgns_active_plugins ) )
|
20 |
-
return;
|
|
|
21 |
|
22 |
$contact_support_template = __( 'Need help? We are ready to answer your questions.', 'bestwebsoft' ) . ' <a href="https://support.bestwebsoft.com/hc/en-us/requests/new" target="_blank">' . __( 'Contact Support', 'bestwebsoft' ) . '</a>';
|
23 |
|
@@ -26,65 +29,65 @@ if ( ! function_exists( 'bws_add_deactivation_feedback_dialog_box' ) ) {
|
|
26 |
'id' => 'NOT_WORKING',
|
27 |
'text' => __( 'The plugin is not working', 'bestwebsoft' ),
|
28 |
'input_type' => 'textarea',
|
29 |
-
'input_placeholder' =>
|
30 |
),
|
31 |
array(
|
32 |
'id' => 'DIDNT_WORK_AS_EXPECTED',
|
33 |
'text' => __( "The plugin didn't work as expected", 'bestwebsoft' ),
|
34 |
'input_type' => 'textarea',
|
35 |
-
'input_placeholder' =>
|
36 |
),
|
37 |
array(
|
38 |
'id' => 'SUDDENLY_STOPPED_WORKING',
|
39 |
'text' => __( 'The plugin suddenly stopped working', 'bestwebsoft' ),
|
40 |
'input_type' => '',
|
41 |
'input_placeholder' => '',
|
42 |
-
'internal_message' => $contact_support_template
|
43 |
),
|
44 |
array(
|
45 |
'id' => 'BROKE_MY_SITE',
|
46 |
'text' => __( 'The plugin broke my site', 'bestwebsoft' ),
|
47 |
'input_type' => '',
|
48 |
'input_placeholder' => '',
|
49 |
-
'internal_message' => $contact_support_template
|
50 |
),
|
51 |
array(
|
52 |
'id' => 'COULDNT_MAKE_IT_WORK',
|
53 |
'text' => __( "I couldn't understand how to get it work", 'bestwebsoft' ),
|
54 |
'input_type' => '',
|
55 |
'input_placeholder' => '',
|
56 |
-
'internal_message' => $contact_support_template
|
57 |
),
|
58 |
array(
|
59 |
'id' => 'FOUND_A_BETTER_PLUGIN',
|
60 |
'text' => __( 'I found a better plugin', 'bestwebsoft' ),
|
61 |
'input_type' => 'textfield',
|
62 |
-
'input_placeholder' =>
|
63 |
),
|
64 |
array(
|
65 |
'id' => 'GREAT_BUT_NEED_SPECIFIC_FEATURE',
|
66 |
'text' => __( "The plugin is great, but I need specific feature that you don't support", 'bestwebsoft' ),
|
67 |
'input_type' => 'textarea',
|
68 |
-
'input_placeholder' =>
|
69 |
),
|
70 |
array(
|
71 |
'id' => 'NO_LONGER_NEEDED',
|
72 |
'text' => __( 'I no longer need the plugin', 'bestwebsoft' ),
|
73 |
'input_type' => '',
|
74 |
-
'input_placeholder' => ''
|
75 |
),
|
76 |
array(
|
77 |
'id' => 'TEMPORARY_DEACTIVATION',
|
78 |
'text' => __( "It's a temporary deactivation, I'm just debugging an issue", 'bestwebsoft' ),
|
79 |
'input_type' => '',
|
80 |
-
'input_placeholder' => ''
|
81 |
),
|
82 |
array(
|
83 |
'id' => 'OTHER',
|
84 |
'text' => __( 'Other', 'bestwebsoft' ),
|
85 |
'input_type' => 'textfield',
|
86 |
-
'input_placeholder' => ''
|
87 |
-
)
|
88 |
);
|
89 |
|
90 |
$modal_html = '<div class="bws-modal bws-modal-deactivation-feedback">
|
@@ -92,13 +95,13 @@ if ( ! function_exists( 'bws_add_deactivation_feedback_dialog_box' ) ) {
|
|
92 |
<div class="bws-modal-body">
|
93 |
<h2>' . __( 'Quick Feedback', 'bestwebsoft' ) . '</h2>
|
94 |
<div class="bws-modal-panel active">
|
95 |
-
<p>' . __( 'If you have a moment, please let us know why you are deactivating', 'bestwebsoft' ) .
|
96 |
|
97 |
foreach ( $reasons as $reason ) {
|
98 |
$list_item_classes = 'bws-modal-reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' );
|
99 |
|
100 |
if ( ! empty( $reason['internal_message'] ) ) {
|
101 |
-
$list_item_classes
|
102 |
$reason_internal_message = $reason['internal_message'];
|
103 |
} else {
|
104 |
$reason_internal_message = '';
|
@@ -134,11 +137,11 @@ if ( ! function_exists( 'bws_add_deactivation_feedback_dialog_box' ) ) {
|
|
134 |
|
135 |
foreach ( $bstwbsftwppdtplgns_active_plugins as $basename => $plugin_data ) {
|
136 |
|
137 |
-
$slug
|
138 |
$plugin_id = sanitize_title( $plugin_data['Name'] );
|
139 |
|
140 |
$script .= "(function($) {
|
141 |
-
var modalHtml = " . json_encode( $modal_html ) . ",
|
142 |
\$modal = $( modalHtml ),
|
143 |
\$deactivateLink = $( '#the-list .active[data-plugin=\"" . $basename . "\"] .deactivate a' ),
|
144 |
\$anonymousFeedback = \$modal.find( '.bws-modal-anonymous-label' ),
|
@@ -269,7 +272,7 @@ if ( ! function_exists( 'bws_add_deactivation_feedback_dialog_box' ) ) {
|
|
269 |
_parent.find( 'input, textarea' ).attr( 'placeholder', _parent.data( 'input-placeholder' ) ).focus();
|
270 |
|
271 |
if ( BwsModalIsReasonSelected( 'OTHER' ) ) {
|
272 |
-
\$modal.find( '.message' ).text( '" .
|
273 |
}
|
274 |
}
|
275 |
});
|
@@ -338,7 +341,7 @@ if ( ! function_exists( 'bws_add_deactivation_feedback_dialog_box' ) ) {
|
|
338 |
/* add script in FOOTER */
|
339 |
wp_register_script( 'bws-deactivation-feedback-dialog-boxes', '', array( 'jquery' ), false, true );
|
340 |
wp_enqueue_script( 'bws-deactivation-feedback-dialog-boxes' );
|
341 |
-
wp_add_inline_script( 'bws-deactivation-feedback-dialog-boxes', $script );
|
342 |
}
|
343 |
}
|
344 |
|
@@ -351,71 +354,79 @@ if ( ! function_exists( 'bws_submit_uninstall_reason_action' ) ) {
|
|
351 |
function bws_submit_uninstall_reason_action() {
|
352 |
global $bstwbsftwppdtplgns_options, $wp_version, $bstwbsftwppdtplgns_active_plugins, $current_user;
|
353 |
|
354 |
-
|
355 |
-
|
356 |
-
$reason_id = isset( $_REQUEST['reason_id'] ) ? stripcslashes( sanitize_text_field( $_REQUEST['reason_id'] ) ) : '';
|
357 |
-
$basename = isset( $_REQUEST['plugin'] ) ? stripcslashes( sanitize_text_field( $_REQUEST['plugin'] ) ) : '';
|
358 |
-
|
359 |
-
if ( empty( $reason_id ) || empty( $basename ) ) {
|
360 |
-
exit;
|
361 |
-
}
|
362 |
|
363 |
-
|
364 |
-
if ( ! empty( $reason_info ) ) {
|
365 |
-
$reason_info = substr( $reason_info, 0, 255 );
|
366 |
-
}
|
367 |
-
$is_anonymous = isset( $_REQUEST['is_anonymous'] ) && 1 == $_REQUEST['is_anonymous'];
|
368 |
|
369 |
-
|
370 |
-
'
|
371 |
-
'reason_id' => $reason_id,
|
372 |
-
'reason_info' => $reason_info,
|
373 |
-
);
|
374 |
|
375 |
-
|
376 |
-
|
377 |
-
$bstwbsftwppdtplgns_options = ( is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
378 |
-
|
379 |
-
if ( ! empty( $bstwbsftwppdtplgns_options['track_usage']['usage_id'] ) ) {
|
380 |
-
$options['usage_id'] = $bstwbsftwppdtplgns_options['track_usage']['usage_id'];
|
381 |
-
} else {
|
382 |
-
$options['usage_id'] = false;
|
383 |
-
$options['url'] = get_bloginfo( 'url' );
|
384 |
-
$options['wp_version'] = $wp_version;
|
385 |
-
$options['is_active'] = false;
|
386 |
-
$options['version'] = $bstwbsftwppdtplgns_active_plugins[ $basename ]['Version'];
|
387 |
}
|
388 |
|
389 |
-
$
|
390 |
-
|
|
|
|
|
|
|
391 |
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
) );
|
398 |
|
399 |
-
if ( ! is_wp_error( $raw_response ) && 200 == wp_remote_retrieve_response_code( $raw_response ) ) {
|
400 |
if ( ! $is_anonymous ) {
|
401 |
-
|
|
|
|
|
402 |
|
403 |
-
if (
|
404 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
}
|
411 |
-
}
|
412 |
|
413 |
-
|
414 |
-
|
415 |
-
|
|
|
416 |
}
|
417 |
exit;
|
418 |
}
|
419 |
}
|
420 |
|
421 |
-
add_action( 'wp_ajax_bws_submit_uninstall_reason_action', 'bws_submit_uninstall_reason_action' );
|
1 |
<?php
|
2 |
/**
|
3 |
* Displays the content of the dialog box when the user clicks on the "Deactivate" link on the plugin settings page
|
4 |
+
*
|
5 |
* @package BestWebSoft
|
6 |
* @since 2.1.3
|
7 |
*/
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
+
}
|
11 |
|
12 |
/**
|
13 |
* Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins
|
18 |
if ( ! function_exists( 'bws_add_deactivation_feedback_dialog_box' ) ) {
|
19 |
function bws_add_deactivation_feedback_dialog_box() {
|
20 |
global $bstwbsftwppdtplgns_active_plugins;
|
21 |
+
if ( empty( $bstwbsftwppdtplgns_active_plugins ) ) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
|
25 |
$contact_support_template = __( 'Need help? We are ready to answer your questions.', 'bestwebsoft' ) . ' <a href="https://support.bestwebsoft.com/hc/en-us/requests/new" target="_blank">' . __( 'Contact Support', 'bestwebsoft' ) . '</a>';
|
26 |
|
29 |
'id' => 'NOT_WORKING',
|
30 |
'text' => __( 'The plugin is not working', 'bestwebsoft' ),
|
31 |
'input_type' => 'textarea',
|
32 |
+
'input_placeholder' => __( "Kindly share what didn't work so we can fix it in future updates...", 'bestwebsoft' ),
|
33 |
),
|
34 |
array(
|
35 |
'id' => 'DIDNT_WORK_AS_EXPECTED',
|
36 |
'text' => __( "The plugin didn't work as expected", 'bestwebsoft' ),
|
37 |
'input_type' => 'textarea',
|
38 |
+
'input_placeholder' => __( 'What did you expect?', 'bestwebsoft' ),
|
39 |
),
|
40 |
array(
|
41 |
'id' => 'SUDDENLY_STOPPED_WORKING',
|
42 |
'text' => __( 'The plugin suddenly stopped working', 'bestwebsoft' ),
|
43 |
'input_type' => '',
|
44 |
'input_placeholder' => '',
|
45 |
+
'internal_message' => $contact_support_template,
|
46 |
),
|
47 |
array(
|
48 |
'id' => 'BROKE_MY_SITE',
|
49 |
'text' => __( 'The plugin broke my site', 'bestwebsoft' ),
|
50 |
'input_type' => '',
|
51 |
'input_placeholder' => '',
|
52 |
+
'internal_message' => $contact_support_template,
|
53 |
),
|
54 |
array(
|
55 |
'id' => 'COULDNT_MAKE_IT_WORK',
|
56 |
'text' => __( "I couldn't understand how to get it work", 'bestwebsoft' ),
|
57 |
'input_type' => '',
|
58 |
'input_placeholder' => '',
|
59 |
+
'internal_message' => $contact_support_template,
|
60 |
),
|
61 |
array(
|
62 |
'id' => 'FOUND_A_BETTER_PLUGIN',
|
63 |
'text' => __( 'I found a better plugin', 'bestwebsoft' ),
|
64 |
'input_type' => 'textfield',
|
65 |
+
'input_placeholder' => __( "What's the plugin name?", 'bestwebsoft' ),
|
66 |
),
|
67 |
array(
|
68 |
'id' => 'GREAT_BUT_NEED_SPECIFIC_FEATURE',
|
69 |
'text' => __( "The plugin is great, but I need specific feature that you don't support", 'bestwebsoft' ),
|
70 |
'input_type' => 'textarea',
|
71 |
+
'input_placeholder' => __( 'What feature?', 'bestwebsoft' ),
|
72 |
),
|
73 |
array(
|
74 |
'id' => 'NO_LONGER_NEEDED',
|
75 |
'text' => __( 'I no longer need the plugin', 'bestwebsoft' ),
|
76 |
'input_type' => '',
|
77 |
+
'input_placeholder' => '',
|
78 |
),
|
79 |
array(
|
80 |
'id' => 'TEMPORARY_DEACTIVATION',
|
81 |
'text' => __( "It's a temporary deactivation, I'm just debugging an issue", 'bestwebsoft' ),
|
82 |
'input_type' => '',
|
83 |
+
'input_placeholder' => '',
|
84 |
),
|
85 |
array(
|
86 |
'id' => 'OTHER',
|
87 |
'text' => __( 'Other', 'bestwebsoft' ),
|
88 |
'input_type' => 'textfield',
|
89 |
+
'input_placeholder' => '',
|
90 |
+
),
|
91 |
);
|
92 |
|
93 |
$modal_html = '<div class="bws-modal bws-modal-deactivation-feedback">
|
95 |
<div class="bws-modal-body">
|
96 |
<h2>' . __( 'Quick Feedback', 'bestwebsoft' ) . '</h2>
|
97 |
<div class="bws-modal-panel active">
|
98 |
+
<p>' . __( 'If you have a moment, please let us know why you are deactivating', 'bestwebsoft' ) . ':</p><ul>';
|
99 |
|
100 |
foreach ( $reasons as $reason ) {
|
101 |
$list_item_classes = 'bws-modal-reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' );
|
102 |
|
103 |
if ( ! empty( $reason['internal_message'] ) ) {
|
104 |
+
$list_item_classes .= ' has-internal-message';
|
105 |
$reason_internal_message = $reason['internal_message'];
|
106 |
} else {
|
107 |
$reason_internal_message = '';
|
137 |
|
138 |
foreach ( $bstwbsftwppdtplgns_active_plugins as $basename => $plugin_data ) {
|
139 |
|
140 |
+
$slug = dirname( $basename );
|
141 |
$plugin_id = sanitize_title( $plugin_data['Name'] );
|
142 |
|
143 |
$script .= "(function($) {
|
144 |
+
var modalHtml = " . json_encode( esc_html( $modal_html ) ) . ",
|
145 |
\$modal = $( modalHtml ),
|
146 |
\$deactivateLink = $( '#the-list .active[data-plugin=\"" . $basename . "\"] .deactivate a' ),
|
147 |
\$anonymousFeedback = \$modal.find( '.bws-modal-anonymous-label' ),
|
272 |
_parent.find( 'input, textarea' ).attr( 'placeholder', _parent.data( 'input-placeholder' ) ).focus();
|
273 |
|
274 |
if ( BwsModalIsReasonSelected( 'OTHER' ) ) {
|
275 |
+
\$modal.find( '.message' ).text( '" . esc_html__( 'Please tell us the reason so we can improve it.', 'bestwebsoft' ) . "' ).show();
|
276 |
}
|
277 |
}
|
278 |
});
|
341 |
/* add script in FOOTER */
|
342 |
wp_register_script( 'bws-deactivation-feedback-dialog-boxes', '', array( 'jquery' ), false, true );
|
343 |
wp_enqueue_script( 'bws-deactivation-feedback-dialog-boxes' );
|
344 |
+
wp_add_inline_script( 'bws-deactivation-feedback-dialog-boxes', $script );
|
345 |
}
|
346 |
}
|
347 |
|
354 |
function bws_submit_uninstall_reason_action() {
|
355 |
global $bstwbsftwppdtplgns_options, $wp_version, $bstwbsftwppdtplgns_active_plugins, $current_user;
|
356 |
|
357 |
+
if ( isset( $_REQUEST['bws_ajax_nonce'] ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
|
359 |
+
wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['bws_ajax_nonce'] ) ), 'bws_ajax_nonce' );
|
|
|
|
|
|
|
|
|
360 |
|
361 |
+
$reason_id = isset( $_REQUEST['reason_id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['reason_id'] ) ) : '';
|
362 |
+
$basename = isset( $_REQUEST['plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['plugin'] ) ) : '';
|
|
|
|
|
|
|
363 |
|
364 |
+
if ( empty( $reason_id ) || empty( $basename ) ) {
|
365 |
+
exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
}
|
367 |
|
368 |
+
$reason_info = isset( $_REQUEST['reason_info'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['reason_info'] ) ) : '';
|
369 |
+
if ( ! empty( $reason_info ) ) {
|
370 |
+
$reason_info = substr( $reason_info, 0, 255 );
|
371 |
+
}
|
372 |
+
$is_anonymous = isset( $_REQUEST['is_anonymous'] ) && 1 === intval( $_REQUEST['is_anonymous'] );
|
373 |
|
374 |
+
$options = array(
|
375 |
+
'product' => $basename,
|
376 |
+
'reason_id' => $reason_id,
|
377 |
+
'reason_info' => $reason_info,
|
378 |
+
);
|
|
|
379 |
|
|
|
380 |
if ( ! $is_anonymous ) {
|
381 |
+
if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
|
382 |
+
$bstwbsftwppdtplgns_options = ( is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
383 |
+
}
|
384 |
|
385 |
+
if ( ! empty( $bstwbsftwppdtplgns_options['track_usage']['usage_id'] ) ) {
|
386 |
+
$options['usage_id'] = $bstwbsftwppdtplgns_options['track_usage']['usage_id'];
|
387 |
+
} else {
|
388 |
+
$options['usage_id'] = false;
|
389 |
+
$options['url'] = get_bloginfo( 'url' );
|
390 |
+
$options['wp_version'] = $wp_version;
|
391 |
+
$options['is_active'] = false;
|
392 |
+
$options['version'] = $bstwbsftwppdtplgns_active_plugins[ $basename ]['Version'];
|
393 |
+
}
|
394 |
|
395 |
+
$options['email'] = $current_user->data->user_email;
|
396 |
+
}
|
397 |
+
|
398 |
+
/* send data */
|
399 |
+
$raw_response = wp_remote_post(
|
400 |
+
'https://bestwebsoft.com/wp-content/plugins/products-statistics/deactivation-feedback/',
|
401 |
+
array(
|
402 |
+
'method' => 'POST',
|
403 |
+
'body' => $options,
|
404 |
+
'timeout' => 15,
|
405 |
+
)
|
406 |
+
);
|
407 |
+
|
408 |
+
if ( ! is_wp_error( $raw_response ) && 200 === intval( wp_remote_retrieve_response_code( $raw_response ) ) ) {
|
409 |
+
if ( ! $is_anonymous ) {
|
410 |
+
$response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
|
411 |
+
|
412 |
+
if ( is_array( $response ) && ! empty( $response['usage_id'] ) && $response['usage_id'] !== $options['usage_id'] ) {
|
413 |
+
$bstwbsftwppdtplgns_options['track_usage']['usage_id'] = $response['usage_id'];
|
414 |
+
|
415 |
+
if ( is_multisite() ) {
|
416 |
+
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
417 |
+
} else {
|
418 |
+
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
419 |
+
}
|
420 |
+
}
|
421 |
}
|
|
|
422 |
|
423 |
+
echo 'done';
|
424 |
+
} else {
|
425 |
+
echo wp_kses_data( $response->get_error_code() ) . ': ' . wp_kses_data( $response->get_error_message() );
|
426 |
+
}
|
427 |
}
|
428 |
exit;
|
429 |
}
|
430 |
}
|
431 |
|
432 |
+
add_action( 'wp_ajax_bws_submit_uninstall_reason_action', 'bws_submit_uninstall_reason_action' );
|
bws_menu/deprecated.php
CHANGED
@@ -1,21 +1,22 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
* Deprecated functions for BestWebSoft plugins
|
4 |
-
*/
|
5 |
|
6 |
/**
|
7 |
-
* Function add BWS Plugins page
|
8 |
-
*
|
9 |
-
* @
|
10 |
-
|
11 |
-
|
|
|
12 |
function bws_general_menu() {
|
13 |
global $menu, $bws_general_menu_exist;
|
14 |
|
15 |
if ( ! $bws_general_menu_exist ) {
|
16 |
/* we check also menu exist in global array as in old plugins $bws_general_menu_exist variable not exist */
|
17 |
foreach ( $menu as $value_menu ) {
|
18 |
-
if ( 'bws_panel'
|
19 |
$bws_general_menu_exist = true;
|
20 |
return;
|
21 |
}
|
@@ -23,9 +24,9 @@ if ( ! function_exists ( 'bws_general_menu' ) ) {
|
|
23 |
|
24 |
add_menu_page( 'BWS Panel', 'BWS Panel', 'manage_options', 'bws_panel', 'bws_add_menu_render', 'none', '1001' );
|
25 |
|
26 |
-
add_submenu_page( 'bws_panel',
|
27 |
-
add_submenu_page( 'bws_panel',
|
28 |
-
add_submenu_page( 'bws_panel',
|
29 |
|
30 |
$bws_general_menu_exist = true;
|
31 |
}
|
@@ -33,235 +34,271 @@ if ( ! function_exists ( 'bws_general_menu' ) ) {
|
|
33 |
}
|
34 |
|
35 |
/**
|
36 |
-
* Function process submit on the `Go Pro` tab
|
37 |
-
*
|
38 |
-
* @
|
39 |
-
|
|
|
40 |
if ( ! function_exists( 'bws_go_pro_tab_check' ) ) {
|
41 |
function bws_go_pro_tab_check( $plugin_basename, $plugin_options_name = false, $is_network_option = false ) {
|
42 |
global $bstwbsftwppdtplgns_options;
|
43 |
-
if ( ! isset( $bstwbsftwppdtplgns_options ) )
|
44 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
|
|
45 |
if ( ! isset( $bstwbsftwppdtplgns_options['deprecated_function']['bws_go_pro_tab_check'] ) ) {
|
46 |
$get_debug_backtrace = debug_backtrace();
|
47 |
-
$file
|
48 |
$bstwbsftwppdtplgns_options['deprecated_function']['bws_go_pro_tab_check'] = array(
|
49 |
-
'file' => $file
|
50 |
);
|
51 |
-
if ( is_multisite() )
|
52 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
53 |
-
else
|
54 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
|
|
55 |
}
|
56 |
}
|
57 |
}
|
58 |
|
59 |
/**
|
60 |
-
* Function display 'Custom code' tab
|
61 |
-
*
|
62 |
-
* @deprecated 1.9.8 (15.12.2016)
|
63 |
-
* @todo Remove function after 01.01.2021
|
64 |
-
*/
|
65 |
if ( ! function_exists( 'bws_custom_code_tab' ) ) {
|
66 |
function bws_custom_code_tab() {
|
67 |
global $bstwbsftwppdtplgns_options;
|
68 |
-
if ( ! isset( $bstwbsftwppdtplgns_options ) )
|
69 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
|
|
70 |
if ( ! isset( $bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] ) ) {
|
71 |
$get_debug_backtrace = debug_backtrace();
|
72 |
-
$file
|
73 |
$bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] = array(
|
74 |
-
'file' => $file
|
75 |
);
|
76 |
-
if ( is_multisite() )
|
77 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
78 |
-
else
|
79 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
|
|
80 |
}
|
81 |
}
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
-
* Function check license key for Pro plugins version
|
86 |
-
*
|
87 |
-
* @
|
88 |
-
|
|
|
89 |
if ( ! function_exists( 'bws_check_pro_license' ) ) {
|
90 |
function bws_check_pro_license( $plugin_basename, $trial_plugin = false ) {
|
91 |
global $bstwbsftwppdtplgns_options;
|
92 |
-
if ( ! isset( $bstwbsftwppdtplgns_options ) )
|
93 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
|
|
94 |
if ( ! isset( $bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] ) ) {
|
95 |
$get_debug_backtrace = debug_backtrace();
|
96 |
-
$file
|
97 |
$bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] = array(
|
98 |
-
'file' => $file
|
99 |
);
|
100 |
-
if ( is_multisite() )
|
101 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
102 |
-
else
|
103 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
|
|
104 |
}
|
105 |
}
|
106 |
}
|
107 |
|
108 |
/**
|
109 |
-
* Function display block for checking license key for Pro plugins version
|
110 |
-
*
|
111 |
-
* @
|
112 |
-
|
113 |
-
|
|
|
114 |
function bws_check_pro_license_form( $plugin_basename ) {
|
115 |
global $bstwbsftwppdtplgns_options;
|
116 |
$license_key = ( isset( $bstwbsftwppdtplgns_options[ $plugin_basename ] ) ) ? $bstwbsftwppdtplgns_options[ $plugin_basename ] : ''; ?>
|
117 |
<div class="clear"></div>
|
118 |
<form method="post" action="">
|
119 |
-
<p><?php echo
|
120 |
<p>
|
121 |
<input type="text" maxlength="100" name="bws_license_key" value="<?php echo esc_attr( $license_key ); ?>" />
|
122 |
<input type="hidden" name="bws_license_submit" value="submit" />
|
123 |
-
<input type="submit" class="button" value="<?php
|
124 |
<?php wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?>
|
125 |
</p>
|
126 |
</form>
|
127 |
-
|
|
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
-
* Function process submit on the `Go Pro` tab for TRIAL
|
132 |
-
*
|
133 |
-
* @
|
134 |
-
|
|
|
135 |
if ( ! function_exists( 'bws_go_pro_from_trial_tab' ) ) {
|
136 |
function bws_go_pro_from_trial_tab( $plugin_info, $plugin_basename, $page, $link_slug, $link_key, $link_pn, $trial_license_is_set = true ) {
|
137 |
global $wp_version, $bstwbsftwppdtplgns_options;
|
138 |
-
$bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? sanitize_text_field( $_POST['bws_license_key'] ) :
|
139 |
-
if ( $trial_license_is_set ) {
|
|
|
140 |
<form method="post" action="">
|
141 |
<p>
|
142 |
-
<?php printf(
|
143 |
<br />
|
144 |
<span class="bws_info">
|
145 |
-
<?php
|
146 |
<a href="https://bestwebsoft.com/wp-login.php">Client Area</a>
|
147 |
-
<?php
|
148 |
</span>
|
149 |
</p>
|
150 |
-
<?php
|
|
|
151 |
'5' < $bstwbsftwppdtplgns_options['go_pro'][ $plugin_basename ]['count'] &&
|
152 |
-
$bstwbsftwppdtplgns_options['go_pro'][ $plugin_basename ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) {
|
|
|
153 |
<p>
|
154 |
<input disabled="disabled" type="text" name="bws_license_key" value="" />
|
155 |
-
<input disabled="disabled" type="submit" class="button-primary" value="<?php
|
156 |
</p>
|
157 |
-
<p><?php
|
158 |
<?php } else { ?>
|
159 |
<p>
|
160 |
<input type="text" maxlength="100" name="bws_license_key" value="" />
|
161 |
<input type="hidden" name="bws_license_plugin" value="<?php echo esc_attr( $plugin_basename ); ?>" />
|
162 |
<input type="hidden" name="bws_license_submit" value="submit" />
|
163 |
-
<input type="submit" class="button-primary" value="<?php
|
164 |
<?php wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?>
|
165 |
</p>
|
166 |
<?php } ?>
|
167 |
</form>
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
171 |
<p>
|
172 |
-
<?php
|
173 |
</p>
|
174 |
-
|
|
|
175 |
}
|
176 |
}
|
177 |
|
178 |
|
179 |
/**
|
180 |
-
* Function display block for restoring default product settings
|
181 |
-
*
|
182 |
-
* @
|
183 |
-
|
184 |
-
|
185 |
-
|
|
|
|
|
186 |
<form method="post" action="">
|
187 |
-
<p><?php
|
188 |
<p>
|
189 |
-
<input <?php echo $change_permission_attr; ?> type="submit" class="button" value="<?php
|
190 |
</p>
|
191 |
<input type="hidden" name="bws_restore_default" value="submit" />
|
192 |
<?php wp_nonce_field( $plugin_basename, 'bws_settings_nonce_name' ); ?>
|
193 |
</form>
|
194 |
-
|
|
|
195 |
}
|
196 |
|
197 |
/**
|
198 |
-
* Function display GO PRO tab
|
199 |
-
*
|
200 |
-
* @
|
201 |
-
|
|
|
202 |
if ( ! function_exists( 'bws_go_pro_tab_show' ) ) {
|
203 |
function bws_go_pro_tab_show( $bws_hide_premium_options_check, $plugin_info, $plugin_basename, $page, $pro_page, $bws_license_plugin, $link_slug, $link_key, $link_pn, $pro_plugin_is_activated = false, $trial_days_number = false ) {
|
204 |
global $wp_version, $bstwbsftwppdtplgns_options;
|
205 |
-
$bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? sanitize_text_field( $_POST['bws_license_key'] ) :
|
206 |
-
if ( $pro_plugin_is_activated ) {
|
207 |
-
$page_url = esc_url( self_admin_url( 'admin.php?page=' . $pro_page ) );
|
208 |
-
|
|
|
209 |
<p>
|
210 |
-
<?php
|
211 |
</p>
|
212 |
-
|
213 |
-
|
|
|
|
|
214 |
<form method="post" action="">
|
215 |
<p>
|
216 |
<input type="hidden" name="bws_hide_premium_options_submit" value="submit" />
|
217 |
-
<input type="submit" class="button" value="<?php
|
218 |
<?php wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?>
|
219 |
</p>
|
220 |
</form>
|
221 |
<?php } ?>
|
222 |
<form method="post" action="">
|
223 |
<p>
|
224 |
-
<?php
|
225 |
-
<a href="<?php echo esc_url( 'https://bestwebsoft.com/products/wordpress/plugins/' . $link_slug . '/?k=' . $link_key . '&pn=' . $link_pn . '&v=' . $plugin_info[
|
226 |
-
<?php
|
227 |
<span class="bws_info">
|
228 |
-
<?php
|
229 |
<a href="https://bestwebsoft.com/wp-login.php">Client Area</a>
|
230 |
-
<?php
|
231 |
</span>
|
232 |
</p>
|
233 |
-
<?php
|
234 |
-
|
|
|
|
|
235 |
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) &&
|
236 |
'5' < $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] &&
|
237 |
-
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) {
|
|
|
238 |
<p>
|
239 |
<input disabled="disabled" type="text" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" />
|
240 |
-
<input disabled="disabled" type="submit" class="button-primary" value="<?php
|
241 |
-
<?php
|
|
|
|
|
|
|
|
|
242 |
</p>
|
243 |
-
<p><?php
|
244 |
<?php } else { ?>
|
245 |
<p>
|
246 |
<input type="text" maxlength="100" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" />
|
247 |
<input type="hidden" name="bws_license_plugin" value="<?php echo esc_attr( $bws_license_plugin ); ?>" />
|
248 |
<input type="hidden" name="bws_license_submit" value="submit" />
|
249 |
-
<input type="submit" class="button-primary" value="<?php
|
250 |
-
<?php
|
251 |
-
|
252 |
-
|
|
|
|
|
|
|
253 |
</p>
|
254 |
<?php } ?>
|
255 |
</form>
|
256 |
-
|
|
|
257 |
}
|
258 |
}
|
259 |
|
260 |
/**
|
261 |
-
* Function display GO PRO Banner (inline in 'admin_notices' action )
|
262 |
-
*
|
263 |
-
* @
|
264 |
-
|
|
|
265 |
if ( ! function_exists( 'bws_plugin_banner' ) ) {
|
266 |
function bws_plugin_banner( $plugin_info, $this_banner_prefix, $link_slug, $link_key, $link_pn, $banner_url_or_slug ) {
|
267 |
/* the function is not longer use, but we need to store it */
|
@@ -269,12 +306,13 @@ if ( ! function_exists( 'bws_plugin_banner' ) ) {
|
|
269 |
}
|
270 |
|
271 |
/**
|
272 |
-
* Function display timeout PRO Banner (inline in 'admin_notices' action )
|
273 |
-
*
|
274 |
-
* @
|
275 |
-
|
276 |
-
|
|
|
277 |
function bws_plugin_banner_timeout( $plugin_key, $plugin_prefix, $plugin_name, $banner_url_or_slug = false ) {
|
278 |
/* the function is not longer use, but we need to store it */
|
279 |
}
|
280 |
-
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Deprecated functions for BestWebSoft plugins
|
4 |
+
*/
|
5 |
|
6 |
/**
|
7 |
+
* Function add BWS Plugins page
|
8 |
+
*
|
9 |
+
* @deprecated 1.9.8 (15.12.2016)
|
10 |
+
* @return void
|
11 |
+
*/
|
12 |
+
if ( ! function_exists( 'bws_general_menu' ) ) {
|
13 |
function bws_general_menu() {
|
14 |
global $menu, $bws_general_menu_exist;
|
15 |
|
16 |
if ( ! $bws_general_menu_exist ) {
|
17 |
/* we check also menu exist in global array as in old plugins $bws_general_menu_exist variable not exist */
|
18 |
foreach ( $menu as $value_menu ) {
|
19 |
+
if ( 'bws_panel' === $value_menu[2] ) {
|
20 |
$bws_general_menu_exist = true;
|
21 |
return;
|
22 |
}
|
24 |
|
25 |
add_menu_page( 'BWS Panel', 'BWS Panel', 'manage_options', 'bws_panel', 'bws_add_menu_render', 'none', '1001' );
|
26 |
|
27 |
+
add_submenu_page( 'bws_panel', esc_html__( 'Plugins', 'bestwebsoft' ), esc_html__( 'Plugins', 'bestwebsoft' ), 'manage_options', 'bws_panel', 'bws_add_menu_render' );
|
28 |
+
add_submenu_page( 'bws_panel', esc_html__( 'Themes', 'bestwebsoft' ), esc_html__( 'Themes', 'bestwebsoft' ), 'manage_options', 'bws_themes', 'bws_add_menu_render' );
|
29 |
+
add_submenu_page( 'bws_panel', esc_html__( 'System Status', 'bestwebsoft' ), esc_html__( 'System Status', 'bestwebsoft' ), 'manage_options', 'bws_system_status', 'bws_add_menu_render' );
|
30 |
|
31 |
$bws_general_menu_exist = true;
|
32 |
}
|
34 |
}
|
35 |
|
36 |
/**
|
37 |
+
* Function process submit on the `Go Pro` tab
|
38 |
+
*
|
39 |
+
* @deprecated 1.9.8 (15.12.2016)
|
40 |
+
* @todo Remove function after 01.01.2021
|
41 |
+
*/
|
42 |
if ( ! function_exists( 'bws_go_pro_tab_check' ) ) {
|
43 |
function bws_go_pro_tab_check( $plugin_basename, $plugin_options_name = false, $is_network_option = false ) {
|
44 |
global $bstwbsftwppdtplgns_options;
|
45 |
+
if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
|
46 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
47 |
+
}
|
48 |
if ( ! isset( $bstwbsftwppdtplgns_options['deprecated_function']['bws_go_pro_tab_check'] ) ) {
|
49 |
$get_debug_backtrace = debug_backtrace();
|
50 |
+
$file = ( ! empty( $get_debug_backtrace[0]['file'] ) ) ? $get_debug_backtrace[0]['file'] : '';
|
51 |
$bstwbsftwppdtplgns_options['deprecated_function']['bws_go_pro_tab_check'] = array(
|
52 |
+
'file' => $file,
|
53 |
);
|
54 |
+
if ( is_multisite() ) {
|
55 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
56 |
+
} else {
|
57 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
58 |
+
}
|
59 |
}
|
60 |
}
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
+
* Function display 'Custom code' tab
|
65 |
+
*
|
66 |
+
* @deprecated 1.9.8 (15.12.2016)
|
67 |
+
* @todo Remove function after 01.01.2021
|
68 |
+
*/
|
69 |
if ( ! function_exists( 'bws_custom_code_tab' ) ) {
|
70 |
function bws_custom_code_tab() {
|
71 |
global $bstwbsftwppdtplgns_options;
|
72 |
+
if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
|
73 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
74 |
+
}
|
75 |
if ( ! isset( $bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] ) ) {
|
76 |
$get_debug_backtrace = debug_backtrace();
|
77 |
+
$file = ( ! empty( $get_debug_backtrace[0]['file'] ) ) ? $get_debug_backtrace[0]['file'] : '';
|
78 |
$bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] = array(
|
79 |
+
'file' => $file,
|
80 |
);
|
81 |
+
if ( is_multisite() ) {
|
82 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
83 |
+
} else {
|
84 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
85 |
+
}
|
86 |
}
|
87 |
}
|
88 |
}
|
89 |
|
90 |
/**
|
91 |
+
* Function check license key for Pro plugins version
|
92 |
+
*
|
93 |
+
* @deprecated 1.9.8 (15.12.2016)
|
94 |
+
* @todo Remove function after 01.01.2021
|
95 |
+
*/
|
96 |
if ( ! function_exists( 'bws_check_pro_license' ) ) {
|
97 |
function bws_check_pro_license( $plugin_basename, $trial_plugin = false ) {
|
98 |
global $bstwbsftwppdtplgns_options;
|
99 |
+
if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
|
100 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' );
|
101 |
+
}
|
102 |
if ( ! isset( $bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] ) ) {
|
103 |
$get_debug_backtrace = debug_backtrace();
|
104 |
+
$file = ( ! empty( $get_debug_backtrace[0]['file'] ) ) ? $get_debug_backtrace[0]['file'] : '';
|
105 |
$bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] = array(
|
106 |
+
'file' => $file,
|
107 |
);
|
108 |
+
if ( is_multisite() ) {
|
109 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
110 |
+
} else {
|
111 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
|
112 |
+
}
|
113 |
}
|
114 |
}
|
115 |
}
|
116 |
|
117 |
/**
|
118 |
+
* Function display block for checking license key for Pro plugins version
|
119 |
+
*
|
120 |
+
* @deprecated 1.9.8 (15.12.2016)
|
121 |
+
* @todo add notice and remove functional after 01.01.2018. Remove function after 01.01.2019
|
122 |
+
*/
|
123 |
+
if ( ! function_exists( 'bws_check_pro_license_form' ) ) {
|
124 |
function bws_check_pro_license_form( $plugin_basename ) {
|
125 |
global $bstwbsftwppdtplgns_options;
|
126 |
$license_key = ( isset( $bstwbsftwppdtplgns_options[ $plugin_basename ] ) ) ? $bstwbsftwppdtplgns_options[ $plugin_basename ] : ''; ?>
|
127 |
<div class="clear"></div>
|
128 |
<form method="post" action="">
|
129 |
+
<p><?php echo esc_html_e( 'If necessary, you can check if the license key is correct or reenter it in the field below. You can find your license key on your personal page - Client Area - on our website', 'bestwebsoft' ) . ' <a href="https://bestwebsoft.com/client-area">https://bestwebsoft.com/client-area</a> ' . esc_html__( '(your username is the email address specified during the purchase). If necessary, please submit "Lost your password?" request.', 'bestwebsoft' ); ?></p>
|
130 |
<p>
|
131 |
<input type="text" maxlength="100" name="bws_license_key" value="<?php echo esc_attr( $license_key ); ?>" />
|
132 |
<input type="hidden" name="bws_license_submit" value="submit" />
|
133 |
+
<input type="submit" class="button" value="<?php esc_html_e( 'Check license key', 'bestwebsoft' ); ?>" />
|
134 |
<?php wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?>
|
135 |
</p>
|
136 |
</form>
|
137 |
+
<?php
|
138 |
+
}
|
139 |
}
|
140 |
|
141 |
/**
|
142 |
+
* Function process submit on the `Go Pro` tab for TRIAL
|
143 |
+
*
|
144 |
+
* @deprecated 1.9.8 (15.12.2016)
|
145 |
+
* @todo add notice and remove functional after 01.01.2018. Remove function after 01.01.2019
|
146 |
+
*/
|
147 |
if ( ! function_exists( 'bws_go_pro_from_trial_tab' ) ) {
|
148 |
function bws_go_pro_from_trial_tab( $plugin_info, $plugin_basename, $page, $link_slug, $link_key, $link_pn, $trial_license_is_set = true ) {
|
149 |
global $wp_version, $bstwbsftwppdtplgns_options;
|
150 |
+
$bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? sanitize_text_field( wp_unslash( $_POST['bws_license_key'] ) ) : '';
|
151 |
+
if ( $trial_license_is_set ) {
|
152 |
+
?>
|
153 |
<form method="post" action="">
|
154 |
<p>
|
155 |
+
<?php printf( esc_html__( 'In order to continue using the plugin it is necessary to buy a %s license.', 'bestwebsoft' ), esc_html( '<a href="https://bestwebsoft.com/products/wordpress/plugins/' . $link_slug . '/?k=' . $link_key . '&pn=' . $link_pn . '&v=' . $plugin_info['Version'] . '&wp_v=' . $wp_version . '" target="_blank" title="' . $plugin_info['Name'] . '">Pro</a>' ) ); ?> <?php esc_html_e( 'After that, you can activate it by entering your license key.', 'bestwebsoft' ); ?>
|
156 |
<br />
|
157 |
<span class="bws_info">
|
158 |
+
<?php esc_html_e( 'License key can be found in the', 'bestwebsoft' ); ?>
|
159 |
<a href="https://bestwebsoft.com/wp-login.php">Client Area</a>
|
160 |
+
<?php esc_html_e( '(your username is the email address specified during the purchase).', 'bestwebsoft' ); ?>
|
161 |
</span>
|
162 |
</p>
|
163 |
+
<?php
|
164 |
+
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $plugin_basename ]['count'] ) &&
|
165 |
'5' < $bstwbsftwppdtplgns_options['go_pro'][ $plugin_basename ]['count'] &&
|
166 |
+
$bstwbsftwppdtplgns_options['go_pro'][ $plugin_basename ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) {
|
167 |
+
?>
|
168 |
<p>
|
169 |
<input disabled="disabled" type="text" name="bws_license_key" value="" />
|
170 |
+
<input disabled="disabled" type="submit" class="button-primary" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" />
|
171 |
</p>
|
172 |
+
<p><?php esc_html_e( 'Unfortunately, you have exceeded the number of available tries per day.', 'bestwebsoft' ); ?></p>
|
173 |
<?php } else { ?>
|
174 |
<p>
|
175 |
<input type="text" maxlength="100" name="bws_license_key" value="" />
|
176 |
<input type="hidden" name="bws_license_plugin" value="<?php echo esc_attr( $plugin_basename ); ?>" />
|
177 |
<input type="hidden" name="bws_license_submit" value="submit" />
|
178 |
+
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" />
|
179 |
<?php wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?>
|
180 |
</p>
|
181 |
<?php } ?>
|
182 |
</form>
|
183 |
+
<?php
|
184 |
+
} else {
|
185 |
+
$page_url = esc_url( self_admin_url( 'admin.php?page=' . $page ) );
|
186 |
+
?>
|
187 |
+
<p><?php esc_html_e( 'Congratulations! The Pro license of the plugin is activated successfully.', 'bestwebsoft' ); ?></p>
|
188 |
<p>
|
189 |
+
<?php esc_html_e( 'Please, go to', 'bestwebsoft' ); ?> <a href="<?php echo esc_url( $page_url ); ?>"><?php esc_html_e( 'the setting page', 'bestwebsoft' ); ?></a>
|
190 |
</p>
|
191 |
+
<?php
|
192 |
+
}
|
193 |
}
|
194 |
}
|
195 |
|
196 |
|
197 |
/**
|
198 |
+
* Function display block for restoring default product settings
|
199 |
+
*
|
200 |
+
* @deprecated 1.9.8 (15.12.2016)
|
201 |
+
* @todo add notice and remove functional after 01.01.2018. Remove function after 01.01.2019
|
202 |
+
*/
|
203 |
+
if ( ! function_exists( 'bws_form_restore_default_settings' ) ) {
|
204 |
+
function bws_form_restore_default_settings( $plugin_basename, $change_permission_attr = '' ) {
|
205 |
+
?>
|
206 |
<form method="post" action="">
|
207 |
+
<p><?php esc_html_e( 'Restore all plugin settings to defaults', 'bestwebsoft' ); ?></p>
|
208 |
<p>
|
209 |
+
<input <?php echo esc_html( $change_permission_attr ); ?> type="submit" class="button" value="<?php esc_html_e( 'Restore settings', 'bestwebsoft' ); ?>" />
|
210 |
</p>
|
211 |
<input type="hidden" name="bws_restore_default" value="submit" />
|
212 |
<?php wp_nonce_field( $plugin_basename, 'bws_settings_nonce_name' ); ?>
|
213 |
</form>
|
214 |
+
<?php
|
215 |
+
}
|
216 |
}
|
217 |
|
218 |
/**
|
219 |
+
* Function display GO PRO tab
|
220 |
+
*
|
221 |
+
* @deprecated 1.9.8 (15.12.2016)
|
222 |
+
* @todo add notice and remove functional after 01.01.2018. Remove function after 01.01.2019
|
223 |
+
*/
|
224 |
if ( ! function_exists( 'bws_go_pro_tab_show' ) ) {
|
225 |
function bws_go_pro_tab_show( $bws_hide_premium_options_check, $plugin_info, $plugin_basename, $page, $pro_page, $bws_license_plugin, $link_slug, $link_key, $link_pn, $pro_plugin_is_activated = false, $trial_days_number = false ) {
|
226 |
global $wp_version, $bstwbsftwppdtplgns_options;
|
227 |
+
$bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? sanitize_text_field( wp_unslash( $_POST['bws_license_key'] ) ) : '';
|
228 |
+
if ( $pro_plugin_is_activated ) {
|
229 |
+
$page_url = esc_url( self_admin_url( 'admin.php?page=' . $pro_page ) );
|
230 |
+
?>
|
231 |
+
<p><?php esc_html_e( 'Congratulations! Pro version of the plugin is installed and activated successfully.', 'bestwebsoft' ); ?></p>
|
232 |
<p>
|
233 |
+
<?php esc_html_e( 'Please, go to', 'bestwebsoft' ); ?> <a href="<?php echo esc_url( $page_url ); ?>"><?php esc_html_e( 'the setting page', 'bestwebsoft' ); ?></a>
|
234 |
</p>
|
235 |
+
<?php
|
236 |
+
} else {
|
237 |
+
if ( $bws_hide_premium_options_check ) {
|
238 |
+
?>
|
239 |
<form method="post" action="">
|
240 |
<p>
|
241 |
<input type="hidden" name="bws_hide_premium_options_submit" value="submit" />
|
242 |
+
<input type="submit" class="button" value="<?php esc_html_e( 'Show Pro features', 'bestwebsoft' ); ?>" />
|
243 |
<?php wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?>
|
244 |
</p>
|
245 |
</form>
|
246 |
<?php } ?>
|
247 |
<form method="post" action="">
|
248 |
<p>
|
249 |
+
<?php esc_html_e( 'Enter your license key to install and activate', 'bestwebsoft' ); ?>
|
250 |
+
<a href="<?php echo esc_url( 'https://bestwebsoft.com/products/wordpress/plugins/' . $link_slug . '/?k=' . $link_key . '&pn=' . $link_pn . '&v=' . $plugin_info['Version'] . '&wp_v=' . $wp_version ); ?>" target="_blank" title="<?php echo esc_html( $plugin_info['Name'] ); ?> Pro">Pro</a>
|
251 |
+
<?php esc_html_e( 'version of the plugin.', 'bestwebsoft' ); ?><br />
|
252 |
<span class="bws_info">
|
253 |
+
<?php esc_html_e( 'License key can be found in the', 'bestwebsoft' ); ?>
|
254 |
<a href="https://bestwebsoft.com/wp-login.php">Client Area</a>
|
255 |
+
<?php esc_html_e( '(your username is the email address specified during the purchase).', 'bestwebsoft' ); ?>
|
256 |
</span>
|
257 |
</p>
|
258 |
+
<?php
|
259 |
+
if ( false !== $trial_days_number ) {
|
260 |
+
$trial_days_number = esc_html__( 'or', 'bestwebsoft' ) . ' <a href="https://bestwebsoft.com/products/wordpress/plugins/' . esc_attr( $link_slug ) . '/trial/" target="_blank">' . esc_html( sprintf( esc_html__( 'Start Your Free %s-Day Trial Now', 'bestwebsoft' ), $trial_days_number ) ) . '</a>';
|
261 |
+
}
|
262 |
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) &&
|
263 |
'5' < $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] &&
|
264 |
+
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) {
|
265 |
+
?>
|
266 |
<p>
|
267 |
<input disabled="disabled" type="text" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" />
|
268 |
+
<input disabled="disabled" type="submit" class="button-primary" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" />
|
269 |
+
<?php
|
270 |
+
if ( false !== $trial_days_number ) {
|
271 |
+
echo esc_html( $trial_days_number );
|
272 |
+
}
|
273 |
+
?>
|
274 |
</p>
|
275 |
+
<p><?php esc_html_e( 'Unfortunately, you have exceeded the number of available tries per day. Please, upload the plugin manually.', 'bestwebsoft' ); ?></p>
|
276 |
<?php } else { ?>
|
277 |
<p>
|
278 |
<input type="text" maxlength="100" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" />
|
279 |
<input type="hidden" name="bws_license_plugin" value="<?php echo esc_attr( $bws_license_plugin ); ?>" />
|
280 |
<input type="hidden" name="bws_license_submit" value="submit" />
|
281 |
+
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" />
|
282 |
+
<?php
|
283 |
+
if ( false !== $trial_days_number ) {
|
284 |
+
echo esc_html( $trial_days_number );
|
285 |
+
}
|
286 |
+
wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' );
|
287 |
+
?>
|
288 |
</p>
|
289 |
<?php } ?>
|
290 |
</form>
|
291 |
+
<?php
|
292 |
+
}
|
293 |
}
|
294 |
}
|
295 |
|
296 |
/**
|
297 |
+
* Function display GO PRO Banner (inline in 'admin_notices' action )
|
298 |
+
*
|
299 |
+
* @deprecated 2.2.5 (29.11.2019)
|
300 |
+
* @todo Remove notice after 01.12.2021
|
301 |
+
*/
|
302 |
if ( ! function_exists( 'bws_plugin_banner' ) ) {
|
303 |
function bws_plugin_banner( $plugin_info, $this_banner_prefix, $link_slug, $link_key, $link_pn, $banner_url_or_slug ) {
|
304 |
/* the function is not longer use, but we need to store it */
|
306 |
}
|
307 |
|
308 |
/**
|
309 |
+
* Function display timeout PRO Banner (inline in 'admin_notices' action )
|
310 |
+
*
|
311 |
+
* @deprecated 2.2.5 (29.11.2019)
|
312 |
+
* @todo Remove notice after 01.12.2021
|
313 |
+
*/
|
314 |
+
if ( ! function_exists( 'bws_plugin_banner_timeout' ) ) {
|
315 |
function bws_plugin_banner_timeout( $plugin_key, $plugin_prefix, $plugin_name, $banner_url_or_slug = false ) {
|
316 |
/* the function is not longer use, but we need to store it */
|
317 |
}
|
318 |
+
}
|
bws_menu/js/bws_menu.js
CHANGED
@@ -1,47 +1,58 @@
|
|
1 |
(function($) {
|
2 |
"use strict";
|
3 |
-
$(document).ready(
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
25 |
}
|
26 |
-
|
27 |
-
});
|
28 |
-
}
|
29 |
-
$( '.bws-menu-item-icon' ).click( function() {
|
30 |
-
if ( $( this ).hasClass( 'bws-active' ) ) {
|
31 |
-
$( this ).removeClass( 'bws-active' );
|
32 |
-
$( '.bws-nav-tab-wrapper, .bws-help-links-wrapper' ).hide();
|
33 |
-
} else {
|
34 |
-
$( this ).addClass( 'bws-active' );
|
35 |
-
$( '.bws-nav-tab-wrapper, .bws-help-links-wrapper' ).css( 'display', 'inline-block' );
|
36 |
}
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
(function($) {
|
2 |
"use strict";
|
3 |
+
$( document ).ready(
|
4 |
+
function() {
|
5 |
+
var product = $( '.bws_product_box' ),
|
6 |
+
max = 0;
|
7 |
+
$( product ).each(
|
8 |
+
function () {
|
9 |
+
if ( $( this ).height() > max ) {
|
10 |
+
max = $( this ).height();
|
11 |
+
}
|
12 |
+
}
|
13 |
+
);
|
14 |
+
$( '.bws_product_box' ).css( 'height', max + 'px' );
|
15 |
|
16 |
+
if ( $( '.bws-filter' ).length ) {
|
17 |
+
var prvPos = $( '.bws-filter' ).offset().top;
|
18 |
+
var maxPos = prvPos + $( '.bws-products' ).outerHeight() - $( '.bws-filter' ).outerHeight();
|
19 |
|
20 |
+
$( window ).scroll(
|
21 |
+
function() {
|
22 |
+
if ( $( window ).width() > 580 ) {
|
23 |
+
var scrPos = Number( $( document ).scrollTop() ) + 40;
|
24 |
+
if ( scrPos > maxPos ) {
|
25 |
+
$( '.bws-filter' ).removeClass( 'bws_fixed' );
|
26 |
+
} else if ( scrPos > prvPos ) {
|
27 |
+
$( '.bws-filter' ).addClass( 'bws_fixed' );
|
28 |
+
} else {
|
29 |
+
$( '.bws-filter' ).removeClass( 'bws_fixed' );
|
30 |
+
}
|
31 |
+
}
|
32 |
}
|
33 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
+
$( '.bws-menu-item-icon' ).click(
|
36 |
+
function() {
|
37 |
+
if ( $( this ).hasClass( 'bws-active' ) ) {
|
38 |
+
$( this ).removeClass( 'bws-active' );
|
39 |
+
$( '.bws-nav-tab-wrapper, .bws-help-links-wrapper' ).hide();
|
40 |
+
} else {
|
41 |
+
$( this ).addClass( 'bws-active' );
|
42 |
+
$( '.bws-nav-tab-wrapper, .bws-help-links-wrapper' ).css( 'display', 'inline-block' );
|
43 |
+
}
|
44 |
+
}
|
45 |
+
);
|
46 |
+
$( '.bws-filter-top h2' ).click(
|
47 |
+
function() {
|
48 |
+
if ( $( '.bws-filter-top' ).hasClass( 'bws-opened' ) ) {
|
49 |
+
$( '.bws-filter-top' ).removeClass( 'bws-opened' );
|
50 |
+
} else {
|
51 |
+
$( '.bws-filter-top' ).addClass( 'bws-opened' );
|
52 |
+
}
|
53 |
+
}
|
54 |
+
);
|
55 |
+
|
56 |
+
}
|
57 |
+
);
|
58 |
+
})( jQuery );
|
bws_menu/js/bws_tooltip.js
CHANGED
@@ -1,91 +1,110 @@
|
|
1 |
/**
|
2 |
* BWS tooltip function
|
3 |
-
*
|
4 |
*/
|
5 |
(function($) {
|
6 |
"use strict";
|
7 |
-
$(document).ready(
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
}
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
30 |
}
|
31 |
-
}, {
|
32 |
-
pointer: pointer_options['tooltip_id'],
|
33 |
-
action: 'dismiss-wp-pointer'
|
34 |
-
})
|
35 |
-
});
|
36 |
-
/* function to display pointer */
|
37 |
-
function displayPointer( cssSelector ) {
|
38 |
-
cssSelector.pointer( pointer_options ).pointer({
|
39 |
-
pointerClass: 'wp-pointer ' + pointer_options["tooltip_id"],
|
40 |
-
content: pointer_options['content'],
|
41 |
-
position: {
|
42 |
-
edge: pointer_options['position']['edge'],
|
43 |
-
align: pointer_options['position']['align'],
|
44 |
-
},
|
45 |
-
}).pointer('open');
|
46 |
-
/* display buttons that are not type of dismiss */
|
47 |
-
for ( var but in pointer_buttons ) {
|
48 |
-
if ( typeof pointer_buttons[ but ]['type'] != 'undefined' && pointer_buttons[ but ]['type'] != 'dismiss' && typeof pointer_buttons[ but ]['text'] != 'undefined' && pointer_buttons[ but ]['text'] != '' ) {
|
49 |
-
$( '.' + pointer_options['tooltip_id'] + ' .button-secondary').first().before( '<a class="button-primary" style="margin-right: 5px;" ' +
|
50 |
-
( ( pointer_buttons[ but ]['type'] == 'link' && typeof pointer_buttons[ but ]['link'] != 'undefined' && pointer_buttons[ but ]['link'] != '') ? 'target="_blank" href="' + pointer_buttons[ but ]['link'] + '"' : '' )
|
51 |
-
+ '>' + pointer_buttons[ but ]['text'] + '</a>' );
|
52 |
-
};
|
53 |
-
}
|
54 |
-
/* adjust position of pointer */
|
55 |
-
var topPos,
|
56 |
-
leftPos,
|
57 |
-
pointerZindex;
|
58 |
-
topPos = parseInt( $( "." + pointer_options["tooltip_id"] ).css("top") ) + parseInt( pointer_options['position']['pos-top'] );
|
59 |
-
leftPos = parseInt( $( "." + pointer_options["tooltip_id"] ).css("left") ) + parseInt( pointer_options['position']['pos-left'] );
|
60 |
-
if ( pointer_options['position']['align'] == 'left' ) {
|
61 |
-
leftPos += cssSelector.outerWidth()/2;
|
62 |
-
};
|
63 |
-
$( "." + pointer_options["tooltip_id"] ).css({ "top": topPos + "px", "left": leftPos + "px" });
|
64 |
-
/* adjust z-index if need */
|
65 |
-
pointerZindex = parseInt( $( "." + pointer_options["tooltip_id"] ).css("z-index") );
|
66 |
-
if ( pointerZindex != pointer_options['position']['zindex'] ) {
|
67 |
-
$( "." + pointer_options["tooltip_id"] ).css({ "z-index": pointer_options['position']['zindex'] });
|
68 |
-
}
|
69 |
-
}
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
/* display pointer when clicked on selector */
|
84 |
-
if ( pointer_options['actions']['click'] ) {
|
85 |
-
$( pointer_options['css_selector'] ).click( function () {
|
86 |
-
displayPointer( $( this ) );
|
87 |
-
});
|
88 |
-
}
|
89 |
-
};
|
90 |
-
})
|
91 |
-
})(jQuery);
|
1 |
/**
|
2 |
* BWS tooltip function
|
|
|
3 |
*/
|
4 |
(function($) {
|
5 |
"use strict";
|
6 |
+
$( document ).ready(
|
7 |
+
function() {
|
8 |
+
jQuery.bwsTooltip = function( pointer_options ) {
|
9 |
+
var pointer_buttons = pointer_options['buttons'];
|
10 |
+
/* extend pointer options - add close button */
|
11 |
+
pointer_options = $.extend(
|
12 |
+
pointer_options,
|
13 |
+
{
|
14 |
+
buttons: function(event, t) {
|
15 |
+
var button = '';
|
16 |
+
/* check and add dismiss-type buttons */
|
17 |
+
for ( var but in pointer_buttons ) {
|
18 |
+
if ( typeof pointer_buttons[ but ]['type'] != 'undefined' && pointer_buttons[ but ]['type'] == 'dismiss' && typeof pointer_buttons[ but ]['text'] != 'undefined' && pointer_buttons[ but ]['text'] != '' ) {
|
19 |
+
button += '<a style="margin:0px 5px 2px;" class="button-secondary">' + pointer_buttons[ but ]['text'] + '</a>';
|
20 |
+
}
|
21 |
+
}
|
22 |
+
button = jQuery( button );
|
23 |
+
button.on(
|
24 |
+
'click.pointer',
|
25 |
+
function () {
|
26 |
+
t.element.pointer( 'close' );
|
27 |
+
}
|
28 |
+
);
|
29 |
+
return button;
|
30 |
+
},
|
31 |
+
/* add ajax dismiss functionality */
|
32 |
+
close : $.proxy(
|
33 |
+
function () {
|
34 |
+
if ( pointer_options['actions']['onload'] == true ) {
|
35 |
+
$.post( ajaxurl, this );
|
36 |
+
}
|
37 |
+
},
|
38 |
+
{
|
39 |
+
pointer: pointer_options['tooltip_id'],
|
40 |
+
action: 'dismiss-wp-pointer'
|
41 |
+
}
|
42 |
+
)
|
43 |
+
}
|
44 |
+
);
|
45 |
+
/* function to display pointer */
|
46 |
+
function displayPointer( cssSelector ) {
|
47 |
+
cssSelector.pointer( pointer_options ).pointer(
|
48 |
+
{
|
49 |
+
pointerClass: 'wp-pointer ' + pointer_options["tooltip_id"],
|
50 |
+
content: pointer_options['content'],
|
51 |
+
position: {
|
52 |
+
edge: pointer_options['position']['edge'],
|
53 |
+
align: pointer_options['position']['align'],
|
54 |
+
},
|
55 |
+
}
|
56 |
+
).pointer( 'open' );
|
57 |
+
/* display buttons that are not type of dismiss */
|
58 |
+
for ( var but in pointer_buttons ) {
|
59 |
+
if ( typeof pointer_buttons[ but ]['type'] != 'undefined' && pointer_buttons[ but ]['type'] != 'dismiss' && typeof pointer_buttons[ but ]['text'] != 'undefined' && pointer_buttons[ but ]['text'] != '' ) {
|
60 |
+
$( '.' + pointer_options['tooltip_id'] + ' .button-secondary' ).first().before(
|
61 |
+
'<a class="button-primary" style="margin-right: 5px;" ' +
|
62 |
+
( ( pointer_buttons[ but ]['type'] == 'link' && typeof pointer_buttons[ but ]['link'] != 'undefined' && pointer_buttons[ but ]['link'] != '') ? 'target="_blank" href="' + pointer_buttons[ but ]['link'] + '"' : '' )
|
63 |
+
+ '>' + pointer_buttons[ but ]['text'] + '</a>'
|
64 |
+
);
|
65 |
+
};
|
66 |
+
}
|
67 |
+
/* adjust position of pointer */
|
68 |
+
var topPos,
|
69 |
+
leftPos,
|
70 |
+
pointerZindex;
|
71 |
+
topPos = parseInt( $( "." + pointer_options["tooltip_id"] ).css( "top" ) ) + parseInt( pointer_options['position']['pos-top'] );
|
72 |
+
leftPos = parseInt( $( "." + pointer_options["tooltip_id"] ).css( "left" ) ) + parseInt( pointer_options['position']['pos-left'] );
|
73 |
+
if ( pointer_options['position']['align'] == 'left' ) {
|
74 |
+
leftPos += cssSelector.outerWidth() / 2;
|
75 |
+
};
|
76 |
+
$( "." + pointer_options["tooltip_id"] ).css( { "top": topPos + "px", "left": leftPos + "px" } );
|
77 |
+
/* adjust z-index if need */
|
78 |
+
pointerZindex = parseInt( $( "." + pointer_options["tooltip_id"] ).css( "z-index" ) );
|
79 |
+
if ( pointerZindex != pointer_options['position']['zindex'] ) {
|
80 |
+
$( "." + pointer_options["tooltip_id"] ).css( { "z-index": pointer_options['position']['zindex'] } );
|
81 |
}
|
82 |
}
|
83 |
+
|
84 |
+
/* display pointer for the first time */
|
85 |
+
if ( pointer_options['actions']['onload'] ) {
|
86 |
+
if ( pointer_options['set_timeout'] > 0 ) {
|
87 |
+
var settime = parseInt( pointer_options['set_timeout'] );
|
88 |
+
setTimeout(
|
89 |
+
function() {
|
90 |
+
displayPointer( $( pointer_options['css_selector'] ) );
|
91 |
+
},
|
92 |
+
settime
|
93 |
+
);
|
94 |
+
} else {
|
95 |
+
displayPointer( $( pointer_options['css_selector'] ) );
|
96 |
+
}
|
97 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
+
/* display pointer when clicked on selector */
|
100 |
+
if ( pointer_options['actions']['click'] ) {
|
101 |
+
$( pointer_options['css_selector'] ).click(
|
102 |
+
function () {
|
103 |
+
displayPointer( $( this ) );
|
104 |
+
}
|
105 |
+
);
|
106 |
+
}
|
107 |
+
};
|
108 |
+
}
|
109 |
+
)
|
110 |
+
})( jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bws_menu/js/c_o_o_k_i_e.js
CHANGED
@@ -1,96 +1,96 @@
|
|
1 |
-
/**
|
2 |
-
* Cookie plugin
|
3 |
-
*
|
4 |
-
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
5 |
-
* Dual licensed under the MIT and GPL licenses:
|
6 |
-
* http://www.opensource.org/licenses/mit-license.php
|
7 |
-
* http://www.gnu.org/licenses/gpl.html
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
*
|
13 |
-
*
|
14 |
-
* @
|
15 |
-
* @
|
16 |
-
* @
|
17 |
-
* @
|
18 |
-
* @
|
19 |
-
* @
|
20 |
-
* @
|
21 |
-
*
|
22 |
-
*
|
23 |
-
*
|
24 |
-
* @param String
|
25 |
-
* @param
|
26 |
-
* @
|
27 |
-
*
|
28 |
-
* If
|
29 |
-
*
|
30 |
-
*
|
31 |
-
* @option String
|
32 |
-
* @option
|
33 |
-
*
|
34 |
-
*
|
35 |
-
*
|
36 |
-
*
|
37 |
-
* @
|
38 |
-
* @
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
*
|
44 |
-
*
|
45 |
-
* @
|
46 |
-
*
|
47 |
-
*
|
48 |
-
* @
|
49 |
-
* @
|
50 |
-
*
|
51 |
-
*
|
52 |
-
* @
|
53 |
-
* @
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
};
|
1 |
+
/**
|
2 |
+
* Cookie plugin
|
3 |
+
*
|
4 |
+
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
5 |
+
* Dual licensed under the MIT and GPL licenses:
|
6 |
+
* http://www.opensource.org/licenses/mit-license.php
|
7 |
+
* http://www.gnu.org/licenses/gpl.html
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Create a cookie with the given name and value and other optional parameters.
|
12 |
+
*
|
13 |
+
* @example $.cookie('the_cookie', 'the_value');
|
14 |
+
* @desc Set the value of a cookie.
|
15 |
+
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
16 |
+
* @desc Create a cookie with all available options.
|
17 |
+
* @example $.cookie('the_cookie', 'the_value');
|
18 |
+
* @desc Create a session cookie.
|
19 |
+
* @example $.cookie('the_cookie', null);
|
20 |
+
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
21 |
+
* used when the cookie was set.
|
22 |
+
*
|
23 |
+
* @param String name The name of the cookie.
|
24 |
+
* @param String value The value of the cookie.
|
25 |
+
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
26 |
+
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
27 |
+
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
28 |
+
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
29 |
+
* when the the browser exits.
|
30 |
+
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
31 |
+
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
32 |
+
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
33 |
+
* require a secure protocol (like HTTPS).
|
34 |
+
* @type undefined
|
35 |
+
*
|
36 |
+
* @name $.cookie
|
37 |
+
* @cat Plugins/Cookie
|
38 |
+
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
39 |
+
*/
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Get the value of a cookie with the given name.
|
43 |
+
*
|
44 |
+
* @example $.cookie('the_cookie');
|
45 |
+
* @desc Get the value of a cookie.
|
46 |
+
*
|
47 |
+
* @param String name The name of the cookie.
|
48 |
+
* @return The value of the cookie.
|
49 |
+
* @type String
|
50 |
+
*
|
51 |
+
* @name $.cookie
|
52 |
+
* @cat Plugins/Cookie
|
53 |
+
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
54 |
+
*/
|
55 |
+
jQuery.cookie = function(name, value, options) {
|
56 |
+
if (typeof value != 'undefined') { /* name and value given, set cookie */
|
57 |
+
options = options || {};
|
58 |
+
if (value === null) {
|
59 |
+
value = '';
|
60 |
+
options.expires = -1;
|
61 |
+
}
|
62 |
+
var expires = '';
|
63 |
+
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
64 |
+
var date;
|
65 |
+
if (typeof options.expires == 'number') {
|
66 |
+
date = new Date();
|
67 |
+
date.setTime( date.getTime() + (options.expires * 24 * 60 * 60 * 1000) );
|
68 |
+
} else {
|
69 |
+
date = options.expires;
|
70 |
+
}
|
71 |
+
expires = '; expires=' + date.toUTCString(); /* use expires attribute, max-age is not supported by IE */
|
72 |
+
}
|
73 |
+
/** CAUTION: Needed to parenthesize options.path and options.domain
|
74 |
+
* in the following expressions, otherwise they evaluate to undefined
|
75 |
+
* in the packed version for some reason...
|
76 |
+
*/
|
77 |
+
var path = options.path ? '; path=' + (options.path) : '';
|
78 |
+
var domain = options.domain ? '; domain=' + (options.domain) : '';
|
79 |
+
var secure = options.secure ? '; secure' : '';
|
80 |
+
document.cookie = [name, '=', encodeURIComponent( value ), expires, path, domain, secure].join( '' );
|
81 |
+
} else { /* only name given, get cookie */
|
82 |
+
var cookieValue = null;
|
83 |
+
if (document.cookie && document.cookie != '') {
|
84 |
+
var cookies = document.cookie.split( ';' );
|
85 |
+
for (var i = 0; i < cookies.length; i++) {
|
86 |
+
var cookie = jQuery.trim( cookies[i] );
|
87 |
+
/* Does this cookie string begin with the name we want? */
|
88 |
+
if (cookie.substring( 0, name.length + 1 ) == (name + '=')) {
|
89 |
+
cookieValue = decodeURIComponent( cookie.substring( name.length + 1 ) );
|
90 |
+
break;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
}
|
94 |
+
return cookieValue;
|
95 |
+
}
|
96 |
+
};
|
bws_menu/js/general_script.js
CHANGED
@@ -3,183 +3,229 @@ function bws_show_settings_notice() {
|
|
3 |
(function($) {
|
4 |
$( '.updated.fade:not(.bws_visible), .error:not(.bws_visible)' ).css( 'display', 'none' );
|
5 |
$( '#bws_save_settings_notice' ).css( 'display', 'block' );
|
6 |
-
})(jQuery);
|
7 |
}
|
8 |
|
9 |
(function($) {
|
10 |
"use strict";
|
11 |
-
$( document ).ready(
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
-
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
styleActiveLine: true,
|
44 |
-
matchBrackets: true,
|
45 |
-
lineNumbers: true,
|
46 |
-
});
|
47 |
-
/* disable lines */
|
48 |
-
editor.markText( {ch:0,line:0}, {ch:0,line:5}, { readOnly: true, className: 'bws-readonly' } );
|
49 |
-
}
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
71 |
}
|
72 |
-
});
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
show: null, /* show immediately */
|
87 |
-
tooltipClass: "bws-tooltip-content",
|
88 |
-
position: current_position,
|
89 |
-
open: function( event, ui ) {
|
90 |
-
if ( typeof( event.originalEvent ) === 'undefined' ) {
|
91 |
-
return false;
|
92 |
}
|
93 |
-
if ( $( event.originalEvent.target ).hasClass( 'bws-auto-width' ) ) {
|
94 |
-
ui.tooltip.css( "max-width", "inherit" );
|
95 |
-
}
|
96 |
-
var $id = $( ui.tooltip ).attr( 'id' );
|
97 |
-
/* close any lingering tooltips */
|
98 |
-
$( 'div.ui-tooltip' ).not( '#' + $id ).remove();
|
99 |
-
},
|
100 |
-
close: function( event, ui ) {
|
101 |
-
ui.tooltip.hover( function() {
|
102 |
-
$( this ).stop( true ).fadeTo( 200, 1 );
|
103 |
-
},
|
104 |
-
function() {
|
105 |
-
$( this ).fadeOut( '200', function() {
|
106 |
-
$( this ).remove();
|
107 |
-
});
|
108 |
-
});
|
109 |
}
|
110 |
-
|
111 |
-
}
|
112 |
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
}
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
active_tab
|
135 |
-
|
136 |
-
|
137 |
-
prevent_tabs_change = false;
|
138 |
-
});
|
139 |
-
$( '.bws_trigger_tab_click' ).on( 'click', function () {
|
140 |
-
$( '#bws_settings_tabs a[href="' + $( this ).attr( 'href' ) + '"]' ).click();
|
141 |
-
});
|
142 |
-
}
|
143 |
-
/**
|
144 |
-
* Hide content for options on the plugin settings page
|
145 |
-
*/
|
146 |
-
var options = $( '.bws_option_affect' );
|
147 |
-
if ( options.length ) {
|
148 |
-
options.each( function() {
|
149 |
-
var element = $( this );
|
150 |
-
if ( element.is( ':selected' ) || element.is( ':checked' ) ) {
|
151 |
-
$( element.data( 'affect-show' ) ).show();
|
152 |
-
$( element.data( 'affect-hide' ) ).hide();
|
153 |
} else {
|
154 |
-
$(
|
155 |
-
$( element.data( 'affect-hide' ) ).show();
|
156 |
}
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
} else {
|
165 |
-
$(
|
166 |
-
$(
|
167 |
}
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
} else {
|
177 |
-
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
}
|
180 |
-
}
|
181 |
-
|
182 |
-
}
|
183 |
}
|
184 |
-
|
185 |
-
})(jQuery);
|
3 |
(function($) {
|
4 |
$( '.updated.fade:not(.bws_visible), .error:not(.bws_visible)' ).css( 'display', 'none' );
|
5 |
$( '#bws_save_settings_notice' ).css( 'display', 'block' );
|
6 |
+
})( jQuery );
|
7 |
}
|
8 |
|
9 |
(function($) {
|
10 |
"use strict";
|
11 |
+
$( document ).ready(
|
12 |
+
function() {
|
13 |
+
/**
|
14 |
+
* add notice about changing on the settings page
|
15 |
+
*/
|
16 |
+
$( '.bws_form input, .bws_form textarea, .bws_form select' ).on(
|
17 |
+
"change paste select",
|
18 |
+
function() {
|
19 |
+
if ( $( this ).attr( 'type' ) != 'submit' && ! $( this ).hasClass( 'bws_no_bind_notice' ) ) {
|
20 |
+
bws_show_settings_notice();
|
21 |
+
};
|
22 |
+
}
|
23 |
+
);
|
24 |
+
$( '.bws_save_anchor' ).on(
|
25 |
+
"click",
|
26 |
+
function( event ) {
|
27 |
+
event.preventDefault();
|
28 |
+
$( '.bws_form #bws-submit-button' ).click();
|
29 |
+
}
|
30 |
+
);
|
31 |
|
32 |
+
/* custom code */
|
33 |
|
34 |
+
if ( 'function' == typeof wp.CodeMirror || 'function' == typeof CodeMirror ) {
|
35 |
+
var CodeMirrorFunc = ( typeof wp.CodeMirror != 'undefined' ) ? wp.CodeMirror : CodeMirror;
|
36 |
+
if ( $( '#bws_newcontent_css' ).length > 0 ) {
|
37 |
+
var editor = CodeMirrorFunc.fromTextArea(
|
38 |
+
document.getElementById( 'bws_newcontent_css' ),
|
39 |
+
{
|
40 |
+
mode: "css",
|
41 |
+
theme: "default",
|
42 |
+
styleActiveLine: true,
|
43 |
+
matchBrackets: true,
|
44 |
+
lineNumbers: true,
|
45 |
+
addModeClass: 'bws_newcontent_css',
|
46 |
+
readOnly: 'nocursor'
|
47 |
+
}
|
48 |
+
);
|
49 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
+
if ( $( '#bws_newcontent_php' ).length > 0 ) {
|
52 |
+
var editor = CodeMirrorFunc.fromTextArea(
|
53 |
+
document.getElementById( "bws_newcontent_php" ),
|
54 |
+
{
|
55 |
+
mode: 'text/x-php',
|
56 |
+
styleActiveLine: true,
|
57 |
+
matchBrackets: true,
|
58 |
+
lineNumbers: true,
|
59 |
+
readOnly: 'nocursor'
|
60 |
+
}
|
61 |
+
);
|
62 |
+
/* disable lines */
|
63 |
+
editor.markText( {ch:0,line:0}, {ch:0,line:5}, { readOnly: true, className: 'bws-readonly' } );
|
64 |
+
}
|
65 |
|
66 |
+
if ( $( '#bws_newcontent_js' ).length > 0 ) {
|
67 |
+
var editor = CodeMirrorFunc.fromTextArea(
|
68 |
+
document.getElementById( "bws_newcontent_js" ),
|
69 |
+
{
|
70 |
+
mode: 'javascript',
|
71 |
+
styleActiveLine: true,
|
72 |
+
matchBrackets: true,
|
73 |
+
lineNumbers: true,
|
74 |
+
readOnly: 'nocursor'
|
75 |
+
}
|
76 |
+
);
|
77 |
+
}
|
78 |
}
|
|
|
79 |
|
80 |
+
/* banner to settings */
|
81 |
+
$( '.bws_banner_to_settings_joint .bws-details' ).addClass( 'hidden' ).removeClass( 'hide-if-js' );
|
82 |
+
$( '.bws_banner_to_settings_joint .bws-more-links' ).on(
|
83 |
+
"click",
|
84 |
+
function( event ) {
|
85 |
+
event.preventDefault();
|
86 |
+
if ( $( '.bws_banner_to_settings_joint .bws-less' ).hasClass( 'hidden' ) ) {
|
87 |
+
$( '.bws_banner_to_settings_joint .bws-less, .bws_banner_to_settings_joint .bws-details' ).removeClass( 'hidden' );
|
88 |
+
$( '.bws_banner_to_settings_joint .bws-more' ).addClass( 'hidden' );
|
89 |
+
} else {
|
90 |
+
$( '.bws_banner_to_settings_joint .bws-less, .bws_banner_to_settings_joint .bws-details' ).addClass( 'hidden' );
|
91 |
+
$( '.bws_banner_to_settings_joint .bws-more' ).removeClass( 'hidden' );
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
94 |
+
);
|
|
|
95 |
|
96 |
+
/* help tooltips */
|
97 |
+
if ( $( '.bws_help_box' ).length > 0 ) {
|
98 |
+
if ( $( 'body' ).hasClass( 'rtl' ) ) {
|
99 |
+
var current_position = { my: "right top+15", at: "right bottom" };
|
100 |
+
} else {
|
101 |
+
var current_position = { my: "left top+15", at: "left bottom" };
|
102 |
+
}
|
103 |
+
$( document ).tooltip(
|
104 |
+
{
|
105 |
+
items: $( '.bws_help_box' ),
|
106 |
+
content: function() {
|
107 |
+
return $( this ).find( '.bws_hidden_help_text' ).html()
|
108 |
+
},
|
109 |
+
show: null, /* show immediately */
|
110 |
+
tooltipClass: "bws-tooltip-content",
|
111 |
+
position: current_position,
|
112 |
+
open: function( event, ui ) {
|
113 |
+
if ( typeof( event.originalEvent ) === 'undefined' ) {
|
114 |
+
return false;
|
115 |
+
}
|
116 |
+
if ( $( event.originalEvent.target ).hasClass( 'bws-auto-width' ) ) {
|
117 |
+
ui.tooltip.css( "max-width", "inherit" );
|
118 |
+
}
|
119 |
+
var $id = $( ui.tooltip ).attr( 'id' );
|
120 |
+
/* close any lingering tooltips */
|
121 |
+
$( 'div.ui-tooltip' ).not( '#' + $id ).remove();
|
122 |
+
},
|
123 |
+
close: function( event, ui ) {
|
124 |
+
ui.tooltip.hover(
|
125 |
+
function() {
|
126 |
+
$( this ).stop( true ).fadeTo( 200, 1 );
|
127 |
+
},
|
128 |
+
function() {
|
129 |
+
$( this ).fadeOut(
|
130 |
+
'200',
|
131 |
+
function() {
|
132 |
+
$( this ).remove();
|
133 |
+
}
|
134 |
+
);
|
135 |
+
}
|
136 |
+
);
|
137 |
+
}
|
138 |
+
}
|
139 |
+
);
|
140 |
}
|
141 |
|
142 |
+
/**
|
143 |
+
* Handle the styling of the "Settings" tab on the plugin settings page
|
144 |
+
*/
|
145 |
+
var tabs = $( '#bws_settings_tabs_wrapper' );
|
146 |
+
if ( tabs.length ) {
|
147 |
+
var current_tab_field = $( 'input[name="bws_active_tab"]' ),
|
148 |
+
prevent_tabs_change = false,
|
149 |
+
active_tab = current_tab_field.val();
|
150 |
+
if ( '' == active_tab ) {
|
151 |
+
var active_tab_index = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
} else {
|
153 |
+
var active_tab_index = $( '#bws_settings_tabs li[data-slug=' + active_tab + ']' ).index();
|
|
|
154 |
}
|
155 |
+
|
156 |
+
$( '.bws_tab' ).css( 'min-height', $( '#bws_settings_tabs' ).css( 'height' ) );
|
157 |
+
|
158 |
+
/* jQuery tabs initialization */
|
159 |
+
tabs.tabs(
|
160 |
+
{
|
161 |
+
active: active_tab_index
|
162 |
+
}
|
163 |
+
).on(
|
164 |
+
"tabsactivate",
|
165 |
+
function( event, ui ) {
|
166 |
+
if ( ! prevent_tabs_change ) {
|
167 |
+
active_tab = ui.newTab.data( 'slug' );
|
168 |
+
current_tab_field.val( active_tab );
|
169 |
+
}
|
170 |
+
prevent_tabs_change = false;
|
171 |
+
}
|
172 |
+
);
|
173 |
+
$( '.bws_trigger_tab_click' ).on(
|
174 |
+
'click',
|
175 |
+
function () {
|
176 |
+
$( '#bws_settings_tabs a[href="' + $( this ).attr( 'href' ) + '"]' ).click();
|
177 |
+
}
|
178 |
+
);
|
179 |
+
}
|
180 |
+
/**
|
181 |
+
* Hide content for options on the plugin settings page
|
182 |
+
*/
|
183 |
+
var options = $( '.bws_option_affect' );
|
184 |
+
if ( options.length ) {
|
185 |
+
options.each(
|
186 |
+
function() {
|
187 |
+
var element = $( this );
|
188 |
+
if ( element.is( ':selected' ) || element.is( ':checked' ) ) {
|
189 |
+
$( element.data( 'affect-show' ) ).show();
|
190 |
+
$( element.data( 'affect-hide' ) ).hide();
|
191 |
} else {
|
192 |
+
$( element.data( 'affect-show' ) ).hide();
|
193 |
+
$( element.data( 'affect-hide' ) ).show();
|
194 |
}
|
195 |
+
if ( element.is( 'option' ) ) {
|
196 |
+
element.parent().on(
|
197 |
+
'change',
|
198 |
+
function() {
|
199 |
+
var affect_hide = element.data( 'affect-hide' ),
|
200 |
+
affect_show = element.data( 'affect-show' );
|
201 |
+
if ( element.is( ':selected' ) ) {
|
202 |
+
$( affect_show ).show();
|
203 |
+
$( affect_hide ).hide();
|
204 |
+
} else {
|
205 |
+
$( affect_show ).hide();
|
206 |
+
$( affect_hide ).show();
|
207 |
+
}
|
208 |
+
}
|
209 |
+
);
|
210 |
} else {
|
211 |
+
element.on(
|
212 |
+
'change',
|
213 |
+
function() {
|
214 |
+
var affect_hide = element.data( 'affect-hide' ),
|
215 |
+
affect_show = element.data( 'affect-show' );
|
216 |
+
if ( element.is( ':selected' ) || element.is( ':checked' ) ) {
|
217 |
+
$( affect_show ).show();
|
218 |
+
$( affect_hide ).hide();
|
219 |
+
} else {
|
220 |
+
$( affect_show ).hide();
|
221 |
+
$( affect_hide ).show();
|
222 |
+
}
|
223 |
+
}
|
224 |
+
);
|
225 |
}
|
226 |
+
}
|
227 |
+
);
|
228 |
+
}
|
229 |
}
|
230 |
+
);
|
231 |
+
})( jQuery );
|
bws_menu/js/shortcode-button.js
CHANGED
@@ -1,118 +1,132 @@
|
|
1 |
(function($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
});
|
52 |
-
var current_object = '.mce-container-body';
|
53 |
-
var select_count = $( current_object + ' select#bws_shortcode_select option').length;
|
54 |
-
if ( 1 == select_count ) {
|
55 |
-
$( current_object + ' #bws_shortcode_select_plugin' ).hide();
|
56 |
-
}
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
$( current_object + ' #bws_shortcode_content > #' + plugin ).show();
|
70 |
-
if ( $( current_object + ' #bws_shortcode_content > #' + plugin + ' .bws_default_shortcode' ).length > 0 ) {
|
71 |
-
$( current_object + ' #bws_shortcode_display' ).text( $( current_object + ' #bws_shortcode_content > #' + plugin + ' .bws_default_shortcode' ).val() );
|
72 |
-
} else {
|
73 |
-
$( current_object + ' #bws_shortcode_display' ).text( '' );
|
74 |
-
}
|
75 |
-
});
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
(function($) {
|
2 |
+
"use strict";
|
3 |
+
if ( typeof bws_shortcode_button != 'undefined' ) {
|
4 |
+
var win;
|
5 |
|
6 |
+
tinymce.create(
|
7 |
+
'tinymce.plugins.BWSButton',
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Initializes the plugin, this will be executed after the plugin has been created.
|
11 |
+
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
12 |
+
* of the editor instance to intercept that event.
|
13 |
+
*
|
14 |
+
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
15 |
+
* @param {string} url Absolute URL to where the plugin is located.
|
16 |
+
*/
|
17 |
+
init : function( ed, url ) {
|
18 |
+
ed.addButton(
|
19 |
+
'add_bws_shortcode',
|
20 |
+
{
|
21 |
+
title : bws_shortcode_button.title,
|
22 |
+
classes: 'bws_shortcode_button widget btn',
|
23 |
+
icon: 'icon bwsicons bwsicons-shortcode',
|
24 |
+
text: bws_shortcode_button.label,
|
25 |
+
onclick: function() {
|
26 |
|
27 |
+
win = ed.windowManager.open(
|
28 |
+
{
|
29 |
+
width: 400,
|
30 |
+
height: 400,
|
31 |
+
inline: true,
|
32 |
+
title: bws_shortcode_button.title,
|
33 |
+
body: {
|
34 |
+
id : 'bws-shortcode-content',
|
35 |
+
type: 'container',
|
36 |
+
classes: 'bws-shortcode',
|
37 |
+
html: $( '#bws_shortcode_popup' ).html()
|
38 |
+
},
|
39 |
+
buttons: [{
|
40 |
+
text: 'Insert',
|
41 |
+
classes: 'button-primary primary bws_shortcode_insert',
|
42 |
+
onclick: function( e ) {
|
43 |
+
var shortcode = $( '.mce-container-body #bws_shortcode_display' ).text();
|
44 |
+
if ( '' != shortcode ) {
|
45 |
+
/* insert shortcode to tinymce */
|
46 |
+
ed.insertContent( shortcode );
|
47 |
+
}
|
48 |
+
ed.windowManager.close();
|
49 |
+
},
|
50 |
+
},
|
51 |
+
{
|
52 |
+
text: 'Cancel',
|
53 |
+
onclick: 'close'
|
54 |
+
}],
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
+
}
|
57 |
+
);
|
58 |
+
var current_object = '.mce-container-body';
|
59 |
+
var select_count = $( current_object + ' select#bws_shortcode_select option' ).length;
|
60 |
+
if ( 1 == select_count ) {
|
61 |
+
$( current_object + ' #bws_shortcode_select_plugin' ).hide();
|
62 |
+
}
|
63 |
|
64 |
+
var plugin = $( current_object + ' #bws_shortcode_select option:selected' ).val();
|
65 |
+
$( current_object + ' #bws_shortcode_content > div' ).hide();
|
66 |
+
$( current_object + ' #bws_shortcode_content > #' + plugin ).show();
|
67 |
|
68 |
+
if ( $( current_object + ' #bws_shortcode_content > #' + plugin + ' .bws_default_shortcode' ).length > 0 ) {
|
69 |
+
$( current_object + ' #bws_shortcode_display' ).text( $( current_object + ' #bws_shortcode_content > #' + plugin + ' .bws_default_shortcode' ).val() );
|
70 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
+
$( current_object + ' #bws_shortcode_select' ).on(
|
73 |
+
'change',
|
74 |
+
function() {
|
75 |
+
var plugin = $( current_object + ' #bws_shortcode_select option:selected' ).val();
|
76 |
+
$( current_object + ' #bws_shortcode_content > div' ).hide();
|
77 |
+
$( current_object + ' #bws_shortcode_content > #' + plugin ).show();
|
78 |
+
if ( $( current_object + ' #bws_shortcode_content > #' + plugin + ' .bws_default_shortcode' ).length > 0 ) {
|
79 |
+
$( current_object + ' #bws_shortcode_display' ).text( $( current_object + ' #bws_shortcode_content > #' + plugin + ' .bws_default_shortcode' ).val() );
|
80 |
+
} else {
|
81 |
+
$( current_object + ' #bws_shortcode_display' ).text( '' );
|
82 |
+
}
|
83 |
+
}
|
84 |
+
);
|
85 |
+
|
86 |
+
$.each(
|
87 |
+
bws_shortcode_button.function_name,
|
88 |
+
function( index, value ) {
|
89 |
+
eval( value + '();' );
|
90 |
+
}
|
91 |
+
);
|
92 |
+
}
|
93 |
+
}
|
94 |
+
);
|
95 |
+
},
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Creates control instances based in the incomming name. This method is normally not
|
99 |
+
* needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
|
100 |
+
* but you sometimes need to create more complex controls like listboxes, split buttons etc then this
|
101 |
+
* method can be used to create those.
|
102 |
+
*
|
103 |
+
* @param {String} n Name of the control to create.
|
104 |
+
* @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
|
105 |
+
* @return {tinymce.ui.Control} New control instance or null if no control was created.
|
106 |
+
*/
|
107 |
+
createControl : function(n, cm) {
|
108 |
+
return null;
|
109 |
+
},
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Returns information about the plugin as a name/value array.
|
113 |
+
* The current keys are longname, author, authorurl, infourl and version.
|
114 |
+
*
|
115 |
+
* @return {Object} Name/value array containing information about the plugin.
|
116 |
+
*/
|
117 |
+
getInfo : function() {
|
118 |
+
return {
|
119 |
+
longname : 'BWS Shortcode Buttons',
|
120 |
+
author : 'BWS',
|
121 |
+
authorurl : 'https://bestwebsoft.com',
|
122 |
+
infourl : '',
|
123 |
+
version : "0.1"
|
124 |
+
};
|
125 |
+
}
|
126 |
+
}
|
127 |
+
);
|
128 |
+
|
129 |
+
/* Register plugin */
|
130 |
+
tinymce.PluginManager.add( 'add_bws_shortcode', tinymce.plugins.BWSButton );
|
131 |
+
}
|
132 |
+
})( jQuery );
|
bws_menu/product_list.php
CHANGED
@@ -1,509 +1,510 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
* BestWebSoft product list
|
4 |
-
*/
|
|
|
5 |
global $bws_plugin_info, $wp_version;
|
6 |
|
7 |
$bws_plugins_category = array(
|
8 |
-
'admin-tools'
|
9 |
-
'content'
|
10 |
-
'ecommerce'
|
11 |
-
'marketing'
|
12 |
-
'navigation'
|
13 |
-
'recommended'
|
14 |
-
'security'
|
15 |
-
'seo'
|
16 |
-
'smm'
|
17 |
);
|
18 |
|
19 |
$bws_plugins = array(
|
20 |
-
'bike-rental/bike-rental.php'
|
21 |
-
'category'
|
22 |
-
'name'
|
23 |
-
'description'
|
24 |
-
'link'
|
25 |
-
'settings'
|
26 |
-
'pro_version'
|
27 |
-
'purchase'
|
28 |
-
'pro_settings'
|
29 |
-
'icon'
|
30 |
-
'install_url'
|
31 |
-
),
|
32 |
-
'captcha-bws/captcha-bws.php'
|
33 |
-
'category'
|
34 |
-
'name'
|
35 |
-
'description'
|
36 |
-
'link'
|
37 |
-
'settings'
|
38 |
-
'pro_version'
|
39 |
-
'purchase'
|
40 |
-
'pro_settings'
|
41 |
-
),
|
42 |
-
'bws-car-rental/bws-car-rental.php'
|
43 |
-
'category'
|
44 |
-
'name'
|
45 |
-
'description'
|
46 |
-
'link'
|
47 |
-
'settings'
|
48 |
-
'pro_version'
|
49 |
-
'purchase'
|
50 |
-
'pro_settings'
|
51 |
-
'icon'
|
52 |
-
'install_url'
|
53 |
-
),
|
54 |
-
'columns-bws/columns-bws.php'
|
55 |
-
'category'
|
56 |
-
'name'
|
57 |
-
'description'
|
58 |
-
'link'
|
59 |
-
'settings'
|
60 |
-
),
|
61 |
-
'contact-form-plugin/contact_form.php'
|
62 |
-
'category'
|
63 |
-
'name'
|
64 |
-
'description'
|
65 |
-
'link'
|
66 |
-
'settings'
|
67 |
-
'pro_version'
|
68 |
-
'purchase'
|
69 |
-
'pro_settings'
|
70 |
-
),
|
71 |
-
'contact-form-multi/contact-form-multi.php'
|
72 |
-
'category'
|
73 |
-
'name'
|
74 |
-
'description'
|
75 |
-
'link'
|
76 |
-
'settings'
|
77 |
-
'pro_version'
|
78 |
-
'purchase'
|
79 |
-
'pro_settings'
|
80 |
-
),
|
81 |
-
'contact-form-to-db/contact_form_to_db.php'
|
82 |
-
'category'
|
83 |
-
'name'
|
84 |
-
'description'
|
85 |
-
'link'
|
86 |
-
'settings'
|
87 |
-
'pro_version'
|
88 |
-
'purchase'
|
89 |
-
'pro_settings'
|
90 |
-
),
|
91 |
-
'custom-admin-page/custom-admin-page.php'
|
92 |
-
'category'
|
93 |
-
'name'
|
94 |
-
'description'
|
95 |
-
'link'
|
96 |
-
'settings'
|
97 |
-
'pro_version'
|
98 |
-
'purchase'
|
99 |
-
'pro_settings'
|
100 |
-
),
|
101 |
-
'custom-search-plugin/custom-search-plugin.php'
|
102 |
-
'category'
|
103 |
-
'name'
|
104 |
-
'description'
|
105 |
-
'link'
|
106 |
-
'settings'
|
107 |
-
'pro_version'
|
108 |
-
'purchase'
|
109 |
-
'pro_settings'
|
110 |
-
),
|
111 |
-
'donate-button/donate.php'
|
112 |
-
'category'
|
113 |
-
'name'
|
114 |
-
'description'
|
115 |
-
'link'
|
116 |
-
'settings'
|
117 |
-
),
|
118 |
-
'error-log-viewer/error-log-viewer.php'
|
119 |
-
'category'
|
120 |
-
'name'
|
121 |
-
'description'
|
122 |
-
'link'
|
123 |
-
'settings'
|
124 |
),
|
125 |
'facebook-button-plugin/facebook-button-plugin.php' => array(
|
126 |
-
'category'
|
127 |
-
'name'
|
128 |
-
'description'
|
129 |
-
'link'
|
130 |
-
'settings'
|
131 |
-
'pro_version'
|
132 |
-
'purchase'
|
133 |
-
'pro_settings'
|
134 |
-
),
|
135 |
-
'gallery-plugin/gallery-plugin.php'
|
136 |
-
'category'
|
137 |
-
'name'
|
138 |
-
'description'
|
139 |
-
'link'
|
140 |
-
'settings'
|
141 |
-
'pro_version'
|
142 |
-
'purchase'
|
143 |
-
'pro_settings'
|
144 |
),
|
145 |
'bws-google-2-step-verification/bws-google-2-step-verification.php' => array(
|
146 |
-
'category'
|
147 |
-
'name'
|
148 |
-
'description'
|
149 |
-
'link'
|
150 |
-
'settings'
|
151 |
-
'pro_version'
|
152 |
-
'purchase'
|
153 |
-
'pro_settings'
|
154 |
-
),
|
155 |
-
'adsense-plugin/adsense-plugin.php'
|
156 |
-
'category'
|
157 |
-
'name'
|
158 |
-
'description'
|
159 |
-
'link'
|
160 |
-
'settings'
|
161 |
-
'pro_version'
|
162 |
-
'purchase'
|
163 |
-
'pro_settings'
|
164 |
-
),
|
165 |
-
'bws-google-analytics/bws-google-analytics.php'
|
166 |
-
'category'
|
167 |
-
'name'
|
168 |
-
'description'
|
169 |
-
'link'
|
170 |
-
'settings'
|
171 |
-
'pro_version'
|
172 |
-
'purchase'
|
173 |
-
'pro_settings'
|
174 |
-
),
|
175 |
-
'google-captcha/google-captcha.php'
|
176 |
-
'category'
|
177 |
-
'name'
|
178 |
-
'description'
|
179 |
-
'link'
|
180 |
-
'settings'
|
181 |
-
'pro_version'
|
182 |
-
'purchase'
|
183 |
-
'pro_settings'
|
184 |
-
),
|
185 |
-
'bws-google-maps/bws-google-maps.php'
|
186 |
-
'category'
|
187 |
-
'name'
|
188 |
-
'description'
|
189 |
-
'link'
|
190 |
-
'settings'
|
191 |
-
'pro_version'
|
192 |
-
'purchase'
|
193 |
-
'pro_settings'
|
194 |
-
),
|
195 |
-
'google-sitemap-plugin/google-sitemap-plugin.php'
|
196 |
-
'category'
|
197 |
-
'name'
|
198 |
-
'description'
|
199 |
-
'link'
|
200 |
-
'settings'
|
201 |
-
'pro_version'
|
202 |
-
'purchase'
|
203 |
-
'pro_settings'
|
204 |
-
),
|
205 |
-
'google-shortlink/google-shortlink.php'
|
206 |
-
'category'
|
207 |
-
'name'
|
208 |
-
'description'
|
209 |
-
'link'
|
210 |
-
'settings'
|
211 |
-
),
|
212 |
-
'htaccess/htaccess.php'
|
213 |
-
'category'
|
214 |
-
'name'
|
215 |
-
'description'
|
216 |
-
'link'
|
217 |
-
'settings'
|
218 |
-
'pro_version'
|
219 |
-
'purchase'
|
220 |
-
'pro_settings'
|
221 |
-
),
|
222 |
-
'job-board/job-board.php'
|
223 |
-
'category'
|
224 |
-
'name'
|
225 |
-
'description'
|
226 |
-
'link'
|
227 |
-
'settings'
|
228 |
-
),
|
229 |
-
'limit-attempts/limit-attempts.php'
|
230 |
-
'category'
|
231 |
-
'name'
|
232 |
-
'description'
|
233 |
-
'link'
|
234 |
-
'settings'
|
235 |
-
'pro_version'
|
236 |
-
'purchase'
|
237 |
-
'pro_settings'
|
238 |
-
),
|
239 |
-
'bws-linkedin/bws-linkedin.php'
|
240 |
-
'category'
|
241 |
-
'name'
|
242 |
-
'description'
|
243 |
-
'link'
|
244 |
-
'settings'
|
245 |
-
'pro_version'
|
246 |
-
'purchase'
|
247 |
-
'pro_settings'
|
248 |
-
),
|
249 |
-
'multilanguage/multilanguage.php'
|
250 |
-
'category'
|
251 |
-
'name'
|
252 |
-
'description'
|
253 |
-
'link'
|
254 |
-
'settings'
|
255 |
-
'pro_version'
|
256 |
-
'purchase'
|
257 |
-
'pro_settings'
|
258 |
-
),
|
259 |
-
'pagination/pagination.php'
|
260 |
-
'category'
|
261 |
-
'name'
|
262 |
-
'description'
|
263 |
-
'link'
|
264 |
-
'settings'
|
265 |
-
'pro_version'
|
266 |
-
'purchase'
|
267 |
-
'pro_settings'
|
268 |
-
),
|
269 |
-
'pdf-print/pdf-print.php'
|
270 |
-
'category'
|
271 |
-
'name'
|
272 |
-
'description'
|
273 |
-
'link'
|
274 |
-
'settings'
|
275 |
-
'pro_version'
|
276 |
-
'purchase'
|
277 |
-
'pro_settings'
|
278 |
-
),
|
279 |
-
'bws-pinterest/bws-pinterest.php'
|
280 |
-
'category'
|
281 |
-
'name'
|
282 |
-
'description'
|
283 |
-
'link'
|
284 |
-
'settings'
|
285 |
-
'pro_version'
|
286 |
-
'purchase'
|
287 |
-
'pro_settings'
|
288 |
-
),
|
289 |
-
'portfolio/portfolio.php'
|
290 |
-
'category'
|
291 |
-
'name'
|
292 |
-
'description'
|
293 |
-
'link'
|
294 |
-
'settings'
|
295 |
-
'pro_version'
|
296 |
-
'purchase'
|
297 |
-
'pro_settings'
|
298 |
-
),
|
299 |
-
'post-to-csv/post-to-csv.php'
|
300 |
-
'category'
|
301 |
-
'name'
|
302 |
-
'description'
|
303 |
-
'link'
|
304 |
-
'settings'
|
305 |
-
'pro_version'
|
306 |
-
'purchase'
|
307 |
-
'pro_settings'
|
308 |
-
),
|
309 |
-
'profile-extra-fields/profile-extra-fields.php'
|
310 |
-
'category'
|
311 |
-
'name'
|
312 |
-
'description'
|
313 |
-
'link'
|
314 |
-
'settings'
|
315 |
-
'pro_version'
|
316 |
-
'purchase'
|
317 |
-
'pro_settings'
|
318 |
-
),
|
319 |
-
'promobar/promobar.php'
|
320 |
-
'category'
|
321 |
-
'name'
|
322 |
-
'description'
|
323 |
-
'link'
|
324 |
-
'settings'
|
325 |
-
'pro_version'
|
326 |
-
'purchase'
|
327 |
-
'pro_settings'
|
328 |
-
),
|
329 |
-
'quotes-and-tips/quotes-and-tips.php'
|
330 |
-
'category'
|
331 |
-
'name'
|
332 |
-
'description'
|
333 |
-
'link'
|
334 |
-
'settings'
|
335 |
-
),
|
336 |
-
'rating-bws/rating-bws.php'
|
337 |
-
'category'
|
338 |
-
'name'
|
339 |
-
'description'
|
340 |
-
'link'
|
341 |
-
'settings'
|
342 |
-
'pro_version'
|
343 |
-
'purchase'
|
344 |
-
'pro_settings'
|
345 |
-
),
|
346 |
-
'realty/realty.php'
|
347 |
-
'category'
|
348 |
-
'name'
|
349 |
-
'description'
|
350 |
-
'link'
|
351 |
-
'settings'
|
352 |
-
'pro_version'
|
353 |
-
'purchase'
|
354 |
-
'pro_settings'
|
355 |
-
),
|
356 |
-
'relevant/related-posts-plugin.php'
|
357 |
-
'category'
|
358 |
-
'name'
|
359 |
-
'description'
|
360 |
-
'link'
|
361 |
-
'settings'
|
362 |
-
),
|
363 |
-
'sender/sender.php'
|
364 |
-
'category'
|
365 |
-
'name'
|
366 |
-
'description'
|
367 |
-
'link'
|
368 |
-
'settings'
|
369 |
-
'pro_version'
|
370 |
-
'purchase'
|
371 |
-
'pro_settings'
|
372 |
-
),
|
373 |
-
'slider-bws/slider-bws.php'
|
374 |
-
'category'
|
375 |
-
'name'
|
376 |
-
'description'
|
377 |
-
'link'
|
378 |
-
'settings'
|
379 |
-
),
|
380 |
-
'bws-smtp/bws-smtp.php'
|
381 |
-
'category'
|
382 |
-
'name'
|
383 |
-
'description'
|
384 |
-
'link'
|
385 |
-
'settings'
|
386 |
-
),
|
387 |
-
'social-buttons-pack/social-buttons-pack.php'
|
388 |
-
'category'
|
389 |
-
'name'
|
390 |
-
'description'
|
391 |
-
'link'
|
392 |
-
'settings'
|
393 |
-
'pro_version'
|
394 |
-
'purchase'
|
395 |
-
'pro_settings'
|
396 |
-
),
|
397 |
-
'social-login-bws/social-login-bws.php'
|
398 |
-
'category'
|
399 |
-
'name'
|
400 |
-
'description'
|
401 |
-
'link'
|
402 |
-
'settings'
|
403 |
-
),
|
404 |
-
'subscriber/subscriber.php'
|
405 |
-
'category'
|
406 |
-
'name'
|
407 |
-
'description'
|
408 |
-
'link'
|
409 |
-
'settings'
|
410 |
-
'pro_version'
|
411 |
-
'purchase'
|
412 |
-
'pro_settings'
|
413 |
-
),
|
414 |
-
'bws-testimonials/bws-testimonials.php'
|
415 |
-
'category'
|
416 |
-
'name'
|
417 |
-
'description'
|
418 |
-
'link'
|
419 |
-
'settings'
|
420 |
-
),
|
421 |
-
'timesheet/timesheet.php'
|
422 |
-
'category'
|
423 |
-
'name'
|
424 |
-
'description'
|
425 |
-
'link'
|
426 |
-
'settings'
|
427 |
-
'pro_version'
|
428 |
-
'purchase'
|
429 |
-
'pro_settings'
|
430 |
-
),
|
431 |
-
'twitter-plugin/twitter.php'
|
432 |
-
'category'
|
433 |
-
'name'
|
434 |
-
'description'
|
435 |
-
'link'
|
436 |
-
'settings'
|
437 |
-
'pro_version'
|
438 |
-
'purchase'
|
439 |
-
'pro_settings'
|
440 |
-
),
|
441 |
-
'updater/updater.php'
|
442 |
-
'category'
|
443 |
-
'name'
|
444 |
-
'description'
|
445 |
-
'link'
|
446 |
-
'settings'
|
447 |
-
'pro_version'
|
448 |
-
'purchase'
|
449 |
-
'pro_settings'
|
450 |
-
),
|
451 |
-
'user-role/user-role.php'
|
452 |
-
'category'
|
453 |
-
'name'
|
454 |
-
'description'
|
455 |
-
'link'
|
456 |
-
'settings'
|
457 |
-
'pro_version'
|
458 |
-
'purchase'
|
459 |
-
'pro_settings'
|
460 |
-
),
|
461 |
-
'visitors-online/visitors-online.php'
|
462 |
-
'category'
|
463 |
-
'name'
|
464 |
-
'description'
|
465 |
-
'link'
|
466 |
-
'settings'
|
467 |
-
'pro_version'
|
468 |
-
'purchase'
|
469 |
-
'pro_settings'
|
470 |
-
),
|
471 |
-
'zendesk-help-center/zendesk-help-center.php'
|
472 |
-
'category'
|
473 |
-
'name'
|
474 |
-
'description'
|
475 |
-
'link'
|
476 |
-
'settings'
|
477 |
-
'pro_version'
|
478 |
-
'purchase'
|
479 |
-
'pro_settings'
|
480 |
-
)
|
481 |
);
|
482 |
|
483 |
$themes = array(
|
484 |
(object) array(
|
485 |
-
'name'
|
486 |
-
'slug'
|
487 |
-
'href'
|
488 |
),
|
489 |
(object) array(
|
490 |
-
'name'
|
491 |
-
'slug'
|
492 |
-
'href'
|
493 |
),
|
494 |
(object) array(
|
495 |
-
'name'
|
496 |
-
'slug'
|
497 |
-
'href'
|
498 |
),
|
499 |
(object) array(
|
500 |
-
'name'
|
501 |
-
'slug'
|
502 |
-
'href'
|
503 |
),
|
504 |
(object) array(
|
505 |
-
'name'
|
506 |
-
'slug'
|
507 |
-
'href'
|
508 |
-
)
|
509 |
);
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* BestWebSoft product list
|
4 |
+
*/
|
5 |
+
|
6 |
global $bws_plugin_info, $wp_version;
|
7 |
|
8 |
$bws_plugins_category = array(
|
9 |
+
'admin-tools' => array( 'name' => __( 'Admin Tools', 'bestwebsoft' ) ),
|
10 |
+
'content' => array( 'name' => __( 'Content', 'bestwebsoft' ) ),
|
11 |
+
'ecommerce' => array( 'name' => __( 'eCommerce', 'bestwebsoft' ) ),
|
12 |
+
'marketing' => array( 'name' => __( 'Marketing', 'bestwebsoft' ) ),
|
13 |
+
'navigation' => array( 'name' => __( 'Navigation', 'bestwebsoft' ) ),
|
14 |
+
'recommended' => array( 'name' => __( 'Recommended', 'bestwebsoft' ) ),
|
15 |
+
'security' => array( 'name' => __( 'Security', 'bestwebsoft' ) ),
|
16 |
+
'seo' => array( 'name' => __( 'SEO', 'bestwebsoft' ) ),
|
17 |
+
'smm' => array( 'name' => __( 'SMM', 'bestwebsoft' ) ),
|
18 |
);
|
19 |
|
20 |
$bws_plugins = array(
|
21 |
+
'bike-rental/bike-rental.php' => array(
|
22 |
+
'category' => array( 'ecommerce' ),
|
23 |
+
'name' => 'Bike Rental',
|
24 |
+
'description' => __( 'Give a birth for your bike rental and booking WordPress website.', 'bestwebsoft' ),
|
25 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/bike-rental/?k=04387cfc31fc8b9553e4741392762231&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
26 |
+
'settings' => 'edit.php?post_type=bws_bike&page=bkng_general_settings',
|
27 |
+
'pro_version' => 'bike-rental-pro/bike-rental-pro.php',
|
28 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/bike-rental/buy/?k=9b3222b005340035eaead38a7a495a0d&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
29 |
+
'pro_settings' => 'edit.php?post_type=bws_bike&page=bkrntl_bws_bike_settings',
|
30 |
+
'icon' => bws_menu_url( 'icons/plugins/' ) . 'bike-rental.png',
|
31 |
+
'install_url' => 'https://bestwebsoft.com/products/wordpress/plugins/bike-rental/',
|
32 |
+
),
|
33 |
+
'captcha-bws/captcha-bws.php' => array(
|
34 |
+
'category' => array( 'security', 'recommended' ),
|
35 |
+
'name' => 'Captcha',
|
36 |
+
'description' => __( 'Best secure captcha plugin to protect your WordPress forms.', 'bestwebsoft' ),
|
37 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/captcha/?k=d678516c0990e781edfb6a6c874f0b8a&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
38 |
+
'settings' => 'admin.php?page=captcha.php',
|
39 |
+
'pro_version' => 'captcha-pro/captcha_pro.php',
|
40 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/captcha/buy/?k=ff7d65e55e5e7f98f219be9ed711094e&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
41 |
+
'pro_settings' => 'admin.php?page=captcha_pro.php',
|
42 |
+
),
|
43 |
+
'bws-car-rental/bws-car-rental.php' => array(
|
44 |
+
'category' => array( 'ecommerce' ),
|
45 |
+
'name' => 'Car Rental V2',
|
46 |
+
'description' => __( 'Create your own rental website for car renting and booking.', 'bestwebsoft' ),
|
47 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/car-rental-v2/?k=ca43df54beefae7128a7005bce0ec651&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
48 |
+
'settings' => 'admin.php?page=bws-car-rental-settings',
|
49 |
+
'pro_version' => 'bws-car-rental-pro/bws-car-rental-pro.php',
|
50 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/car-rental-v2/buy/?k=63cac1b736047a3f5a2f5a7c5336f3c4&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
51 |
+
'pro_settings' => 'edit.php?post_type=bws_bkng_products&page=bws-car-rental-pro-settings',
|
52 |
+
'icon' => '//ps.w.org/car-rental/assets/icon-128x128.png',
|
53 |
+
'install_url' => 'https://bestwebsoft.com/products/wordpress/plugins/car-rental-v2/',
|
54 |
+
),
|
55 |
+
'columns-bws/columns-bws.php' => array(
|
56 |
+
'category' => array( 'content' ),
|
57 |
+
'name' => 'Columns',
|
58 |
+
'description' => __( 'Add columns with custom content to WordPress website pages, posts, widgets, etc.', 'bestwebsoft' ),
|
59 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/columns/?k=6d2cddc059a04e4d528cec14de47fb1e&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
60 |
+
'settings' => 'admin.php?page=columns-settings.php',
|
61 |
+
),
|
62 |
+
'contact-form-plugin/contact_form.php' => array(
|
63 |
+
'category' => array( 'marketing', 'recommended' ),
|
64 |
+
'name' => 'Contact Form',
|
65 |
+
'description' => __( 'Allow customers to reach you using secure contact form plugin any website must have.', 'bestwebsoft' ),
|
66 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/contact-form/?k=012327ef413e5b527883e031d43b088b&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
67 |
+
'settings' => 'admin.php?page=contact_form.php',
|
68 |
+
'pro_version' => 'contact-form-pro/contact_form_pro.php',
|
69 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/contact-form/buy/?k=773dc97bb3551975db0e32edca1a6d71&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
70 |
+
'pro_settings' => 'admin.php?page=contact_form_pro.php',
|
71 |
+
),
|
72 |
+
'contact-form-multi/contact-form-multi.php' => array(
|
73 |
+
'category' => array( 'marketing', 'recommended' ),
|
74 |
+
'name' => 'Contact Form Multi',
|
75 |
+
'description' => __( 'Add unlimited number of contact forms to WordPress website.', 'bestwebsoft' ),
|
76 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/contact-form-multi/?k=83cdd9e72a9f4061122ad28a67293c72&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
77 |
+
'settings' => '',
|
78 |
+
'pro_version' => 'contact-form-multi-pro/contact-form-multi-pro.php',
|
79 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/contact-form-multi/buy/?k=fde3a18581c143654f060c398b07e8ac&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
80 |
+
'pro_settings' => '',
|
81 |
+
),
|
82 |
+
'contact-form-to-db/contact_form_to_db.php' => array(
|
83 |
+
'category' => array( 'admin-tools', 'recommended' ),
|
84 |
+
'name' => 'Contact Form to DB',
|
85 |
+
'description' => __( 'Save and manage Contact Form messages. Never lose important data.', 'bestwebsoft' ),
|
86 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/contact-form-to-db/?k=ba3747d317c2692e4136ca096a8989d6&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
87 |
+
'settings' => 'admin.php?page=contact_form_to_db.php',
|
88 |
+
'pro_version' => 'contact-form-to-db-pro/contact_form_to_db_pro.php',
|
89 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/contact-form-to-db/buy/?k=6ce5f4a9006ec906e4db643669246c6a&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
90 |
+
'pro_settings' => 'admin.php?page=contact_form_to_db_pro.php',
|
91 |
+
),
|
92 |
+
'custom-admin-page/custom-admin-page.php' => array(
|
93 |
+
'category' => array( 'admin-tools' ),
|
94 |
+
'name' => 'Custom Admin Page',
|
95 |
+
'description' => __( 'Add unlimited custom pages to WordPress admin dashboard.', 'bestwebsoft' ),
|
96 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/custom-admin-page/?k=9ac03f16c25e845e8e055a221c3e1467&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
97 |
+
'settings' => 'edit.php?post_type=bws-admin_page&page=custom-admin-page.php',
|
98 |
+
'pro_version' => 'custom-admin-page-pro/custom-admin-page-pro.php',
|
99 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/custom-admin-page/buy/?k=b986f456dba092b537f1a7755a363be9&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
100 |
+
'pro_settings' => 'edit.php?post_type=bws-admin_page&page=custom-admin-page-pro.php',
|
101 |
+
),
|
102 |
+
'custom-search-plugin/custom-search-plugin.php' => array(
|
103 |
+
'category' => array( 'navigation' ),
|
104 |
+
'name' => 'Custom Search',
|
105 |
+
'description' => __( 'Add custom post types and taxonomies to WordPress website search results.', 'bestwebsoft' ),
|
106 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/custom-search/?k=933be8f3a8b8719d95d1079d15443e29&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
107 |
+
'settings' => 'admin.php?page=custom_search.php',
|
108 |
+
'pro_version' => 'custom-search-pro/custom-search-pro.php',
|
109 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/custom-search/buy/?k=062b652ac6ac8ba863c9f30fc21d62c6&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
110 |
+
'pro_settings' => 'admin.php?page=custom_search_pro.php',
|
111 |
+
),
|
112 |
+
'donate-button/donate.php' => array(
|
113 |
+
'category' => array( 'ecommerce' ),
|
114 |
+
'name' => 'Donate',
|
115 |
+
'description' => __( 'Add PayPal and 2CO donate buttons to receive charity payments.', 'bestwebsoft' ),
|
116 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/donate/?k=a8b2e2a56914fb1765dd20297c26401b&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
117 |
+
'settings' => 'admin.php?page=donate.php',
|
118 |
+
),
|
119 |
+
'error-log-viewer/error-log-viewer.php' => array(
|
120 |
+
'category' => array( 'admin-tools' ),
|
121 |
+
'name' => 'Error Log Viewer',
|
122 |
+
'description' => __( 'Get latest error log messages to diagnose website problems. Define and fix issues faster.', 'bestwebsoft' ),
|
123 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/error-log-viewer/?k=da0de8bd2c7a0b2fea5df64d55a368b3&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
124 |
+
'settings' => 'admin.php?page=rrrlgvwr.php&tab=settings',
|
125 |
),
|
126 |
'facebook-button-plugin/facebook-button-plugin.php' => array(
|
127 |
+
'category' => array( 'smm' ),
|
128 |
+
'name' => 'Like & Share',
|
129 |
+
'description' => __( 'Add Facebook Follow, Like, and Share buttons to WordPress posts, pages, and widgets.', 'bestwebsoft' ),
|
130 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/facebook-like-button/?k=05ec4f12327f55848335802581467d55&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
131 |
+
'settings' => 'admin.php?page=facebook-button-plugin.php',
|
132 |
+
'pro_version' => 'facebook-button-pro/facebook-button-pro.php',
|
133 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/facebook-like-button/buy/?k=8da168e60a831cfb3525417c333ad275&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
134 |
+
'pro_settings' => 'admin.php?page=facebook-button-pro.php',
|
135 |
+
),
|
136 |
+
'gallery-plugin/gallery-plugin.php' => array(
|
137 |
+
'category' => array( 'content', 'recommended' ),
|
138 |
+
'name' => 'Gallery',
|
139 |
+
'description' => __( 'Add beautiful galleries, albums & images to your WordPress website in a few clicks.', 'bestwebsoft' ),
|
140 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/gallery/?k=2da21c0a64eec7ebf16337fa134c5f78&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
141 |
+
'settings' => 'admin.php?page=gallery-plugin.php',
|
142 |
+
'pro_version' => 'gallery-plugin-pro/gallery-plugin-pro.php',
|
143 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/gallery/buy/?k=382e5ce7c96a6391f5ffa5e116b37fe0&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
144 |
+
'pro_settings' => 'admin.php?page=gallery-plugin-pro.php',
|
145 |
),
|
146 |
'bws-google-2-step-verification/bws-google-2-step-verification.php' => array(
|
147 |
+
'category' => array( 'security' ),
|
148 |
+
'name' => '2-Step Verification',
|
149 |
+
'description' => __( 'Stronger security solution which protects your WordPress website from hacks and unauthorized login attempts.', 'bestwebsoft' ),
|
150 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/google-2-step-verification/?k=78de1a525f968d56e39f7325908aa98e&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
151 |
+
'settings' => 'admin.php?page=google-2-step-verification.php',
|
152 |
+
'pro_version' => 'bws-google-2-step-verification-pro/bws-google-2-step-verification-pro.php',
|
153 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/google-2-step-verification/buy/?k=b5605ea9bb3628682cfa416e70e78410&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
154 |
+
'pro_settings' => 'admin.php?page=google-2-step-verification-pro.php',
|
155 |
+
),
|
156 |
+
'adsense-plugin/adsense-plugin.php' => array(
|
157 |
+
'category' => array( 'marketing' ),
|
158 |
+
'name' => 'Google Ads',
|
159 |
+
'description' => __( 'Add Adsense ads to WordPress website pages, posts, custom posts, search results, categories, tags, and widgets.', 'bestwebsoft' ),
|
160 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/google-adsense/?k=60e3979921e354feb0347e88e7d7b73d&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
161 |
+
'settings' => 'admin.php?page=adsense-plugin.php',
|
162 |
+
'pro_version' => 'adsense-pro/adsense-pro.php',
|
163 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/google-adsense/buy/?k=c23889b293d62aa1ad2c96513405f0e1&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
164 |
+
'pro_settings' => 'admin.php?page=adsense-pro.php',
|
165 |
+
),
|
166 |
+
'bws-google-analytics/bws-google-analytics.php' => array(
|
167 |
+
'category' => array( 'admin-tools' ),
|
168 |
+
'name' => 'Analytics',
|
169 |
+
'description' => __( 'Add Google Analytics code to WordPress website and track basic stats.', 'bestwebsoft' ),
|
170 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/bws-google-analytics/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
171 |
+
'settings' => 'admin.php?page=bws-google-analytics.php',
|
172 |
+
'pro_version' => 'bws-google-analytics-pro/bws-google-analytics-pro.php',
|
173 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/bws-google-analytics/buy/?k=83796e84fec3f70ecfcc8894a73a6c4a&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
174 |
+
'pro_settings' => 'admin.php?page=bws-google-analytics-pro.php',
|
175 |
+
),
|
176 |
+
'google-captcha/google-captcha.php' => array(
|
177 |
+
'category' => array( 'security', 'recommended' ),
|
178 |
+
'name' => 'reCaptcha',
|
179 |
+
'description' => __( 'Protect WordPress website forms from spam entries with reCaptcha.', 'bestwebsoft' ),
|
180 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/google-captcha/?k=7b59fbe542acf950b29f3e020d5ad735&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
181 |
+
'settings' => 'admin.php?page=google-captcha.php',
|
182 |
+
'pro_version' => 'google-captcha-pro/google-captcha-pro.php',
|
183 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/google-captcha/buy/?k=773d30149acf1edc32e5c0766b96c134&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
184 |
+
'pro_settings' => 'admin.php?page=google-captcha-pro.php',
|
185 |
+
),
|
186 |
+
'bws-google-maps/bws-google-maps.php' => array(
|
187 |
+
'category' => array( 'content' ),
|
188 |
+
'name' => 'Maps',
|
189 |
+
'description' => __( 'Add customized Google maps to WordPress posts, pages and widgets.', 'bestwebsoft' ),
|
190 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/bws-google-maps/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
191 |
+
'settings' => 'admin.php?page=bws-google-maps.php',
|
192 |
+
'pro_version' => 'bws-google-maps-pro/bws-google-maps-pro.php',
|
193 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/bws-google-maps/buy/?k=117c3f9fc17f2c83ef430a8a9dc06f56&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
194 |
+
'pro_settings' => 'admin.php?page=bws-google-maps-pro.php',
|
195 |
+
),
|
196 |
+
'google-sitemap-plugin/google-sitemap-plugin.php' => array(
|
197 |
+
'category' => array( 'seo', 'recommended' ),
|
198 |
+
'name' => 'Sitemap',
|
199 |
+
'description' => __( 'Generate and add XML sitemap to WordPress website. Help search engines index your blog.', 'bestwebsoft' ),
|
200 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/google-sitemap/?k=5202b2f5ce2cf85daee5e5f79a51d806&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
201 |
+
'settings' => 'admin.php?page=google-sitemap-plugin.php',
|
202 |
+
'pro_version' => 'google-sitemap-pro/google-sitemap-pro.php',
|
203 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/google-sitemap/buy/?k=7ea384a5cc36cb4c22741caa20dcd56d&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
204 |
+
'pro_settings' => 'admin.php?page=google-sitemap-pro.php',
|
205 |
+
),
|
206 |
+
'google-shortlink/google-shortlink.php' => array(
|
207 |
+
'category' => array( 'seo' ),
|
208 |
+
'name' => 'Shortlink',
|
209 |
+
'description' => __( 'Replace external WordPress website links with Google shortlinks and track click stats.', 'bestwebsoft' ),
|
210 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/google-shortlink/?k=afcf3eaed021bbbbeea1090e16bc22db&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
211 |
+
'settings' => 'admin.php?page=gglshrtlnk_options',
|
212 |
+
),
|
213 |
+
'htaccess/htaccess.php' => array(
|
214 |
+
'category' => array( 'security' ),
|
215 |
+
'name' => 'Htaccess',
|
216 |
+
'description' => __( 'Protect WordPress website – allow and deny access for certain IP addresses, hostnames, etc.', 'bestwebsoft' ),
|
217 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/htaccess/?k=2b865fcd56a935d22c5c4f1bba52ed46&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
218 |
+
'settings' => 'admin.php?page=htaccess.php',
|
219 |
+
'pro_version' => 'htaccess-pro/htaccess-pro.php',
|
220 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/htaccess/buy/?k=59e9209a32864be534fda77d5e591c15&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
221 |
+
'pro_settings' => 'admin.php?page=htaccess-pro.php',
|
222 |
+
),
|
223 |
+
'job-board/job-board.php' => array(
|
224 |
+
'category' => array( 'ecommerce' ),
|
225 |
+
'name' => 'Job Board',
|
226 |
+
'description' => __( 'Create your personal job board and listing WordPress website. Search jobs, submit CV/resumes, choose candidates.', 'bestwebsoft' ),
|
227 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/job-board/?k=b0c504c9ce6edd6692e04222af3fed6f&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
228 |
+
'settings' => 'admin.php?page=job-board.php',
|
229 |
+
),
|
230 |
+
'limit-attempts/limit-attempts.php' => array(
|
231 |
+
'category' => array( 'security', 'recommended' ),
|
232 |
+
'name' => 'Limit Attempts',
|
233 |
+
'description' => __( 'Protect WordPress website against brute force attacks. Limit rate of login attempts.', 'bestwebsoft' ),
|
234 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/limit-attempts/?k=b14e1697ee4d008abcd4bd34d492573a&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
235 |
+
'settings' => 'admin.php?page=limit-attempts.php',
|
236 |
+
'pro_version' => 'limit-attempts-pro/limit-attempts-pro.php',
|
237 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/limit-attempts/buy/?k=9d42cdf22c7fce2c4b6b447e6a2856e0&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
238 |
+
'pro_settings' => 'admin.php?page=limit-attempts-pro.php',
|
239 |
+
),
|
240 |
+
'bws-linkedin/bws-linkedin.php' => array(
|
241 |
+
'category' => array( 'smm' ),
|
242 |
+
'name' => 'LinkedIn',
|
243 |
+
'description' => __( 'Add LinkedIn Share and Follow buttons to WordPress posts, pages and widgets. 5 plugins included – profile, insider, etc.', 'bestwebsoft' ),
|
244 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/linkedin/?k=d63c7319622ccc5f589dd2d545c1d77c&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
245 |
+
'settings' => 'admin.php?page=linkedin.php',
|
246 |
+
'pro_version' => 'bws-linkedin-pro/bws-linkedin-pro.php',
|
247 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/linkedin/buy/?k=41dcc36192994408d24b103a02134567&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
248 |
+
'pro_settings' => 'admin.php?page=linkedin-pro.php',
|
249 |
+
),
|
250 |
+
'multilanguage/multilanguage.php' => array(
|
251 |
+
'category' => array( 'content', 'recommended' ),
|
252 |
+
'name' => 'Multilanguage',
|
253 |
+
'description' => __( 'Translate WordPress website content to other languages manually. Create multilingual pages, posts, widgets, menus, etc.', 'bestwebsoft' ),
|
254 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/multilanguage/?k=7d68c7bfec2486dc350c67fff57ad433&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
255 |
+
'settings' => 'admin.php?page=mltlngg_settings',
|
256 |
+
'pro_version' => 'multilanguage-pro/multilanguage-pro.php',
|
257 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/multilanguage/buy/?k=2d1121cd9a5ced583fc29eefd51bdf57&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
258 |
+
'pro_settings' => 'admin.php?page=mltlnggpr_settings',
|
259 |
+
),
|
260 |
+
'pagination/pagination.php' => array(
|
261 |
+
'category' => array( 'navigation' ),
|
262 |
+
'name' => 'Pagination',
|
263 |
+
'description' => __( 'Add customizable pagination to WordPress website. Split long content to multiple pages for better navigation.', 'bestwebsoft' ),
|
264 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/pagination/?k=22adb940256f149559ba8fedcd728ac8&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
265 |
+
'settings' => 'admin.php?page=pagination.php',
|
266 |
+
'pro_version' => 'pagination-pro/pagination-pro.php',
|
267 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/pagination/buy/?k=b87201d5a0505c621d0b14f4e8d4ccd6&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
268 |
+
'pro_settings' => 'admin.php?page=pagination-pro.php',
|
269 |
+
),
|
270 |
+
'pdf-print/pdf-print.php' => array(
|
271 |
+
'category' => array( 'content' ),
|
272 |
+
'name' => 'PDF & Print',
|
273 |
+
'description' => __( 'Generate PDF files and print WordPress posts/pages. Customize document header/footer styles and appearance.', 'bestwebsoft' ),
|
274 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/pdf-print/?k=bfefdfb522a4c0ff0141daa3f271840c&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
275 |
+
'settings' => 'admin.php?page=pdf-print.php',
|
276 |
+
'pro_version' => 'pdf-print-pro/pdf-print-pro.php',
|
277 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/pdf-print/buy/?k=fd43a0e659ddc170a9060027cbfdcc3a&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
278 |
+
'pro_settings' => 'admin.php?page=pdf-print-pro.php',
|
279 |
+
),
|
280 |
+
'bws-pinterest/bws-pinterest.php' => array(
|
281 |
+
'category' => array( 'smm' ),
|
282 |
+
'name' => 'Pinterest',
|
283 |
+
'description' => __( 'Add Pinterest Follow, Pin It buttons and profile widgets (Pin, Board, Profile) to WordPress posts, pages and widgets.', 'bestwebsoft' ),
|
284 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/pinterest/?k=504107b6213f247a67fe7ffb94e97c78&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
285 |
+
'settings' => 'admin.php?page=pinterest.php',
|
286 |
+
'pro_version' => 'bws-pinterest-pro/bws-pinterest-pro.php',
|
287 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/pinterest/buy/?k=ab0069edd1914a3ca8f541bfd88bb0bb&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
288 |
+
'pro_settings' => 'admin.php?page=pinterest-pro.php',
|
289 |
+
),
|
290 |
+
'portfolio/portfolio.php' => array(
|
291 |
+
'category' => array( 'content', 'recommended' ),
|
292 |
+
'name' => 'Portfolio',
|
293 |
+
'description' => __( 'Create your personal portfolio WordPress website. Manage and showcase past projects to get more clients.', 'bestwebsoft' ),
|
294 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/portfolio/?k=1249a890c5b7bba6bda3f528a94f768b&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
295 |
+
'settings' => 'admin.php?page=portfolio.php',
|
296 |
+
'pro_version' => 'portfolio-pro/portfolio-pro.php',
|
297 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/portfolio/buy/?k=2cc716026197d36538a414b728e49fdd&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
298 |
+
'pro_settings' => 'admin.php?page=portfolio-pro.php',
|
299 |
+
),
|
300 |
+
'post-to-csv/post-to-csv.php' => array(
|
301 |
+
'category' => array( 'admin-tools' ),
|
302 |
+
'name' => 'Post to CSV',
|
303 |
+
'description' => __( 'Export WordPress posts to CSV file format easily. Configure data order.', 'bestwebsoft' ),
|
304 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/post-to-csv/?k=653aa55518ae17409293a7a894268b8f&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
305 |
+
'settings' => 'admin.php?page=post-to-csv.php',
|
306 |
+
'pro_version' => 'post-to-csv-pro/post-to-csv-pro.php',
|
307 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/post-to-csv/buy/?k=b6521601d1579ed9c556ba98234f2d8f&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
308 |
+
'pro_settings' => 'admin.php?page=post-to-csv-pro.php',
|
309 |
+
),
|
310 |
+
'profile-extra-fields/profile-extra-fields.php' => array(
|
311 |
+
'category' => array( 'admin-tools' ),
|
312 |
+
'name' => 'Profile Extra Fields',
|
313 |
+
'description' => __( 'Add extra fields to default WordPress user profile. The easiest way to create and manage additional custom values.', 'bestwebsoft' ),
|
314 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/profile-extra-fields/?k=fe3b6c3dbc80bd4b1cf9a27a2f339820&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
315 |
+
'settings' => 'admin.php?page=profile-extra-fields.php',
|
316 |
+
'pro_version' => 'profile-extra-fields-pro/profile-extra-fields-pro.php',
|
317 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/profile-extra-fields/buy/?k=a1f0b20e50ea10e5453aba399de496c0&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
318 |
+
'pro_settings' => 'admin.php?page=profile-extra-fields-pro.php',
|
319 |
+
),
|
320 |
+
'promobar/promobar.php' => array(
|
321 |
+
'category' => array( 'marketing' ),
|
322 |
+
'name' => 'PromoBar',
|
323 |
+
'description' => __( 'Add and display HTML advertisement banner on WordPress website. Customize bar styles and appearance.', 'bestwebsoft' ),
|
324 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/promobar/?k=619eac2232d9cfa382c4e678c3b14766&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
325 |
+
'settings' => 'admin.php?page=promobar.php',
|
326 |
+
'pro_version' => 'promobar-pro/promobar-pro.php',
|
327 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/promobar/buy/?k=a9b09708502f12a1483532ba12fe2103&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
328 |
+
'pro_settings' => 'admin.php?page=promobar-pro.php',
|
329 |
+
),
|
330 |
+
'quotes-and-tips/quotes-and-tips.php' => array(
|
331 |
+
'category' => array( 'content' ),
|
332 |
+
'name' => 'Quotes and Tips',
|
333 |
+
'description' => __( 'Add customizable quotes and tips blocks to WordPress posts, pages and widgets.', 'bestwebsoft' ),
|
334 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/quotes-and-tips/?k=5738a4e85a798c4a5162240c6515098d&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
335 |
+
'settings' => 'admin.php?page=quotes-and-tips.php',
|
336 |
+
),
|
337 |
+
'rating-bws/rating-bws.php' => array(
|
338 |
+
'category' => array( 'marketing' ),
|
339 |
+
'name' => 'Rating',
|
340 |
+
'description' => __( 'Add rating plugin to your WordPress website to receive feedback from your customers.', 'bestwebsoft' ),
|
341 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/rating/?k=c00e0824bb999735a3224616ef51f4c5&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
342 |
+
'settings' => 'admin.php?page=rating.php',
|
343 |
+
'pro_version' => 'rating-bws-pro/rating-bws-pro.php',
|
344 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/rating/buy/?k=ba459f3115edb7be610e8d6f8e05df6c&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
345 |
+
'pro_settings' => 'admin.php?page=rating-bws-pro.php',
|
346 |
+
),
|
347 |
+
'realty/realty.php' => array(
|
348 |
+
'category' => array( 'ecommerce' ),
|
349 |
+
'name' => 'Realty',
|
350 |
+
'description' => __( 'Create your personal real estate WordPress website. Sell, rent and buy properties. Add, search and browse listings easily.', 'bestwebsoft' ),
|
351 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/realty/?k=d55de979dbbbb7af0b2ff1d7f43884fa&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
352 |
+
'settings' => 'admin.php?page=realty_settings',
|
353 |
+
'pro_version' => 'realty-pro/realty-pro.php',
|
354 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/realty/buy/?k=c7791f0a72acfb36f564a614dbccb474&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
355 |
+
'pro_settings' => 'admin.php?page=realty_pro_settings',
|
356 |
+
),
|
357 |
+
'relevant/related-posts-plugin.php' => array(
|
358 |
+
'category' => array( 'marketing', 'recommended' ),
|
359 |
+
'name' => 'Relevant - Related, Featured, Latest, and Popular Posts',
|
360 |
+
'description' => __( 'Add related, featured, latest, and popular posts to your WordPress website. Connect your blog readers with a relevant content.', 'bestwebsoft' ),
|
361 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/related-posts/?k=73fb737037f7141e66415ec259f7e426&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
362 |
+
'settings' => 'admin.php?page=related-posts-plugin.php',
|
363 |
+
),
|
364 |
+
'sender/sender.php' => array(
|
365 |
+
'category' => array( 'marketing', 'recommended' ),
|
366 |
+
'name' => 'Sender',
|
367 |
+
'description' => __( 'Send bulk email messages to WordPress users. Custom templates, advanced settings and detailed reports.', 'bestwebsoft' ),
|
368 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/sender/?k=89c297d14ba85a8417a0f2fc05e089c7&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
369 |
+
'settings' => 'admin.php?page=sndr_settings',
|
370 |
+
'pro_version' => 'sender-pro/sender-pro.php',
|
371 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/sender/buy/?k=dc5d1a87bdc8aeab2de40ffb99b38054&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
372 |
+
'pro_settings' => 'admin.php?page=sndrpr_settings',
|
373 |
+
),
|
374 |
+
'slider-bws/slider-bws.php' => array(
|
375 |
+
'category' => array( 'content' ),
|
376 |
+
'name' => 'Slider',
|
377 |
+
'description' => __( 'The best responsive slider plugin for your WordPress website. Create beautifully animated slides just in a few clicks.', 'bestwebsoft' ),
|
378 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/slider/?k=02acebf8531b2995e7de8474ae28e290&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
379 |
+
'settings' => 'admin.php?page=slider-settings.php',
|
380 |
+
),
|
381 |
+
'bws-smtp/bws-smtp.php' => array(
|
382 |
+
'category' => array( 'admin-tools' ),
|
383 |
+
'name' => 'SMTP',
|
384 |
+
'description' => __( 'Configure SMTP server to receive email messages from WordPress to Gmail, Yahoo, Hotmail and other services.', 'bestwebsoft' ),
|
385 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/smtp/?k=0546419f962704429ad2d9b88567752f&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
386 |
+
'settings' => 'admin.php?page=bwssmtp_settings',
|
387 |
+
),
|
388 |
+
'social-buttons-pack/social-buttons-pack.php' => array(
|
389 |
+
'category' => array( 'smm', 'recommended' ),
|
390 |
+
'name' => 'Social Buttons Pack',
|
391 |
+
'description' => __( 'Add social media buttons and widgets to WordPress posts, pages and widgets. FB, Twitter, Pinterest, LinkedIn.', 'bestwebsoft' ),
|
392 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/social-buttons-pack/?k=b6440fad9f54274429e536b0c61b42da&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
393 |
+
'settings' => 'admin.php?page=social-buttons.php',
|
394 |
+
'pro_version' => 'social-buttons-pack-pro/social-buttons-pack-pro.php',
|
395 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/social-buttons-pack/buy/?k=e7059cacde0d275b224a5d995c9160fd&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
396 |
+
'pro_settings' => 'admin.php?page=social-buttons-pro.php',
|
397 |
+
),
|
398 |
+
'social-login-bws/social-login-bws.php' => array(
|
399 |
+
'category' => array( 'smm' ),
|
400 |
+
'name' => 'Social Login',
|
401 |
+
'description' => __( 'Add social media login, registration, and commenting to your WordPress website.', 'bestwebsoft' ),
|
402 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/social-login/?k=62817c9c94f24129e40894e1d9c3f49d&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
403 |
+
'settings' => 'admin.php?page=social-login.php',
|
404 |
+
),
|
405 |
+
'subscriber/subscriber.php' => array(
|
406 |
+
'category' => array( 'marketing', 'recommended' ),
|
407 |
+
'name' => 'Subscriber',
|
408 |
+
'description' => __( 'Add email newsletter sign up form to WordPress posts, pages and widgets. Collect data and subscribe your users.', 'bestwebsoft' ),
|
409 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/subscriber/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
410 |
+
'settings' => 'admin.php?page=subscriber.php',
|
411 |
+
'pro_version' => 'subscriber-pro/subscriber-pro.php',
|
412 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/subscriber/buy/?k=02dbb8b549925d9b74e70adc2a7282e4&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
413 |
+
'pro_settings' => 'admin.php?page=subscriber-pro.php',
|
414 |
+
),
|
415 |
+
'bws-testimonials/bws-testimonials.php' => array(
|
416 |
+
'category' => array( 'marketing', 'recommended' ),
|
417 |
+
'name' => 'Testimonials',
|
418 |
+
'description' => __( 'Add testimonials and feedbacks from your customers to WordPress website posts, pages, and widgets.', 'bestwebsoft' ),
|
419 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/testimonials/?k=3fe4bb89dc901c98e43a113e08f8db73&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
420 |
+
'settings' => 'admin.php?page=testimonials.php',
|
421 |
+
),
|
422 |
+
'timesheet/timesheet.php' => array(
|
423 |
+
'category' => array( 'admin-tools' ),
|
424 |
+
'name' => 'Timesheet',
|
425 |
+
'description' => __( 'Best timesheet plugin for WordPress. Track employee time, streamline attendance and generate reports.', 'bestwebsoft' ),
|
426 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/timesheet/?k=06a58bb78c17a43df01825925f05a5c1&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
427 |
+
'settings' => 'admin.php?page=timesheet_settings',
|
428 |
+
'pro_version' => 'timesheet-pro/timesheet-pro.php',
|
429 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/timesheet/buy/?k=a448ce4cab0d365b7774c9bc3903b851&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
430 |
+
'pro_settings' => 'admin.php?page=timesheet_pro_settings',
|
431 |
+
),
|
432 |
+
'twitter-plugin/twitter.php' => array(
|
433 |
+
'category' => array( 'smm' ),
|
434 |
+
'name' => 'Twitter',
|
435 |
+
'description' => __( 'Add Twitter Follow, Tweet, Hashtag, and Mention buttons to WordPress posts and pages.', 'bestwebsoft' ),
|
436 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/twitter/?k=f8cb514e25bd7ec4974d64435c5eb333&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
437 |
+
'settings' => 'admin.php?page=twitter.php',
|
438 |
+
'pro_version' => 'twitter-pro/twitter-pro.php',
|
439 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/twitter/buy/?k=63ecbf0cc9cebf060b5a3c9362299700&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
440 |
+
'pro_settings' => 'admin.php?page=twitter-pro.php',
|
441 |
+
),
|
442 |
+
'updater/updater.php' => array(
|
443 |
+
'category' => array( 'admin-tools', 'recommended' ),
|
444 |
+
'name' => 'Updater',
|
445 |
+
'description' => __( 'Automatically check and update WordPress website core with all installed plugins and themes to the latest versions.', 'bestwebsoft' ),
|
446 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/updater/?k=66f3ecd4c1912009d395c4bb30f779d1&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
447 |
+
'settings' => 'admin.php?page=updater-options',
|
448 |
+
'pro_version' => 'updater-pro/updater_pro.php',
|
449 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/updater/buy/?k=cf633acbefbdff78545347fe08a3aecb&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
450 |
+
'pro_settings' => 'admin.php?page=updater-pro-options',
|
451 |
+
),
|
452 |
+
'user-role/user-role.php' => array(
|
453 |
+
'category' => array( 'admin-tools' ),
|
454 |
+
'name' => 'User Role',
|
455 |
+
'description' => __( 'Powerful user role management plugin for WordPress website. Create, edit, copy, and delete user roles.', 'bestwebsoft' ),
|
456 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/user-role/?k=dfe2244835c6fbf601523964b3f34ccc&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
457 |
+
'settings' => 'admin.php?page=user-role.php',
|
458 |
+
'pro_version' => 'user-role-pro/user-role-pro.php',
|
459 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/user-role/buy/?k=cfa9cea6613fb3d7c0a3622fa2faaf46&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
460 |
+
'pro_settings' => 'admin.php?page=user-role-pro.php',
|
461 |
+
),
|
462 |
+
'visitors-online/visitors-online.php' => array(
|
463 |
+
'category' => array( 'admin-tools' ),
|
464 |
+
'name' => 'Visitors Online',
|
465 |
+
'description' => __( 'Display live count of online visitors who are currently browsing your WordPress website.', 'bestwebsoft' ),
|
466 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/visitors-online/?k=93c28013a4f830671b3bba9502ed5177&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
467 |
+
'settings' => 'admin.php?page=visitors-online.php',
|
468 |
+
'pro_version' => 'visitors-online-pro/visitors-online-pro.php',
|
469 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/visitors-online/buy/?k=f9a746075ff8a0a6cb192cb46526afd2&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
470 |
+
'pro_settings' => 'admin.php?page=visitors-online-pro.php',
|
471 |
+
),
|
472 |
+
'zendesk-help-center/zendesk-help-center.php' => array(
|
473 |
+
'category' => array( 'admin-tools' ),
|
474 |
+
'name' => 'Help Center',
|
475 |
+
'description' => __( 'Backup and export Zendesk Help Center content automatically to your WordPress website database.', 'bestwebsoft' ),
|
476 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/zendesk-help-center/?k=2a5fd2f4b2f4bde46f2ca44b8d15846d&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
477 |
+
'settings' => 'admin.php?page=zendesk_hc.php',
|
478 |
+
'pro_version' => 'zendesk-help-center-pro/zendesk-help-center-pro.php',
|
479 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/zendesk-help-center/buy/?k=45199e4538b5befe4d9566868a61a3aa&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
480 |
+
'pro_settings' => 'admin.php?page=zendesk_hc_pro.php',
|
481 |
+
),
|
482 |
);
|
483 |
|
484 |
$themes = array(
|
485 |
(object) array(
|
486 |
+
'name' => 'Opening',
|
487 |
+
'slug' => 'opening',
|
488 |
+
'href' => 'https://bestwebsoft.com/products/wordpress/themes/opening-job-board-wordpress-theme/',
|
489 |
),
|
490 |
(object) array(
|
491 |
+
'name' => 'Real Estate',
|
492 |
+
'slug' => 'realestate',
|
493 |
+
'href' => 'https://bestwebsoft.com/products/wordpress/themes/real-estate-creative-wordpress-theme/',
|
494 |
),
|
495 |
(object) array(
|
496 |
+
'name' => 'Rent a Bike',
|
497 |
+
'slug' => 'rent-a-bike',
|
498 |
+
'href' => 'https://bestwebsoft.com/products/wordpress/themes/rent-a-bike-booking-wordpress-theme/',
|
499 |
),
|
500 |
(object) array(
|
501 |
+
'name' => 'Renty',
|
502 |
+
'slug' => 'renty',
|
503 |
+
'href' => 'https://bestwebsoft.com/products/wordpress/themes/renty-car-rental-booking-wordpress-theme/',
|
504 |
),
|
505 |
(object) array(
|
506 |
+
'name' => 'Unity',
|
507 |
+
'slug' => 'unity',
|
508 |
+
'href' => 'https://bestwebsoft.com/products/wordpress/themes/unity-multipurpose-wordpress-theme/',
|
509 |
+
),
|
510 |
);
|
google-sitemap-plugin.php
CHANGED
@@ -6,7 +6,7 @@ Description: Generate and add XML sitemap to WordPress website. Help search engi
|
|
6 |
Author: BestWebSoft
|
7 |
Text Domain: google-sitemap-plugin
|
8 |
Domain Path: /languages
|
9 |
-
Version: 3.2.
|
10 |
Author URI: https://bestwebsoft.com/
|
11 |
License: GPLv2 or later
|
12 |
*/
|
@@ -478,8 +478,7 @@ if ( ! function_exists( 'gglstmp_prepare_sitemap' ) ) {
|
|
478 |
|
479 |
if ( $gglstmp_options['media_sitemap'] ) {
|
480 |
|
481 |
-
/* Prepear
|
482 |
-
$video_list = get_attached_media( 'video', $post );
|
483 |
$image_list = get_attached_media( 'image', $post );
|
484 |
|
485 |
/* Add image to list */
|
@@ -511,26 +510,7 @@ if ( ! function_exists( 'gglstmp_prepare_sitemap' ) ) {
|
|
511 |
'url' => get_permalink( $post ),
|
512 |
'image_list' => $image_item
|
513 |
);
|
514 |
-
}
|
515 |
-
/* Add video to list */
|
516 |
-
$video_item = array();
|
517 |
-
if ( ! empty( $video_list ) ) {
|
518 |
-
$video_count = 0;
|
519 |
-
foreach ( $video_list as $video ) {
|
520 |
-
$video_count ++;
|
521 |
-
if ( $video_count > 1000 ) {
|
522 |
-
break;
|
523 |
-
}
|
524 |
-
$video_info[] = $video->guid;
|
525 |
-
$video_info[] = $video->post_title;
|
526 |
-
$video_item[] = $video_info;
|
527 |
-
}
|
528 |
-
/* Add array video_elements of one post */
|
529 |
-
$video_elements[] = array(
|
530 |
-
'url' => get_permalink( $post ),
|
531 |
-
'video_list_url' => $video_item
|
532 |
-
);
|
533 |
-
}
|
534 |
}
|
535 |
|
536 |
/* Data for default sitemap */
|
@@ -539,9 +519,34 @@ if ( ! function_exists( 'gglstmp_prepare_sitemap' ) ) {
|
|
539 |
'date' => date( 'Y-m-d\TH:i:sP', strtotime( $post->post_modified ) ),
|
540 |
'frequency' => $frequency,
|
541 |
'priority' => $priority
|
542 |
-
);
|
543 |
}
|
544 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
}
|
546 |
}
|
547 |
|
@@ -940,7 +945,7 @@ if ( ! function_exists( 'gglstmp_if_file_exists' ) ) {
|
|
940 |
}
|
941 |
|
942 |
if ( $echo ) {
|
943 |
-
echo $format;
|
944 |
}
|
945 |
|
946 |
return $format;
|
6 |
Author: BestWebSoft
|
7 |
Text Domain: google-sitemap-plugin
|
8 |
Domain Path: /languages
|
9 |
+
Version: 3.2.6
|
10 |
Author URI: https://bestwebsoft.com/
|
11 |
License: GPLv2 or later
|
12 |
*/
|
478 |
|
479 |
if ( $gglstmp_options['media_sitemap'] ) {
|
480 |
|
481 |
+
/* Prepear image_list data for sitemap */
|
|
|
482 |
$image_list = get_attached_media( 'image', $post );
|
483 |
|
484 |
/* Add image to list */
|
510 |
'url' => get_permalink( $post ),
|
511 |
'image_list' => $image_item
|
512 |
);
|
513 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
}
|
515 |
|
516 |
/* Data for default sitemap */
|
519 |
'date' => date( 'Y-m-d\TH:i:sP', strtotime( $post->post_modified ) ),
|
520 |
'frequency' => $frequency,
|
521 |
'priority' => $priority
|
522 |
+
);
|
523 |
}
|
524 |
}
|
525 |
+
/* Prepear video_list data for sitemap */
|
526 |
+
$attachments = get_posts( array( 'post_type' => 'attachment' ) );
|
527 |
+
$video_item = array();
|
528 |
+
if ( ! empty( $posts ) ) {
|
529 |
+
$video_count = 0;
|
530 |
+
foreach ( $attachments as $video ) {
|
531 |
+
if ( str_contains( $video->post_mime_type, 'video' ) ) {
|
532 |
+
/* Add video to list */
|
533 |
+
$video_count ++;
|
534 |
+
if ( $video_count > 1000 ) {
|
535 |
+
break;
|
536 |
+
}
|
537 |
+
$video_info[] = $video->guid;
|
538 |
+
$video_info[] = $video->post_title;
|
539 |
+
$video_item[] = $video_info;
|
540 |
+
|
541 |
+
if ( ! in_array( get_permalink( $video ), array_column( $video_elements, 'url' ) ) ) {
|
542 |
+
$video_elements[] = array(
|
543 |
+
'url' => get_permalink( $video ),
|
544 |
+
'video_list_url' => $video_item
|
545 |
+
);
|
546 |
+
}
|
547 |
+
}
|
548 |
+
}
|
549 |
+
}
|
550 |
}
|
551 |
}
|
552 |
|
945 |
}
|
946 |
|
947 |
if ( $echo ) {
|
948 |
+
echo esc_attr( $format );
|
949 |
}
|
950 |
|
951 |
return $format;
|
includes/class-gglstmp-settings.php
CHANGED
@@ -158,13 +158,13 @@ if ( ! class_exists( 'Gglstmp_Settings_Tabs' ) ) {
|
|
158 |
|
159 |
if ( ! empty( $_POST['gglstmp_post_types'] ) ) {
|
160 |
foreach ( (array)$_POST['gglstmp_post_types'] as $type ) {
|
161 |
-
if ( array_key_exists( $type, $this->all_post_types ) )
|
162 |
$post_types[] = $type;
|
163 |
}
|
164 |
}
|
165 |
if ( ! empty( $_POST['gglstmp_taxonomies'] ) ) {
|
166 |
foreach ( (array)$_POST['gglstmp_taxonomies'] as $tax ) {
|
167 |
-
if ( array_key_exists( $tax, $this->all_taxonomies ) )
|
168 |
$taxonomies[] = $tax;
|
169 |
}
|
170 |
}
|
@@ -189,6 +189,13 @@ if ( ! class_exists( 'Gglstmp_Settings_Tabs' ) ) {
|
|
189 |
}
|
190 |
|
191 |
$media_sitemap = isset( $_POST['gglstmp_media_sitemap'] ) ? 1 : 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
if ( $this->options['media_sitemap'] != $media_sitemap )
|
193 |
$sitemapcreate = true;
|
194 |
$this->options['media_sitemap'] = $media_sitemap;
|
@@ -200,7 +207,7 @@ if ( ! class_exists( 'Gglstmp_Settings_Tabs' ) ) {
|
|
200 |
update_option( 'gglstmp_options', $this->options );
|
201 |
|
202 |
if ( $sitemapcreate ) {
|
203 |
-
gglstmp_schedule_sitemap();
|
204 |
}
|
205 |
|
206 |
$message = esc_html__( 'Settings saved.', 'google-sitemap-plugin' );
|
@@ -224,6 +231,15 @@ if ( ! class_exists( 'Gglstmp_Settings_Tabs' ) ) {
|
|
224 |
} ?>
|
225 |
<hr>
|
226 |
<table class="form-table gglstmp_settings_form">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
<tr>
|
228 |
<th>Robots.txt</th>
|
229 |
<td>
|
@@ -235,7 +251,7 @@ if ( ! class_exists( 'Gglstmp_Settings_Tabs' ) ) {
|
|
235 |
); ?>
|
236 |
</span>
|
237 |
</td>
|
238 |
-
</tr>
|
239 |
<tr>
|
240 |
<th><?php esc_html_e( 'Media Sitemap', 'google-sitemap-plugin' ); ?></th>
|
241 |
<td>
|
@@ -331,7 +347,7 @@ if ( ! class_exists( 'Gglstmp_Settings_Tabs' ) ) {
|
|
331 |
$_SESSION[ 'gglstmp_state' . $this->blog_prefix ] = $this->client;
|
332 |
$gglstmp_auth_url = $this->client->createAuthUrl(); ?>
|
333 |
<a id="gglstmp_authorization_button" class="button-secondary button"
|
334 |
-
href="<?php echo $gglstmp_auth_url; ?>" target="_blank"
|
335 |
onclick="window.open(this.href,'','top='+(screen.height/2-560/2)+',left='+(screen.width/2-240/2)+',width=640,height=560,resizable=0,scrollbars=0,menubar=0,toolbar=0,status=1,location=0').focus(); return false;"><?php esc_html_e( 'Open the Google Search Console', 'google-sitemap-plugin' ); ?></a>
|
336 |
<div id="gglstmp_authorization_form">
|
337 |
<input id="gglstmp_authorization_code" class="bws_no_bind_notice"
|
@@ -366,7 +382,7 @@ if ( ! class_exists( 'Gglstmp_Settings_Tabs' ) ) {
|
|
366 |
$disabled = ' disabled="disabled"';
|
367 |
$link = '<a href="https://bestwebsoft.com/products/wordpress/plugins/multilanguage/?k=84702fda886c65861801c52644d1ee11&pn=83&v=' . $this->plugins_info["Version"] . '&wp_v=' . $wp_version . '" target="_blank">' . esc_html__( 'Install Now', 'google-sitemap-plugin' ) . '</a>';
|
368 |
} ?>
|
369 |
-
<input type="checkbox" name="gglstmp_alternate_language" value="1" <?php echo $disabled;
|
370 |
checked( $this->options['alternate_language'] ) ?> />
|
371 |
<span class="bws_info"> <?php esc_html_e( "Enable to add alternate language pages using Multilanguage plugin.", 'google-sitemap-plugin' ); ?> <?php echo $link; ?></span>
|
372 |
</td>
|
@@ -388,8 +404,8 @@ if ( ! class_exists( 'Gglstmp_Settings_Tabs' ) ) {
|
|
388 |
<fieldset>
|
389 |
<?php foreach ( $this->all_post_types as $post_type => $post_type_object ) { ?>
|
390 |
<label>
|
391 |
-
<input type="checkbox" <?php if ( in_array( $post_type, $this->options['post_type'] ) ) echo 'checked="checked"'; ?> name="gglstmp_post_types[]" value="<?php echo $post_type; ?>"/>
|
392 |
-
<span style="text-transform: capitalize; padding-left: 5px;"><?php echo $post_type_object->labels->name; ?></span>
|
393 |
</label>
|
394 |
<br/>
|
395 |
<?php } ?>
|
@@ -405,8 +421,8 @@ if ( ! class_exists( 'Gglstmp_Settings_Tabs' ) ) {
|
|
405 |
<label><input
|
406 |
type="checkbox" <?php if ( in_array( $key, $this->options['taxonomy'] ) ) {
|
407 |
echo 'checked="checked"';
|
408 |
-
} ?> name="gglstmp_taxonomies[]" value="<?php echo $key; ?>"/><span
|
409 |
-
style="padding-left: 5px;"><?php echo $value; ?></span></label><br/>
|
410 |
<?php } ?>
|
411 |
</fieldset>
|
412 |
<span class="bws_info"><?php esc_html_e( 'Enable to taxonomy links to the sitemap.', 'google-sitemap-plugin' ); ?></span>
|
@@ -480,7 +496,7 @@ if ( ! class_exists( 'Gglstmp_Settings_Tabs' ) ) {
|
|
480 |
printf(
|
481 |
'<div class="misc-pub-section"><strong>%s</strong></div>',
|
482 |
sprintf(
|
483 |
-
esc_html__( "Sitemap File: %s", 'google-sitemap-
|
484 |
'<a href="' . $xml_url . '" target="_blank">' . $xml_file . '</a>'
|
485 |
)
|
486 |
);
|
158 |
|
159 |
if ( ! empty( $_POST['gglstmp_post_types'] ) ) {
|
160 |
foreach ( (array)$_POST['gglstmp_post_types'] as $type ) {
|
161 |
+
if ( array_key_exists( sanitize_text_field( $type ), $this->all_post_types ) )
|
162 |
$post_types[] = $type;
|
163 |
}
|
164 |
}
|
165 |
if ( ! empty( $_POST['gglstmp_taxonomies'] ) ) {
|
166 |
foreach ( (array)$_POST['gglstmp_taxonomies'] as $tax ) {
|
167 |
+
if ( array_key_exists( sanitize_text_field( $tax ), $this->all_taxonomies ) )
|
168 |
$taxonomies[] = $tax;
|
169 |
}
|
170 |
}
|
189 |
}
|
190 |
|
191 |
$media_sitemap = isset( $_POST['gglstmp_media_sitemap'] ) ? 1 : 0;
|
192 |
+
if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) || is_plugin_active( 'wordpress-seo-pro/wp-seo-pro.php' ) ) {
|
193 |
+
if ( isset( $_POST['disable_yoast_xml_sitemap'] ) ) {
|
194 |
+
WPSEO_Options::set( 'enable_xml_sitemap', false );
|
195 |
+
} else {
|
196 |
+
WPSEO_Options::set( 'enable_xml_sitemap', true );
|
197 |
+
}
|
198 |
+
}
|
199 |
if ( $this->options['media_sitemap'] != $media_sitemap )
|
200 |
$sitemapcreate = true;
|
201 |
$this->options['media_sitemap'] = $media_sitemap;
|
207 |
update_option( 'gglstmp_options', $this->options );
|
208 |
|
209 |
if ( $sitemapcreate ) {
|
210 |
+
gglstmp_schedule_sitemap( false, false, true);
|
211 |
}
|
212 |
|
213 |
$message = esc_html__( 'Settings saved.', 'google-sitemap-plugin' );
|
231 |
} ?>
|
232 |
<hr>
|
233 |
<table class="form-table gglstmp_settings_form">
|
234 |
+
<?php if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) || is_plugin_active( 'wordpress-seo-pro/wp-seo-pro.php' ) ) { ?>
|
235 |
+
<tr>
|
236 |
+
<th><?php _e( 'Yoast Sitemap', 'google-sitemap-plugin' ); ?></th>
|
237 |
+
<td>
|
238 |
+
<input type='checkbox' name="disable_yoast_xml_sitemap" value="1" <?php checked( WPSEO_Options::get( 'enable_xml_sitemap'), false ); ?>/>
|
239 |
+
<span class="bws_info"><?php _e( 'Enable to activate the sitemap (Yoast sitemap will be deactivated).', 'google-sitemap-plugin' ); ?></span>
|
240 |
+
</td>
|
241 |
+
</tr>
|
242 |
+
<?php } ?>
|
243 |
<tr>
|
244 |
<th>Robots.txt</th>
|
245 |
<td>
|
251 |
); ?>
|
252 |
</span>
|
253 |
</td>
|
254 |
+
</tr>
|
255 |
<tr>
|
256 |
<th><?php esc_html_e( 'Media Sitemap', 'google-sitemap-plugin' ); ?></th>
|
257 |
<td>
|
347 |
$_SESSION[ 'gglstmp_state' . $this->blog_prefix ] = $this->client;
|
348 |
$gglstmp_auth_url = $this->client->createAuthUrl(); ?>
|
349 |
<a id="gglstmp_authorization_button" class="button-secondary button"
|
350 |
+
href="<?php echo esc_url( $gglstmp_auth_url ); ?>" target="_blank"
|
351 |
onclick="window.open(this.href,'','top='+(screen.height/2-560/2)+',left='+(screen.width/2-240/2)+',width=640,height=560,resizable=0,scrollbars=0,menubar=0,toolbar=0,status=1,location=0').focus(); return false;"><?php esc_html_e( 'Open the Google Search Console', 'google-sitemap-plugin' ); ?></a>
|
352 |
<div id="gglstmp_authorization_form">
|
353 |
<input id="gglstmp_authorization_code" class="bws_no_bind_notice"
|
382 |
$disabled = ' disabled="disabled"';
|
383 |
$link = '<a href="https://bestwebsoft.com/products/wordpress/plugins/multilanguage/?k=84702fda886c65861801c52644d1ee11&pn=83&v=' . $this->plugins_info["Version"] . '&wp_v=' . $wp_version . '" target="_blank">' . esc_html__( 'Install Now', 'google-sitemap-plugin' ) . '</a>';
|
384 |
} ?>
|
385 |
+
<input type="checkbox" name="gglstmp_alternate_language" value="1" <?php echo esc_attr( $disabled );
|
386 |
checked( $this->options['alternate_language'] ) ?> />
|
387 |
<span class="bws_info"> <?php esc_html_e( "Enable to add alternate language pages using Multilanguage plugin.", 'google-sitemap-plugin' ); ?> <?php echo $link; ?></span>
|
388 |
</td>
|
404 |
<fieldset>
|
405 |
<?php foreach ( $this->all_post_types as $post_type => $post_type_object ) { ?>
|
406 |
<label>
|
407 |
+
<input type="checkbox" <?php if ( in_array( $post_type, $this->options['post_type'] ) ) echo 'checked="checked"'; ?> name="gglstmp_post_types[]" value="<?php echo esc_attr( $post_type ); ?>"/>
|
408 |
+
<span style="text-transform: capitalize; padding-left: 5px;"><?php echo esc_attr( $post_type_object->labels->name ); ?></span>
|
409 |
</label>
|
410 |
<br/>
|
411 |
<?php } ?>
|
421 |
<label><input
|
422 |
type="checkbox" <?php if ( in_array( $key, $this->options['taxonomy'] ) ) {
|
423 |
echo 'checked="checked"';
|
424 |
+
} ?> name="gglstmp_taxonomies[]" value="<?php echo esc_attr( $key ); ?>"/><span
|
425 |
+
style="padding-left: 5px;"><?php echo esc_attr( $value ); ?></span></label><br/>
|
426 |
<?php } ?>
|
427 |
</fieldset>
|
428 |
<span class="bws_info"><?php esc_html_e( 'Enable to taxonomy links to the sitemap.', 'google-sitemap-plugin' ); ?></span>
|
496 |
printf(
|
497 |
'<div class="misc-pub-section"><strong>%s</strong></div>',
|
498 |
sprintf(
|
499 |
+
esc_html__( "Sitemap File: %s", 'google-sitemap-plugin' ),
|
500 |
'<a href="' . $xml_url . '" target="_blank">' . $xml_file . '</a>'
|
501 |
)
|
502 |
);
|
includes/pro_banners.php
CHANGED
@@ -47,6 +47,13 @@ if ( ! function_exists( 'gglstmp_pro_block' ) ) {
|
|
47 |
*/
|
48 |
if ( ! function_exists( 'gglstmp_frequency_block' ) ) {
|
49 |
function gglstmp_frequency_block() { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
<tr valign="top">
|
51 |
<th><?php esc_html_e( 'Change Frequency', 'google-sitemap-plugin' ); ?></th>
|
52 |
<td>
|
47 |
*/
|
48 |
if ( ! function_exists( 'gglstmp_frequency_block' ) ) {
|
49 |
function gglstmp_frequency_block() { ?>
|
50 |
+
<tr>
|
51 |
+
<th><?php _e( 'Title and Meta Description', 'google-sitemap-plugin' ); ?></th>
|
52 |
+
<td>
|
53 |
+
<input type='checkbox' disabled="disabled" />
|
54 |
+
<span class="bws_info"><?php _e( 'Enable to change title and meta description.', 'google-sitemap-plugin' ); ?></span>
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
<tr valign="top">
|
58 |
<th><?php esc_html_e( 'Change Frequency', 'google-sitemap-plugin' ); ?></th>
|
59 |
<td>
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
=== Sitemap by BestWebSoft - WordPress XML Site Map Page Generator Plugin ===
|
2 |
Contributors: bestwebsoft
|
3 |
Donate link: https://bestwebsoft.com/donate/
|
4 |
Tags: add pages to sitemap, add posts to sitemap, add sitemap, google, google sitemap, google sitemap plugin, sitemap file path, update sitemap, google webmaster tools, site map, sitemaps, webmaster tools
|
5 |
-
Requires at least:
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 3.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -57,6 +57,7 @@ https://www.youtube.com/watch?v=CgYXKRXpj_0
|
|
57 |
> * Configure all subsites on the network
|
58 |
> * Add custom URLs to the sitemap file
|
59 |
> * Get answer to your support question within one business day ([Support Policy](https://bestwebsoft.com/support-policy/))
|
|
|
60 |
>
|
61 |
> [Upgrade to Pro Now](https://bestwebsoft.com/products/wordpress/plugins/google-sitemap/?k=8b735c0f7ca51187b5062d5e4f40058b)
|
62 |
|
@@ -64,9 +65,9 @@ If you have a feature suggestion or idea you'd like to see in the plugin, we'd l
|
|
64 |
|
65 |
= Documentation & Videos =
|
66 |
|
67 |
-
* [[Doc] User Guide](https://
|
68 |
-
* [[Doc] Installation](https://
|
69 |
-
* [[Doc] Purchase](https://
|
70 |
* [[Video] Installation Instruction](https://www.youtube.com/watch?v=NKlAnFTzNrQ)
|
71 |
* [[Video] User Guide](https://www.youtube.com/watch?v=hzz0_Yj4gaQ)
|
72 |
|
@@ -98,7 +99,7 @@ Some of these translations are not complete. We are constantly adding new featur
|
|
98 |
2. Activate the plugin via the 'Plugins' menu in WordPress.
|
99 |
3. The site settings are available in "Sitemap".
|
100 |
|
101 |
-
[View a Step-by-step Instruction on Sitemap Installation](https://
|
102 |
|
103 |
https://www.youtube.com/watch?v=NKlAnFTzNrQ
|
104 |
|
@@ -153,6 +154,14 @@ Please make sure that the problem hasn't been discussed yet on our forum (<https
|
|
153 |
|
154 |
== Changelog ==
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
= V3.2.5 - 26.11.2021 =
|
157 |
* Bugfix : The issue with installing new plugins has been fixed.
|
158 |
* Update: Video User Guide has been added.
|
@@ -392,6 +401,12 @@ Please make sure that the problem hasn't been discussed yet on our forum (<https
|
|
392 |
|
393 |
== Upgrade Notice ==
|
394 |
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
= V3.2.5 =
|
396 |
* Bugs fixed.
|
397 |
* Usability improved
|
1 |
+
=== Sitemap by BestWebSoft - WordPress XML Site Map Page Generator Plugin ===
|
2 |
Contributors: bestwebsoft
|
3 |
Donate link: https://bestwebsoft.com/donate/
|
4 |
Tags: add pages to sitemap, add posts to sitemap, add sitemap, google, google sitemap, google sitemap plugin, sitemap file path, update sitemap, google webmaster tools, site map, sitemaps, webmaster tools
|
5 |
+
Requires at least: 5.6
|
6 |
+
Tested up to: 6.0
|
7 |
+
Stable tag: 3.2.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
57 |
> * Configure all subsites on the network
|
58 |
> * Add custom URLs to the sitemap file
|
59 |
> * Get answer to your support question within one business day ([Support Policy](https://bestwebsoft.com/support-policy/))
|
60 |
+
> * Edit title and meta description [NEW]
|
61 |
>
|
62 |
> [Upgrade to Pro Now](https://bestwebsoft.com/products/wordpress/plugins/google-sitemap/?k=8b735c0f7ca51187b5062d5e4f40058b)
|
63 |
|
65 |
|
66 |
= Documentation & Videos =
|
67 |
|
68 |
+
* [[Doc] User Guide](https://bestwebsoft.com/documentation/sitemap/sitemap-user-guide/)
|
69 |
+
* [[Doc] Installation](https://bestwebsoft.com/documentation/how-to-install-a-wordpress-product/how-to-install-a-wordpress-plugin/)
|
70 |
+
* [[Doc] Purchase](https://bestwebsoft.com/documentation/how-to-purchase-a-wordpress-plugin/how-to-purchase-wordpress-plugin-from-bestwebsoft/)
|
71 |
* [[Video] Installation Instruction](https://www.youtube.com/watch?v=NKlAnFTzNrQ)
|
72 |
* [[Video] User Guide](https://www.youtube.com/watch?v=hzz0_Yj4gaQ)
|
73 |
|
99 |
2. Activate the plugin via the 'Plugins' menu in WordPress.
|
100 |
3. The site settings are available in "Sitemap".
|
101 |
|
102 |
+
[View a Step-by-step Instruction on Sitemap Installation](https://bestwebsoft.com/documentation/how-to-install-a-wordpress-product/how-to-install-a-wordpress-plugin/)
|
103 |
|
104 |
https://www.youtube.com/watch?v=NKlAnFTzNrQ
|
105 |
|
154 |
|
155 |
== Changelog ==
|
156 |
|
157 |
+
= V3.2.6 - 21.07.2022 =
|
158 |
+
* NEW: Compatibility with Yoast - Ability enable the sitemap with Yoast plugin activated.
|
159 |
+
* Update : We updated all functionality for wordpress 6.0.
|
160 |
+
* Update : BWS Panel section was updated.
|
161 |
+
* Bugfix : The issue with video sitemap has been fixed.
|
162 |
+
* PRO: Ability to edit title and meta description has been added.
|
163 |
+
* PRO : The issue with sitemap.xml on multisite has been fixed.
|
164 |
+
|
165 |
= V3.2.5 - 26.11.2021 =
|
166 |
* Bugfix : The issue with installing new plugins has been fixed.
|
167 |
* Update: Video User Guide has been added.
|
401 |
|
402 |
== Upgrade Notice ==
|
403 |
|
404 |
+
= V3.2.6 =
|
405 |
+
* New features added
|
406 |
+
* Plugin optimization completed.
|
407 |
+
* The compatibility with new WordPress version updated.
|
408 |
+
* Bugs fixed.
|
409 |
+
|
410 |
= V3.2.5 =
|
411 |
* Bugs fixed.
|
412 |
* Usability improved
|