diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-content/plugins/portfolio/bws_menu/class-bws-settings.php --- a/wp/wp-content/plugins/portfolio/bws_menu/class-bws-settings.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-content/plugins/portfolio/bws_menu/class-bws-settings.php Tue Dec 15 13:49:49 2020 +0100 @@ -10,6 +10,7 @@ private $tabs; private $pro_plugin_is_activated = false; private $custom_code_args = array(); + private $bws_plugin_link = ''; public $plugin_basename; public $prefix; @@ -53,6 +54,8 @@ * @param array|string $args */ public function __construct( $args = array() ) { + global $wp_version; + $args = wp_parse_args( $args, array( 'plugin_basename' => '', 'prefix' => '', @@ -66,8 +69,6 @@ 'wp_slug' => '', 'demo_data' => false, /* if this is free version and pro exist */ - 'pro_page' => '', - 'bws_license_plugin' => '', 'link_key' => '', 'link_pn' => '', 'trial_days' => false, @@ -90,14 +91,27 @@ $this->doc_link = $args['doc_link']; $this->doc_video_link = $args['doc_video_link']; - $this->pro_page = $args['pro_page']; - $this->bws_license_plugin = $args['bws_license_plugin']; $this->link_key = $args['link_key']; $this->link_pn = $args['link_pn']; $this->trial_days = $args['trial_days']; $this->licenses = $args['licenses']; - $this->hide_pro_tabs = bws_hide_premium_options_check( $this->options ); + $this->pro_page = $this->bws_license_plugin = ''; + /* get $bws_plugins */ + require( dirname( __FILE__ ) . '/product_list.php' ); + if ( isset( $bws_plugins[ $this->plugin_basename ] ) ) { + if ( isset( $bws_plugins[ $this->plugin_basename ]['pro_settings'] ) ) { + $this->pro_page = $bws_plugins[ $this->plugin_basename ]['pro_settings']; + $this->bws_license_plugin = $bws_plugins[ $this->plugin_basename ]['pro_version']; + } + + $this->bws_plugin_link = substr( $bws_plugins[ $this->plugin_basename ]['link'],0 , strpos( $bws_plugins[ $this->plugin_basename ]['link'], '?' ) ); + + if ( ! empty( $this->link_key ) && ! empty( $this->link_pn ) ) + $this->bws_plugin_link .= '?k=' . $this->link_key . '&pn=' . $this->link_pn . '&v=' . $this->plugins_info["Version"] . '&wp_v=' . $wp_version; + } + + $this->hide_pro_tabs = bws_hide_premium_options_check( $this->options ); $this->version = '1.0.0'; $this->is_multisite = is_multisite(); @@ -112,7 +126,7 @@ $this->licenses[ $this->plugins_info['TextDomain'] ] = array( 'name' => $this->plugins_info['Name'], 'slug' => $this->plugins_info['TextDomain'], - 'pro_slug' => stristr( $this->bws_license_plugin, '/', TRUE ), + 'pro_slug' => substr( $this->bws_license_plugin, 0, stripos( $this->bws_license_plugin, '/' ) ), 'basename' => $this->plugin_basename, 'pro_basename' => $this->bws_license_plugin ); @@ -156,7 +170,7 @@
init
' ),
- 'learn_more_link' => 'http://php.net/'
+ 'learn_more_link' => 'https://php.net/'
),
'js' => array( 'description' => __( 'These code will be added to the header on all pages of your site.', 'bestwebsoft' ),
'learn_more_link' => 'https://developer.mozilla.org/en-US/docs/Web/JavaScript'
@@ -631,6 +644,8 @@
*/
private function save_options_misc() {
global $bstwbsftwppdtplgns_options, $wp_version;
+ $notice = '';
+
/* hide premium options */
if ( ! empty( $this->pro_page ) ) {
if ( isset( $_POST['bws_hide_premium_options'] ) ) {
@@ -692,7 +707,7 @@
),
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
);
- $raw_response = wp_remote_post( 'http://bestwebsoft.com/wp-content/plugins/products-statistics/track-usage/', $options );
+ $raw_response = wp_remote_post( 'https://bestwebsoft.com/wp-content/plugins/products-statistics/track-usage/', $options );
if ( ! is_wp_error( $raw_response ) && 200 == wp_remote_retrieve_response_code( $raw_response ) ) {
$response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
@@ -722,43 +737,53 @@
help_phrase(); ?>
-
pro_page ) ) . '">' . __( 'Settings page', 'bestwebsoft' ) . '', '7' ); ?>
+ $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'; ?> ++ |
+
+
+ + + + + |
+
---|
@@ -767,7 +792,7 @@ type="hidden" name="bws_license_plugin_" value="" /> type="submit" class="button button-secondary" name="bws_license_submit" value="" /> |
---|