'', 'prefix' => '', 'plugins_info' => array(), 'default_options' => array(), 'options' => array(), 'is_network_options' => false, 'tabs' => array(), 'doc_link' => '', 'doc_video_link' => '', 'wp_slug' => '', 'demo_data' => false, /* if this is free version and pro exist */ 'link_key' => '', 'link_pn' => '', 'trial_days' => false, 'licenses' => array(), ) ); $args['plugins_info']['Name'] = str_replace( ' by BestWebSoft', '', $args['plugins_info']['Name'] ); $this->plugin_basename = $args['plugin_basename']; $this->prefix = $args['prefix']; $this->plugins_info = $args['plugins_info']; $this->options = $args['options']; $this->default_options = $args['default_options']; $this->wp_slug = $args['wp_slug']; $this->demo_data = $args['demo_data']; $this->tabs = $args['tabs']; $this->is_network_options = $args['is_network_options']; $this->doc_link = $args['doc_link']; $this->doc_video_link = $args['doc_video_link']; $this->link_key = $args['link_key']; $this->link_pn = $args['link_pn']; $this->trial_days = $args['trial_days']; $this->licenses = $args['licenses']; $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(); if ( empty( $this->pro_page ) && array_key_exists( 'license', $this->tabs ) ) { $this->is_pro = true; $this->licenses[ $this->plugins_info['TextDomain'] ] = array( 'name' => $this->plugins_info['Name'], 'slug' => $this->plugins_info['TextDomain'], 'basename' => $this->plugin_basename, ); } else { $this->licenses[ $this->plugins_info['TextDomain'] ] = array( 'name' => $this->plugins_info['Name'], 'slug' => $this->plugins_info['TextDomain'], 'pro_slug' => substr( $this->bws_license_plugin, 0, stripos( $this->bws_license_plugin, '/' ) ), 'basename' => $this->plugin_basename, 'pro_basename' => $this->bws_license_plugin, ); } } /** * Displays the content of the "Settings" on the plugin settings page * * @access public * @param void * @return void */ public function display_content() { global $bstwbsftwppdtplgns_options; if ( array_key_exists( 'custom_code', $this->tabs ) ) { /* get args for `custom code` tab */ $this->get_custom_code(); } $save_results = $this->save_all_tabs_options(); $this->display_messages( $save_results ); if ( isset( $_REQUEST['bws_restore_default'] ) && check_admin_referer( $this->plugin_basename, 'bws_nonce_name' ) ) { bws_form_restore_default_confirm( $this->plugin_basename ); } elseif ( isset( $_POST['bws_handle_demo'] ) && check_admin_referer( $this->plugin_basename, 'bws_nonce_name' ) ) { $this->demo_data->bws_demo_confirm(); } else { bws_show_settings_notice(); ?>