' . __( 'Upgrade to Pro', 'visitors-online' ) . '', 'manage_options', 'https://bestwebsoft.com/products/wordpress/plugins/visitors-online/?k=1b01d30e84bb97b2afecb5f34c43931d&pn=213&v=' . $vstrsnln_plugin_info['Version'] . '&wp_v=' . $wp_version, ); } add_action( 'load-' . $settings, 'vstrsnln_add_tabs' ); } } } if ( ! function_exists( 'vstrsnln_plugins_loaded' ) ) { /** * Internatiolazation */ function vstrsnln_plugins_loaded() { load_plugin_textdomain( 'visitors-online', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); } } if ( ! function_exists( 'vstrsnln_plugin_init' ) ) { /** * Plugin init */ function vstrsnln_plugin_init() { global $vstrsnln_plugin_info; require_once dirname( __FILE__ ) . '/bws_menu/bws_include.php'; bws_include_init( plugin_basename( __FILE__ ) ); if ( empty( $vstrsnln_plugin_info ) ) { if ( ! function_exists( 'get_plugin_data' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $vstrsnln_plugin_info = get_plugin_data( __FILE__ ); } /* Function check if plugin is compatible with current WP version */ bws_wp_min_version_check( plugin_basename( __FILE__ ), $vstrsnln_plugin_info, '4.5' ); /* Get/Register and check settings for plugin */ vstrsnln_default_options(); vstrsnln_write_user_base(); } } if ( ! function_exists( 'vstrsnln_plugin_admin_init' ) ) { /** * Function to add plugin version */ function vstrsnln_plugin_admin_init() { global $bws_plugin_info, $vstrsnln_plugin_info, $vstrsnln_options, $hook_suffix, $bws_shortcode_list; if ( ! isset( $bws_plugin_info ) || empty( $bws_plugin_info ) ) { $bws_plugin_info = array( 'id' => '213', 'version' => $vstrsnln_plugin_info['Version'], ); } if ( 'plugins.php' === $hook_suffix ) { if ( function_exists( 'bws_plugin_banner_go_pro' ) ) { vstrsnln_default_options(); bws_plugin_banner_go_pro( $vstrsnln_options, $vstrsnln_plugin_info, 'vstrsnln', 'visitors-online', 'ac4699da21e7e6d6238f373bc0065912', '213', 'visitors-online' ); } } /* add Visitors Online to global $bws_shortcode_list */ $bws_shortcode_list['vstrsnln'] = array( 'name' => 'Visitors Online' ); } } if ( ! function_exists( 'vstrsnln_default_options' ) ) { /** * Set default settings */ function vstrsnln_default_options() { global $vstrsnln_plugin_info, $vstrsnln_user_interval, $vstrsnln_options; /* Add options to database */ $db_version = '1.0'; if ( ! isset( $vstrsnln_plugin_info ) ) { if ( ! function_exists( 'get_plugin_data' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $vstrsnln_plugin_info = get_plugin_data( __FILE__ ); } $vstrsnln_options = get_option( 'vstrsnln_options' ); if ( ! $vstrsnln_options ) { $vstrsnln_options = vstrsnln_get_options_default(); add_option( 'vstrsnln_options', $vstrsnln_options ); } /* Array merge incase this version has added new options */ if ( ! isset( $vstrsnln_options['plugin_option_version'] ) || $vstrsnln_options['plugin_option_version'] !== $vstrsnln_plugin_info['Version'] ) { /* register uninstall hook */ if ( is_multisite() ) { switch_to_blog( 1 ); register_uninstall_hook( __FILE__, 'vstrsnln_uninstall' ); restore_current_blog(); } else { register_uninstall_hook( __FILE__, 'vstrsnln_uninstall' ); } $vstrsnln_option_defaults = vstrsnln_get_options_default(); $vstrsnln_options = array_merge( $vstrsnln_option_defaults, $vstrsnln_options ); $vstrsnln_options['plugin_option_version'] = $vstrsnln_plugin_info['Version']; /* show pro features */ $vstrsnln_options['hide_premium_options'] = array(); $update_option = true; } /* Update plugin database */ if ( ! isset( $vstrsnln_options['plugin_db_version'] ) || $vstrsnln_options['plugin_db_version'] !== $db_version ) { vstrsnln_install_base(); $vstrsnln_options['plugin_db_version'] = $db_version; $update_option = true; } if ( isset( $update_option ) ) { update_option( 'vstrsnln_options', $vstrsnln_options ); } $vstrsnln_user_interval = $vstrsnln_options['check_user_interval']; } } if ( ! function_exists( 'vstrsnln_get_options_default' ) ) { /** * Array with default options */ function vstrsnln_get_options_default() { global $vstrsnln_plugin_info; $default_options = array( 'plugin_option_version' => $vstrsnln_plugin_info['Version'], 'display_settings_notice' => 1, 'suggest_feature_banner' => 1, 'check_user_interval' => 15, 'structure_pattern' => __( 'Visitors online', 'visitors-online' ) . " – {TOTAL}\n" . __( 'users', 'visitors-online' ) . " – {USERS}\n" . __( 'guests', 'visitors-online' ) . " – {GUESTS}\n" . __( 'bots', 'visitors-online' ) . " – {BOTS}\n" . __( 'The maximum number of visits was', 'visitors-online' ) . " – {MAX-DATE}\n" . __( 'all visitors', 'visitors-online' ) . " – {MAX-TOTAL}\n" . __( 'users', 'visitors-online' ) . " – {MAX-USERS}\n" . __( 'guests', 'visitors-online' ) . " – {MAX-GUESTS}\n" . __( 'bots', 'visitors-online' ) . ' – {MAX-BOTS}', ); $blog_id = get_current_blog_id(); $table_general = vstrsnln_get_table_general( $blog_id ); if ( ! empty( $table_general->country ) ) { $default_options['structure_pattern'] .= "\n" . __( 'country', 'visitors-online' ) . ' – {COUNTRY}'; } if ( ! empty( $table_general->browser ) ) { $default_options['structure_pattern'] .= "\n" . __( 'browser', 'visitors-online' ) . ' – {BROWSER}'; } return $default_options; } } if ( ! function_exists( 'vstrsnln_admin_head' ) ) { /** * Function to add script and styles to the admin panel */ function vstrsnln_admin_head() { global $vstrsnln_plugin_info; if ( ! isset( $vstrsnln_plugin_info ) ) { if ( ! function_exists( 'get_plugin_data' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $vstrsnln_plugin_info = get_plugin_data( __FILE__ ); } wp_enqueue_style( 'vstrsnln_icon', plugins_url( 'css/icon.css', __FILE__ ), false, $vstrsnln_plugin_info['Version'] ); if ( isset( $_REQUEST['page'] ) && 'visitors-online.php' === $_REQUEST['page'] ) { bws_enqueue_settings_scripts(); bws_plugins_include_codemirror(); wp_enqueue_style( 'vstrsnln_stylesheet', plugins_url( 'css/style.css', __FILE__ ), false, $vstrsnln_plugin_info['Version'] ); wp_enqueue_script( 'vstrsnln_script', plugins_url( 'js/script.js', __FILE__ ), array( 'jquery' ), $vstrsnln_plugin_info['Version'], false ); wp_enqueue_script( 'vstrsnln_country_script', plugins_url( 'js/import-country.js', __FILE__ ), array(), $vstrsnln_plugin_info['Version'], false ); $vstrsnln_var = array( 'notice_finish' => __( 'Import was finished', 'visitors-online' ), 'notice_false' => __( 'Not enough rights to import from the GeoIPCountryWhois.csv file, import is impossible', 'visitors-online' ), 'vstrsnln_nonce' => wp_create_nonce( 'bws_plugin', 'vstrsnln_ajax_nonce_field' ), ); wp_localize_script( 'vstrsnln_country_script', 'vstrsnln_var', $vstrsnln_var ); wp_localize_script( 'vstrsnln_script', 'vstrsnln_ajax', array( 'vstrsnln_nonce' => wp_create_nonce( 'bws_plugin', 'vstrsnln_ajax_nonce_field' ) ) ); if ( isset( $_GET['action'] ) && 'custom_code' === $_GET['action'] ) { bws_plugins_include_codemirror(); } } } } if ( ! function_exists( 'vstrsnln_install' ) ) { /** * Function sets crons events */ function vstrsnln_install() { vstrsnln_install_base(); if ( is_multisite() ) { $all_blogs = wp_get_sites(); foreach ( $all_blogs as $key => $val ) { switch_to_blog( $val['blog_id'] ); /* Add the planned hook - check users online */ if ( ! wp_next_scheduled( 'vstrsnln_check_users' ) ) { $vstrsnln_time = time() + 60; wp_schedule_event( $vstrsnln_time, 'vstrsnln_interval', 'vstrsnln_check_users' ); } /* Add the planned hook - record of the day with the maximum number of visits */ if ( ! wp_next_scheduled( 'vstrsnln_count_visits_day' ) ) { $vstrsnln_time_daily = strtotime( date( 'Y-m-d', strtotime( ' +1 day' ) ) . ' 00:00:59' ); wp_schedule_event( $vstrsnln_time_daily, 'daily', 'vstrsnln_count_visits_day' ); } } /* register uninstall hook */ switch_to_blog( 1 ); register_uninstall_hook( __FILE__, 'vstrsnln_uninstall' ); restore_current_blog(); } else { /* Add the planned hook - check users online */ if ( ! wp_next_scheduled( 'vstrsnln_check_users' ) ) { $vstrsnln_time = time() + 60; wp_schedule_event( $vstrsnln_time, 'vstrsnln_interval', 'vstrsnln_check_users' ); } /* Add the planned hook - record of the day with the maximum number of visits */ if ( ! wp_next_scheduled( 'vstrsnln_count_visits_day' ) ) { $vstrsnln_time_daily = strtotime( date( 'Y-m-d', strtotime( ' +1 day' ) ) . ' 00:00:59' ); wp_schedule_event( $vstrsnln_time_daily, 'daily', 'vstrsnln_count_visits_day' ); } /* register uninstall hook */ register_uninstall_hook( __FILE__, 'vstrsnln_uninstall' ); } } } if ( ! function_exists( 'vstrsnln_install_base' ) ) { /** * Function to create a new tables in database, sets crons events, settings defaults */ function vstrsnln_install_base() { global $wpdb; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; /* Data users connect : connection time, country, browser, etc. */ if ( ! $wpdb->query( "SHOW TABLES LIKE '{$wpdb->base_prefix}vstrsnln_detailing'" ) ) { $sql = 'CREATE TABLE `' . $wpdb->base_prefix . 'vstrsnln_detailing` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `date_connection` DATE NOT NULL, `time_on` INT( 10 ), `time_off` INT( 10 ), `user_type` CHAR( 5 ), `user_name` VARCHAR( 255 ), `browser` CHAR( 100 ), `country_id` INT( 10 ), `ip_user` CHAR( 16 ), `user_cookie` CHAR( 32 ), `blog_id` CHAR( 5 ), PRIMARY KEY ( `id` ) ) ENGINE = InnoDB DEFAULT CHARSET = utf8;'; dbDelta( $sql ); } /* Data about day with a number of connections */ if ( ! $wpdb->query( "SHOW TABLES LIKE '{$wpdb->base_prefix}vstrsnln_general'" ) ) { $sql = 'CREATE TABLE `' . $wpdb->base_prefix . 'vstrsnln_general` ( `id` INT( 3 ) UNSIGNED NOT NULL AUTO_INCREMENT, `date_connection` DATE NOT NULL, `number_users` INT, `number_bots` INT, `number_guests` INT, `number_visits` INT, `blog_id` CHAR( 5 ), `country_id` INT, `browser` CHAR( 70 ), PRIMARY KEY ( `id` ) ) ENGINE = InnoDB DEFAULT CHARSET = utf8;'; dbDelta( $sql ); } $wpdb->query( 'ALTER TABLE `' . $wpdb->base_prefix . 'vstrsnln_general` ADD UNIQUE ( `date_connection` ,`blog_id`)' ); /* v0.2 -> 0.3 */ $wpdb->query( 'DROP TABLE IF EXISTS `' . $wpdb->base_prefix . 'bws_country`;' ); $column_exists = $wpdb->query( 'SHOW COLUMNS FROM `' . $wpdb->base_prefix . "vstrsnln_general` LIKE 'country_id'" ); if ( empty( $column_exists ) ) { $wpdb->query( 'ALTER TABLE `' . $wpdb->base_prefix . 'vstrsnln_general` ADD `country_id` INT AFTER `blog_id`;' ); $all_countries = $wpdb->get_results( 'SELECT DISTINCT `country` FROM `' . $wpdb->base_prefix . 'vstrsnln_general`', ARRAY_A ); if ( ! empty( $all_countries ) ) { $number_general = $wpdb->query( "SHOW TABLES LIKE '{$wpdb->base_prefix}bws_list_countries'" ); if ( $number_general > 0 && $wpdb->get_var( "SELECT count( * ) FROM {$wpdb->base_prefix}bws_list_countries LIMIT 1;" ) > 0 ) { foreach ( $all_countries as $value ) { $country_id = $wpdb->get_var( $wpdb->prepare( 'SELECT `id` FROM ' . $wpdb->base_prefix . 'bws_list_countries WHERE `country_name` = %s LIMIT 1;', $value['country'] ) ); $wpdb->update( $wpdb->base_prefix . 'vstrsnln_general', array( 'country_id' => $country_id ), array( 'country' => $value['country'] ) ); } } else { /* defer until creating country tables */ $vstrsnln_options['defer_update_country'] = true; } } if ( ! isset( $vstrsnln_options['defer_update_country'] ) ) { $wpdb->query( 'ALTER TABLE `' . $wpdb->base_prefix . 'vstrsnln_general` DROP COLUMN `country`;' ); } $wpdb->query( 'UPDATE `' . $wpdb->base_prefix . 'vstrsnln_detailing` SET `country_id`= 0' ); if ( ! isset( $vstrsnln_options['defer_update_country'] ) ) { vstrsnln_check_country(); } } /* Identification of the country by IP */ if ( ! $wpdb->query( "SHOW TABLES LIKE '{$wpdb->base_prefix}bws_list_ip'" ) ) { $sql = "CREATE TABLE `{$wpdb->base_prefix}bws_list_ip` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `ip_from` CHAR( 15 ), `ip_to` CHAR( 15 ), `ip_from_int` BIGINT( 12 ) UNIQUE, `ip_to_int` BIGINT( 12 ) UNIQUE, `country_id` INT, PRIMARY KEY ( `id` ) ) ENGINE = InnoDB DEFAULT CHARSET = utf8;"; dbDelta( $sql ); } if ( ! $wpdb->query( "SHOW TABLES LIKE '{$wpdb->base_prefix}bws_list_countries'" ) ) { $sql = "CREATE TABLE `{$wpdb->base_prefix}bws_list_countries` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `country_code` CHAR( 2 ) UNIQUE, `country_name` CHAR( 30 ), PRIMARY KEY ( `id` ) ) ENGINE = InnoDB DEFAULT CHARSET = utf8;"; dbDelta( $sql ); } } } if ( ! function_exists( 'vstrsnln_write_user_base' ) ) { /** * Add or changes the data a user in the table "Detailing" */ function vstrsnln_write_user_base() { global $wpdb, $vstrsnln_user_interval; /* Return in doing cron */ if ( defined( 'DOING_CRON' ) && DOING_CRON ) { return; } if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) { $vstrsnln_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); } $vstrsnln_blog_id = get_current_blog_id(); $vstrsnln_record_table = 0; if ( isset( $_COOKIE['vstrsnln'] ) ) { $vstrsnln_record_table = (int) $wpdb->get_var( $wpdb->prepare( 'SELECT count( * ) FROM `' . $wpdb->base_prefix . 'vstrsnln_detailing` WHERE `time_off` IS NULL AND `user_cookie` = %s LIMIT 1', sanitize_text_field( wp_unslash( $_COOKIE['vstrsnln'] ) ) ) ); } $vstrsnln_guest_admin = ( is_admin() ) ? false : true; if ( isset( $_COOKIE['vstrsnln'] ) && $vstrsnln_record_table > 0 ) { $vstrsnln_user = false; $vstrsnln_guest = false; /* Сheck bot */ if ( true === vstrsnln_list_bots( $vstrsnln_user_agent ) ) { $vstrsnln_user_type = 'bot'; } else { $vstrsnln_current_user = wp_get_current_user(); /* If not bot, check guest */ $vstrsnln_current_id = $vstrsnln_current_user->ID; if ( false === $vstrsnln_guest_admin ) { $vstrsnln_user = true; $vstrsnln_user_type = 'user'; } else { if ( empty( $vstrsnln_current_id ) ) { $vstrsnln_guest = true; $vstrsnln_user_type = 'guest'; } else { /* Check user */ $vstrsnln_user = true; $vstrsnln_user_type = 'user'; } } } /* Update record database table */ setcookie( 'vstrsnln', $_COOKIE['vstrsnln'], time() + $vstrsnln_user_interval * 60, '/' ); $wpdb->update( $wpdb->base_prefix . 'vstrsnln_detailing', array( 'time_on' => time(), 'date_connection' => date( 'Y.m.d' ), 'user_type' => $vstrsnln_user_type, 'blog_id' => $vstrsnln_blog_id, ), array( 'user_cookie' => sanitize_text_field( wp_unslash( $_COOKIE['vstrsnln'] ) ) ) ); } else { /* Сreate a new record of the database table */ $vstrsnln_bot = false; $vstrsnln_user = false; $vstrsnln_guest = false; if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) { $vstrsnln_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); /* Detects the browser and its version */ preg_match( '/(Firefox|Opera|Chrome|MSIE|OPR|Trident|Avant|Acoo|Iron|Orca|Lynx|Version|Opera Mini|Netscape|Konqueror|SeaMonkey|Camino|Minefield|Iceweasel|K-Meleon|Maxthon)(?:\/| )([0-9.]+)/', $vstrsnln_user_agent, $vstrsnln_browser_info ); list( , $browser, $version ) = $vstrsnln_browser_info; $vstrsnln_browser = $browser . ' ' . $version; if ( preg_match( '/Opera ( [0-9.]+ ) /i', $vstrsnln_user_agent, $opera ) ) { $vstrsnln_browser = ( $opera[1] ) ? 'Opera ' . $opera[1] : 'Opera '; } if ( 'MSIE' === $browser ) { preg_match( '/( Maxthon|Avant Browser|MyIE2 )/i', $vstrsnln_user_agent, $ie ); $vstrsnln_browser = ( $ie && $ie[1] ) ? $ie[1] . ' based on IE ' . $version : 'IE ' . $version; } if ( 'Firefox' === $browser ) { preg_match( '/( Flock|Navigator|Epiphany)\/([0-9.]+ ) /', $vstrsnln_user_agent, $ff ); if ( $ff ) { $vstrsnln_browser = ( $ff[1] && $ff[2] ) ? $ff[1] . ' ' . $ff[2] : ''; } } if ( 'Opera' === $browser && '9.80' === $version ) { $vstrsnln_browser = 'Opera ' . substr( $vstrsnln_user_agent, -5 ); } if ( 'Version' === $browser ) { $vstrsnln_browser = 'Safari ' . $version; } if ( ! $browser && strpos( $vstrsnln_user_agent, 'Gecko' ) ) { $vstrsnln_browser = 'Browser based on Gecko'; } /* Сheck bot */ if ( true === vstrsnln_list_bots( $vstrsnln_user_agent ) ) { $vstrsnln_user_type = 'bot'; $vstrsnln_bot = true; } } else { $vstrsnln_browser = ''; } if ( true !== $vstrsnln_bot ) { $vstrsnln_current_user = wp_get_current_user(); /* If not bot, check guest */ $vstrsnln_current_id = $vstrsnln_current_user->ID; if ( false === $vstrsnln_guest_admin ) { $vstrsnln_user = true; $vstrsnln_user_type = 'user'; } else { if ( empty( $vstrsnln_current_id ) ) { $vstrsnln_guest = true; $vstrsnln_user_type = 'guest'; } else { /* Check user */ $vstrsnln_user = true; $vstrsnln_user_type = 'user'; } } } /* Set a cookie */ $vstrsnln_cookie_value = md5( 'vstrsnln' . date( 'H:i:s' ) ); setcookie( 'vstrsnln', $vstrsnln_cookie_value, time() + $vstrsnln_user_interval * 60, '/' ); /* Detects the IP */ $ip = ''; if ( isset( $_SERVER ) ) { $sever_vars = array( 'REMOTE_ADDR', 'HTTP_X_REAL_IP', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR' ); foreach ( $sever_vars as $var ) { if ( isset( $_SERVER[ $var ] ) && ! empty( $_SERVER[ $var ] ) ) { if ( filter_var( $_SERVER[ $var ], FILTER_VALIDATE_IP ) ) { $ip = sanitize_text_field( wp_unslash( $_SERVER[ $var ] ) ); break; } else { /* if proxy */ $ip_array = explode( ',', sanitize_text_field( wp_unslash( $_SERVER[ $var ] ) ) ); if ( is_array( $ip_array ) && ! empty( $ip_array ) && filter_var( $ip_array[0], FILTER_VALIDATE_IP ) ) { $ip = $ip_array[0]; break; } } } } } if ( ! empty( $ip ) ) { /* Detects the country */ $number_general = $wpdb->query( "SHOW TABLES LIKE '{$wpdb->base_prefix}bws_list_ip'" ); if ( $number_general > 0 ) { $vstrsnln_country = $wpdb->get_var( $wpdb->prepare( 'SELECT `country_id` FROM `' . $wpdb->base_prefix . 'bws_list_ip` WHERE `ip_from_int` <= %s AND `ip_to_int` >= %s LIMIT 1;', sprintf( '%u', ip2long( $ip ) ), sprintf( '%u', ip2long( $ip ) ) ) ); } else { $vstrsnln_country = 0; } $wpdb->insert( $wpdb->base_prefix . 'vstrsnln_detailing', array( 'date_connection' => date( 'Y.m.d' ), 'time_on' => time(), 'user_type' => $vstrsnln_user_type, 'browser' => $vstrsnln_browser, 'country_id' => $vstrsnln_country, 'ip_user' => $ip, 'user_cookie' => $vstrsnln_cookie_value, 'blog_id' => $vstrsnln_blog_id, ) ); } } } } if ( ! function_exists( 'vstrsnln_check_user' ) ) { /** * We do not check the elapsed time during which the user is considered online */ function vstrsnln_check_user() { global $wpdb, $vstrsnln_user_interval; $vstrsnln_blog_id = get_current_blog_id(); $time = time() - $vstrsnln_user_interval * 60; $vstrsnln_all_users = $wpdb->get_results( $wpdb->prepare( 'SELECT `id` FROM `' . $wpdb->base_prefix . 'vstrsnln_detailing` WHERE `time_off` IS NULL AND `time_on` <= %d AND `blog_id` = %d', $time, $vstrsnln_blog_id ) ); if ( is_array( $vstrsnln_all_users ) ) { foreach ( $vstrsnln_all_users as $vstrsnln_user ) { $wpdb->update( $wpdb->base_prefix . 'vstrsnln_detailing', array( 'time_off' => time(), ), array( 'id' => $vstrsnln_user->id, 'blog_id' => $vstrsnln_blog_id, ) ); } } } } if ( ! function_exists( 'vstrsnln_settings_page' ) ) { /** * Work on the settings page */ function vstrsnln_settings_page() { global $vstrsnln_options; $message = ''; $error = ''; if ( isset( $_REQUEST['vstrsnln_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'vstrsnln_nonce_name' ) ) { if ( isset( $_POST['bws_hide_premium_options'] ) ) { $hide_result = bws_hide_premium_options( $vstrsnln_options ); $vstrsnln_options = $hide_result['options']; } } /* Pressing the 'Import Country' */ $vstrsnln_result_downloaded = vstrsnln_press_buttom_import(); $result = $vstrsnln_result_downloaded['result']; if ( 0 !== $result ) { $message = $vstrsnln_result_downloaded['message']; $error = $vstrsnln_result_downloaded['error']; } if ( true === $result ) { vstrsnln_check_country( true ); } if ( ! class_exists( 'Bws_Settings_Tabs' ) ) { require_once dirname( __FILE__ ) . '/bws_menu/class-bws-settings.php'; } require_once dirname( __FILE__ ) . '/includes/class-vstrsnln-settings.php'; $page = new Vstrsnln_Settings_Tabs( plugin_basename( __FILE__ ) ); ?>