diff -r 490d5cc509ed -r cf61fcea0001 wp/wp-content/plugins/portfolio/bws_menu/class-bws-settings.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wp/wp-content/plugins/portfolio/bws_menu/class-bws-settings.php Mon Oct 14 17:39:30 2019 +0200 @@ -0,0 +1,1104 @@ + '', + '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 */ + 'pro_page' => '', + 'bws_license_plugin'=> '', + 'link_key' => '', + 'link_pn' => '', + 'trial_days' => false + ) ); + + $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->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->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; + } + + /** + * 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(); ?> +