author | ymh <ymh.work@gmail.com> |
Mon, 08 Sep 2025 19:44:41 +0200 | |
changeset 23 | 417f20492bf7 |
parent 21 | 48c4eec2b7e6 |
permissions | -rwxr-xr-x |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
<?php |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2 |
if ( ! defined( 'ABSPATH' ) ) exit; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
3 |
|
19 | 4 |
/** |
5 |
* Deprecated functions for BestWebSoft plugins |
|
6 |
*/ |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
/** |
19 | 9 |
* Function add BWS Plugins page |
10 |
* |
|
11 |
* @deprecated 1.9.8 (15.12.2016) |
|
12 |
* @return void |
|
13 |
*/ |
|
14 |
if ( ! function_exists( 'bws_general_menu' ) ) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
function bws_general_menu() { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
global $menu, $bws_general_menu_exist; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
18 |
if ( ! $bws_general_menu_exist ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
19 |
/* we check also menu exist in global array as in old plugins $bws_general_menu_exist variable not exist */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
20 |
foreach ( $menu as $value_menu ) { |
19 | 21 |
if ( 'bws_panel' === $value_menu[2] ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
$bws_general_menu_exist = true; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
23 |
return; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
24 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
25 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
26 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
27 |
add_menu_page( 'BWS Panel', 'BWS Panel', 'manage_options', 'bws_panel', 'bws_add_menu_render', 'none', '1001' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
28 |
|
19 | 29 |
add_submenu_page( 'bws_panel', esc_html__( 'Plugins', 'bestwebsoft' ), esc_html__( 'Plugins', 'bestwebsoft' ), 'manage_options', 'bws_panel', 'bws_add_menu_render' ); |
30 |
add_submenu_page( 'bws_panel', esc_html__( 'Themes', 'bestwebsoft' ), esc_html__( 'Themes', 'bestwebsoft' ), 'manage_options', 'bws_themes', 'bws_add_menu_render' ); |
|
31 |
add_submenu_page( 'bws_panel', esc_html__( 'System Status', 'bestwebsoft' ), esc_html__( 'System Status', 'bestwebsoft' ), 'manage_options', 'bws_system_status', 'bws_add_menu_render' ); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
32 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
33 |
$bws_general_menu_exist = true; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
34 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
35 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
36 |
} |
16 | 37 |
|
38 |
/** |
|
19 | 39 |
* Function process submit on the `Go Pro` tab |
40 |
* |
|
41 |
* @deprecated 1.9.8 (15.12.2016) |
|
42 |
* @todo Remove function after 01.01.2021 |
|
43 |
*/ |
|
16 | 44 |
if ( ! function_exists( 'bws_go_pro_tab_check' ) ) { |
45 |
function bws_go_pro_tab_check( $plugin_basename, $plugin_options_name = false, $is_network_option = false ) { |
|
46 |
global $bstwbsftwppdtplgns_options; |
|
19 | 47 |
if ( ! isset( $bstwbsftwppdtplgns_options ) ) { |
16 | 48 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' ); |
19 | 49 |
} |
16 | 50 |
if ( ! isset( $bstwbsftwppdtplgns_options['deprecated_function']['bws_go_pro_tab_check'] ) ) { |
51 |
$get_debug_backtrace = debug_backtrace(); |
|
19 | 52 |
$file = ( ! empty( $get_debug_backtrace[0]['file'] ) ) ? $get_debug_backtrace[0]['file'] : ''; |
16 | 53 |
$bstwbsftwppdtplgns_options['deprecated_function']['bws_go_pro_tab_check'] = array( |
19 | 54 |
'file' => $file, |
16 | 55 |
); |
19 | 56 |
if ( is_multisite() ) { |
16 | 57 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); |
19 | 58 |
} else { |
16 | 59 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); |
19 | 60 |
} |
16 | 61 |
} |
62 |
} |
|
63 |
} |
|
64 |
||
65 |
/** |
|
19 | 66 |
* Function display 'Custom code' tab |
67 |
* |
|
68 |
* @deprecated 1.9.8 (15.12.2016) |
|
69 |
* @todo Remove function after 01.01.2021 |
|
70 |
*/ |
|
16 | 71 |
if ( ! function_exists( 'bws_custom_code_tab' ) ) { |
72 |
function bws_custom_code_tab() { |
|
73 |
global $bstwbsftwppdtplgns_options; |
|
19 | 74 |
if ( ! isset( $bstwbsftwppdtplgns_options ) ) { |
16 | 75 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' ); |
19 | 76 |
} |
16 | 77 |
if ( ! isset( $bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] ) ) { |
78 |
$get_debug_backtrace = debug_backtrace(); |
|
19 | 79 |
$file = ( ! empty( $get_debug_backtrace[0]['file'] ) ) ? $get_debug_backtrace[0]['file'] : ''; |
16 | 80 |
$bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] = array( |
19 | 81 |
'file' => $file, |
16 | 82 |
); |
19 | 83 |
if ( is_multisite() ) { |
16 | 84 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); |
19 | 85 |
} else { |
16 | 86 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); |
19 | 87 |
} |
16 | 88 |
} |
89 |
} |
|
90 |
} |
|
91 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
92 |
/** |
19 | 93 |
* Function check license key for Pro plugins version |
94 |
* |
|
95 |
* @deprecated 1.9.8 (15.12.2016) |
|
96 |
* @todo Remove function after 01.01.2021 |
|
97 |
*/ |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
98 |
if ( ! function_exists( 'bws_check_pro_license' ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
99 |
function bws_check_pro_license( $plugin_basename, $trial_plugin = false ) { |
16 | 100 |
global $bstwbsftwppdtplgns_options; |
19 | 101 |
if ( ! isset( $bstwbsftwppdtplgns_options ) ) { |
16 | 102 |
$bstwbsftwppdtplgns_options = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'bstwbsftwppdtplgns_options' ) : get_option( 'bstwbsftwppdtplgns_options' ); |
19 | 103 |
} |
16 | 104 |
if ( ! isset( $bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] ) ) { |
105 |
$get_debug_backtrace = debug_backtrace(); |
|
19 | 106 |
$file = ( ! empty( $get_debug_backtrace[0]['file'] ) ) ? $get_debug_backtrace[0]['file'] : ''; |
16 | 107 |
$bstwbsftwppdtplgns_options['deprecated_function']['bws_custom_code_tab'] = array( |
19 | 108 |
'file' => $file, |
16 | 109 |
); |
19 | 110 |
if ( is_multisite() ) { |
16 | 111 |
update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); |
19 | 112 |
} else { |
16 | 113 |
update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); |
19 | 114 |
} |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
115 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
116 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
117 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
118 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
119 |
/** |
19 | 120 |
* Function display block for checking license key for Pro plugins version |
121 |
* |
|
122 |
* @deprecated 1.9.8 (15.12.2016) |
|
123 |
* @todo add notice and remove functional after 01.01.2018. Remove function after 01.01.2019 |
|
124 |
*/ |
|
125 |
if ( ! function_exists( 'bws_check_pro_license_form' ) ) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
126 |
function bws_check_pro_license_form( $plugin_basename ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
127 |
global $bstwbsftwppdtplgns_options; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
128 |
$license_key = ( isset( $bstwbsftwppdtplgns_options[ $plugin_basename ] ) ) ? $bstwbsftwppdtplgns_options[ $plugin_basename ] : ''; ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
129 |
<div class="clear"></div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
130 |
<form method="post" action=""> |
19 | 131 |
<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> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
132 |
<p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
133 |
<input type="text" maxlength="100" name="bws_license_key" value="<?php echo esc_attr( $license_key ); ?>" /> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
134 |
<input type="hidden" name="bws_license_submit" value="submit" /> |
19 | 135 |
<input type="submit" class="button" value="<?php esc_html_e( 'Check license key', 'bestwebsoft' ); ?>" /> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
136 |
<?php wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
137 |
</p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
138 |
</form> |
19 | 139 |
<?php |
140 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
141 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
142 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
143 |
/** |
19 | 144 |
* Function process submit on the `Go Pro` tab for TRIAL |
145 |
* |
|
146 |
* @deprecated 1.9.8 (15.12.2016) |
|
147 |
* @todo add notice and remove functional after 01.01.2018. Remove function after 01.01.2019 |
|
148 |
*/ |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
149 |
if ( ! function_exists( 'bws_go_pro_from_trial_tab' ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
150 |
function bws_go_pro_from_trial_tab( $plugin_info, $plugin_basename, $page, $link_slug, $link_key, $link_pn, $trial_license_is_set = true ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
151 |
global $wp_version, $bstwbsftwppdtplgns_options; |
19 | 152 |
$bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? sanitize_text_field( wp_unslash( $_POST['bws_license_key'] ) ) : ''; |
153 |
if ( $trial_license_is_set ) { |
|
154 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
155 |
<form method="post" action=""> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
156 |
<p> |
19 | 157 |
<?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' ); ?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
158 |
<br /> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
159 |
<span class="bws_info"> |
19 | 160 |
<?php esc_html_e( 'License key can be found in the', 'bestwebsoft' ); ?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
161 |
<a href="https://bestwebsoft.com/wp-login.php">Client Area</a> |
19 | 162 |
<?php esc_html_e( '(your username is the email address specified during the purchase).', 'bestwebsoft' ); ?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
163 |
</span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
164 |
</p> |
19 | 165 |
<?php |
166 |
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $plugin_basename ]['count'] ) && |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
167 |
'5' < $bstwbsftwppdtplgns_options['go_pro'][ $plugin_basename ]['count'] && |
19 | 168 |
$bstwbsftwppdtplgns_options['go_pro'][ $plugin_basename ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) { |
169 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
170 |
<p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
171 |
<input disabled="disabled" type="text" name="bws_license_key" value="" /> |
19 | 172 |
<input disabled="disabled" type="submit" class="button-primary" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" /> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
173 |
</p> |
19 | 174 |
<p><?php esc_html_e( 'Unfortunately, you have exceeded the number of available tries per day.', 'bestwebsoft' ); ?></p> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
175 |
<?php } else { ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
176 |
<p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
177 |
<input type="text" maxlength="100" name="bws_license_key" value="" /> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
178 |
<input type="hidden" name="bws_license_plugin" value="<?php echo esc_attr( $plugin_basename ); ?>" /> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
179 |
<input type="hidden" name="bws_license_submit" value="submit" /> |
19 | 180 |
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" /> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
181 |
<?php wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
182 |
</p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
183 |
<?php } ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
184 |
</form> |
19 | 185 |
<?php |
186 |
} else { |
|
187 |
$page_url = esc_url( self_admin_url( 'admin.php?page=' . $page ) ); |
|
188 |
?> |
|
189 |
<p><?php esc_html_e( 'Congratulations! The Pro license of the plugin is activated successfully.', 'bestwebsoft' ); ?></p> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
190 |
<p> |
19 | 191 |
<?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> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
192 |
</p> |
19 | 193 |
<?php |
194 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
195 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
196 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
197 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
198 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
199 |
/** |
19 | 200 |
* Function display block for restoring default product settings |
201 |
* |
|
202 |
* @deprecated 1.9.8 (15.12.2016) |
|
203 |
* @todo add notice and remove functional after 01.01.2018. Remove function after 01.01.2019 |
|
204 |
*/ |
|
205 |
if ( ! function_exists( 'bws_form_restore_default_settings' ) ) { |
|
206 |
function bws_form_restore_default_settings( $plugin_basename, $change_permission_attr = '' ) { |
|
207 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
208 |
<form method="post" action=""> |
19 | 209 |
<p><?php esc_html_e( 'Restore all plugin settings to defaults', 'bestwebsoft' ); ?></p> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
210 |
<p> |
19 | 211 |
<input <?php echo esc_html( $change_permission_attr ); ?> type="submit" class="button" value="<?php esc_html_e( 'Restore settings', 'bestwebsoft' ); ?>" /> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
212 |
</p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
213 |
<input type="hidden" name="bws_restore_default" value="submit" /> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
214 |
<?php wp_nonce_field( $plugin_basename, 'bws_settings_nonce_name' ); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
215 |
</form> |
19 | 216 |
<?php |
217 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
218 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
219 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
220 |
/** |
19 | 221 |
* Function display GO PRO tab |
222 |
* |
|
223 |
* @deprecated 1.9.8 (15.12.2016) |
|
224 |
* @todo add notice and remove functional after 01.01.2018. Remove function after 01.01.2019 |
|
225 |
*/ |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
226 |
if ( ! function_exists( 'bws_go_pro_tab_show' ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
227 |
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 ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
228 |
global $wp_version, $bstwbsftwppdtplgns_options; |
19 | 229 |
$bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? sanitize_text_field( wp_unslash( $_POST['bws_license_key'] ) ) : ''; |
230 |
if ( $pro_plugin_is_activated ) { |
|
231 |
$page_url = esc_url( self_admin_url( 'admin.php?page=' . $pro_page ) ); |
|
232 |
?> |
|
233 |
<p><?php esc_html_e( 'Congratulations! Pro version of the plugin is installed and activated successfully.', 'bestwebsoft' ); ?></p> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
234 |
<p> |
19 | 235 |
<?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> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
236 |
</p> |
19 | 237 |
<?php |
238 |
} else { |
|
239 |
if ( $bws_hide_premium_options_check ) { |
|
240 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
241 |
<form method="post" action=""> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
242 |
<p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
243 |
<input type="hidden" name="bws_hide_premium_options_submit" value="submit" /> |
19 | 244 |
<input type="submit" class="button" value="<?php esc_html_e( 'Show Pro features', 'bestwebsoft' ); ?>" /> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
245 |
<?php wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
246 |
</p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
247 |
</form> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
248 |
<?php } ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
249 |
<form method="post" action=""> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
250 |
<p> |
19 | 251 |
<?php esc_html_e( 'Enter your license key to install and activate', 'bestwebsoft' ); ?> |
252 |
<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> |
|
253 |
<?php esc_html_e( 'version of the plugin.', 'bestwebsoft' ); ?><br /> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
254 |
<span class="bws_info"> |
19 | 255 |
<?php esc_html_e( 'License key can be found in the', 'bestwebsoft' ); ?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
256 |
<a href="https://bestwebsoft.com/wp-login.php">Client Area</a> |
19 | 257 |
<?php esc_html_e( '(your username is the email address specified during the purchase).', 'bestwebsoft' ); ?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
258 |
</span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
259 |
</p> |
19 | 260 |
<?php |
261 |
if ( false !== $trial_days_number ) { |
|
262 |
$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>'; |
|
263 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
264 |
if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
265 |
'5' < $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] && |
19 | 266 |
$bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) { |
267 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
268 |
<p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
269 |
<input disabled="disabled" type="text" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" /> |
19 | 270 |
<input disabled="disabled" type="submit" class="button-primary" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" /> |
271 |
<?php |
|
272 |
if ( false !== $trial_days_number ) { |
|
273 |
echo esc_html( $trial_days_number ); |
|
274 |
} |
|
275 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
276 |
</p> |
19 | 277 |
<p><?php esc_html_e( 'Unfortunately, you have exceeded the number of available tries per day. Please, upload the plugin manually.', 'bestwebsoft' ); ?></p> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
278 |
<?php } else { ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
279 |
<p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
280 |
<input type="text" maxlength="100" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" /> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
281 |
<input type="hidden" name="bws_license_plugin" value="<?php echo esc_attr( $bws_license_plugin ); ?>" /> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
282 |
<input type="hidden" name="bws_license_submit" value="submit" /> |
19 | 283 |
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" /> |
284 |
<?php |
|
285 |
if ( false !== $trial_days_number ) { |
|
286 |
echo esc_html( $trial_days_number ); |
|
287 |
} |
|
288 |
wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); |
|
289 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
290 |
</p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
291 |
<?php } ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
292 |
</form> |
19 | 293 |
<?php |
294 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
295 |
} |
16 | 296 |
} |
297 |
||
298 |
/** |
|
19 | 299 |
* Function display GO PRO Banner (inline in 'admin_notices' action ) |
300 |
* |
|
301 |
* @deprecated 2.2.5 (29.11.2019) |
|
302 |
* @todo Remove notice after 01.12.2021 |
|
303 |
*/ |
|
16 | 304 |
if ( ! function_exists( 'bws_plugin_banner' ) ) { |
305 |
function bws_plugin_banner( $plugin_info, $this_banner_prefix, $link_slug, $link_key, $link_pn, $banner_url_or_slug ) { |
|
306 |
/* the function is not longer use, but we need to store it */ |
|
307 |
} |
|
308 |
} |
|
309 |
||
310 |
/** |
|
19 | 311 |
* Function display timeout PRO Banner (inline in 'admin_notices' action ) |
312 |
* |
|
313 |
* @deprecated 2.2.5 (29.11.2019) |
|
314 |
* @todo Remove notice after 01.12.2021 |
|
315 |
*/ |
|
316 |
if ( ! function_exists( 'bws_plugin_banner_timeout' ) ) { |
|
16 | 317 |
function bws_plugin_banner_timeout( $plugin_key, $plugin_prefix, $plugin_name, $banner_url_or_slug = false ) { |
318 |
/* the function is not longer use, but we need to store it */ |
|
319 |
} |
|
19 | 320 |
} |