| @@ -1,351 +1,940 @@ | ||
| 1 | 1 | <?php |
| 2 | -/* | |
| 3 | - Function for displaying BestWebSoft menu | |
| 4 | -*/ | |
| 2 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | + exit; | |
| 4 | +} | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * Function for displaying BestWebSoft menu | |
| 8 | + * Version: 2.4.3 | |
| 9 | + */ | |
| 10 | +if ( ! function_exists( 'bws_admin_enqueue_scripts' ) ) { | |
| 11 | + require_once dirname( __FILE__ ) . '/bws_functions.php'; | |
| 12 | +} | |
| 13 | + | |
| 5 | 14 | if ( ! function_exists( 'bws_add_menu_render' ) ) { |
| 15 | + /** | |
| 16 | + * Function for render BestWebSoft menu | |
| 17 | + */ | |
| 6 | 18 | function bws_add_menu_render() { |
| 7 | - global $wpdb, $wp_version, $title; | |
| 8 | - $all_plugins = get_plugins(); | |
| 9 | - $error = ''; | |
| 19 | + global $wpdb, $wp_version, $bstwbsftwppdtplgns_options; | |
| 20 | + $error = ''; | |
| 10 | 21 | $message = ''; |
| 11 | - $bwsmn_form_email = ''; | |
| 12 | - $active_plugins = get_option( 'active_plugins' ); | |
| 13 | 22 | |
| 14 | - $array_activate = array(); | |
| 15 | - $array_install = array(); | |
| 16 | - $array_recomend = array(); | |
| 17 | - $count_activate = $count_install = $count_recomend = 0; | |
| 18 | - $array_plugins = array( | |
| 19 | - array( 'captcha\/captcha.php', 'Captcha', 'http://bestwebsoft.com/plugin/captcha-plugin/', 'http://bestwebsoft.com/plugin/captcha-plugin/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Captcha+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=captcha.php' ), | |
| 20 | - array( 'contact-form-plugin\/contact_form.php', 'Contact Form', 'http://bestwebsoft.com/plugin/contact-form/', 'http://bestwebsoft.com/plugin/contact-form/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Contact+Form+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=contact_form.php' ), | |
| 21 | - array( 'facebook-button-plugin\/facebook-button-plugin.php', 'Facebook Like Button Plugin', 'http://bestwebsoft.com/plugin/facebook-like-button-plugin/', 'http://bestwebsoft.com/plugin/facebook-like-button-plugin/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Facebook+Like+Button+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=facebook-button-plugin.php' ), | |
| 22 | - array( 'twitter-plugin\/twitter.php', 'Twitter Plugin', 'http://bestwebsoft.com/plugin/twitter-plugin/', 'http://bestwebsoft.com/plugin/twitter-plugin/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Twitter+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=twitter.php' ), | |
| 23 | - array( 'portfolio\/portfolio.php', 'Portfolio', 'http://bestwebsoft.com/plugin/portfolio-plugin/', 'http://bestwebsoft.com/plugin/portfolio-plugin/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Portfolio+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=portfolio.php' ), | |
| 24 | - array( 'gallery-plugin\/gallery-plugin.php', 'Gallery', 'http://bestwebsoft.com/plugin/gallery-plugin/', 'http://bestwebsoft.com/plugin/gallery-plugin/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Gallery+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=gallery-plugin.php' ), | |
| 25 | - array( 'adsense-plugin\/adsense-plugin.php', 'Google AdSense Plugin', 'http://bestwebsoft.com/plugin/google-adsense-plugin/', 'http://bestwebsoft.com/plugin/google-adsense-plugin/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Adsense+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=adsense-plugin.php' ), | |
| 26 | - array( 'custom-search-plugin\/custom-search-plugin.php', 'Custom Search Plugin', 'http://bestwebsoft.com/plugin/custom-search-plugin/', 'http://bestwebsoft.com/plugin/custom-search-plugin/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Custom+Search+plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=custom_search.php' ), | |
| 27 | - array( 'quotes-and-tips\/quotes-and-tips.php', 'Quotes and Tips', 'http://bestwebsoft.com/plugin/quotes-and-tips/', 'http://bestwebsoft.com/plugin/quotes-and-tips/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Quotes+and+Tips+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=quotes-and-tips.php' ), | |
| 28 | - array( 'google-sitemap-plugin\/google-sitemap-plugin.php', 'Google sitemap plugin', 'http://bestwebsoft.com/plugin/google-sitemap-plugin/', 'http://bestwebsoft.com/plugin/google-sitemap-plugin/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Google+sitemap+plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=google-sitemap-plugin.php' ), | |
| 29 | - array( 'updater\/updater.php', 'Updater', 'http://bestwebsoft.com/plugin/updater-plugin/', 'http://bestwebsoft.com/plugin/updater-plugin/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=updater+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=updater-options' ), | |
| 30 | - array( 'custom-fields-search\/custom-fields-search.php', 'Custom Fields Search', 'http://bestwebsoft.com/plugin/custom-fields-search/', 'http://bestwebsoft.com/plugin/custom-fields-search/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Custom+Fields+Search+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=custom_fields_search.php' ), | |
| 31 | - array( 'google-one\/google-plus-one.php', 'Google +1', 'http://bestwebsoft.com/plugin/google-plus-one/', 'http://bestwebsoft.com/plugin/google-plus-one/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Google+%2B1+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=google-plus-one.php' ), | |
| 32 | - array( 'relevant\/related-posts-plugin.php', 'Related Posts Plugin', 'http://bestwebsoft.com/plugin/related-posts-plugin/', 'http://bestwebsoft.com/plugin/related-posts-plugin/#download', '/wp-admin/plugin-install.php?tab=search&s=Related+Posts+Plugin+Bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=related-posts-plugin.php' ), | |
| 33 | - array( 'contact-form-to-db\/contact_form_to_db.php', 'Contact Form to DB', 'http://bestwebsoft.com/plugin/contact-form-to-db/', 'http://bestwebsoft.com/plugin/contact-form-to-db/#download', '/wp-admin/plugin-install.php?tab=search&s=Contact+Form+to+DB+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=cntctfrmtdb_settings' ), | |
| 34 | - array( 'pdf-print\/pdf-print.php', 'PDF & Print', 'http://bestwebsoft.com/plugin/pdf-print/', 'http://bestwebsoft.com/plugin/pdf-print/#download', '/wp-admin/plugin-install.php?tab=search&s=PDF+Print+Bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=pdf-print.php' ) | |
| 35 | - ); | |
| 36 | - foreach ( $array_plugins as $plugins ) { | |
| 37 | - if ( 0 < count( preg_grep( "/" . $plugins[0] . "/", $active_plugins ) ) || is_plugin_active_for_network( str_replace( '\\', '', $plugins[0] ) ) ) { | |
| 38 | - $array_activate[ $count_activate ]["title"] = $plugins[1]; | |
| 39 | - $array_activate[ $count_activate ]["link"] = $plugins[2]; | |
| 40 | - $array_activate[ $count_activate ]["href"] = $plugins[3]; | |
| 41 | - $array_activate[ $count_activate ]["url"] = $plugins[5]; | |
| 42 | - $count_activate++; | |
| 43 | - } else if ( array_key_exists( str_replace( "\\", "", $plugins[0] ), $all_plugins ) ) { | |
| 44 | - $array_install[ $count_install ]["title"] = $plugins[1]; | |
| 45 | - $array_install[ $count_install ]["link"] = $plugins[2]; | |
| 46 | - $array_install[ $count_install ]["href"] = $plugins[3]; | |
| 47 | - $count_install++; | |
| 48 | - } else { | |
| 49 | - $array_recomend[ $count_recomend ]["title"] = $plugins[1]; | |
| 50 | - $array_recomend[ $count_recomend ]["link"] = $plugins[2]; | |
| 51 | - $array_recomend[ $count_recomend ]["href"] = $plugins[3]; | |
| 52 | - $array_recomend[ $count_recomend ]["slug"] = $plugins[4]; | |
| 53 | - $count_recomend++; | |
| 23 | + /** | |
| 24 | + * @deprecated 1.9.8 (15.12.2016) | |
| 25 | + */ | |
| 26 | + $is_main_page = isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'bws_panel', 'bws_themes', 'bws_system_status' ) ); | |
| 27 | + $page = sanitize_text_field( wp_unslash( $_GET['page'] ) ); | |
| 28 | + $tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : ''; | |
| 29 | + | |
| 30 | + if ( $is_main_page ) { | |
| 31 | + $current_page = 'admin.php?page=' . $page; | |
| 32 | + } else { | |
| 33 | + $current_page = isset( $_GET['tab'] ) ? 'admin.php?page=' . $page . '&tab=' . $tab : 'admin.php?page=' . $page; | |
| 34 | + } | |
| 35 | + | |
| 36 | + if ( 'bws_panel' === $page || ( ! $is_main_page && '' === $tab ) ) { | |
| 37 | + | |
| 38 | + if ( ! function_exists( 'is_plugin_active_for_network' ) ) { | |
| 39 | + require_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| 54 | 40 | } |
| 55 | - } | |
| 56 | - $array_activate_pro = array(); | |
| 57 | - $array_install_pro = array(); | |
| 58 | - $array_recomend_pro = array(); | |
| 59 | - $count_activate_pro = $count_install_pro = $count_recomend_pro = 0; | |
| 60 | - $array_plugins_pro = array( | |
| 61 | - array( 'gallery-plugin-pro\/gallery-plugin-pro.php', 'Gallery Pro', 'http://bestwebsoft.com/plugin/gallery-pro/?k=382e5ce7c96a6391f5ffa5e116b37fe0', 'http://bestwebsoft.com/plugin/gallery-pro/?k=382e5ce7c96a6391f5ffa5e116b37fe0#purchase', 'admin.php?page=gallery-plugin-pro.php' ), | |
| 62 | - array( 'contact-form-pro\/contact_form_pro.php', 'Contact Form Pro', 'http://bestwebsoft.com/plugin/contact-form-pro/?k=773dc97bb3551975db0e32edca1a6d71', 'http://bestwebsoft.com/plugin/contact-form-pro/?k=773dc97bb3551975db0e32edca1a6d71#purchase', 'admin.php?page=contact_form_pro.php' ), | |
| 63 | - array( 'captcha-pro\/captcha_pro.php', 'Captcha Pro', 'http://bestwebsoft.com/plugin/captcha-pro/?k=ff7d65e55e5e7f98f219be9ed711094e', 'http://bestwebsoft.com/plugin/captcha-pro/?k=ff7d65e55e5e7f98f219be9ed711094e#purchase', 'admin.php?page=captcha_pro.php' ), | |
| 64 | - array( 'updater-pro\/updater_pro.php', 'Updater Pro', 'http://bestwebsoft.com/plugin/updater-pro/?k=cf633acbefbdff78545347fe08a3aecb', 'http://bestwebsoft.com/plugin/updater-pro?k=cf633acbefbdff78545347fe08a3aecb#purchase', 'admin.php?page=updater-pro-options' ), | |
| 65 | - array( 'contact-form-to-db-pro\/contact_form_to_db_pro.php', 'Contact Form to DB Pro', 'http://bestwebsoft.com/plugin/contact-form-to-db-pro/?k=6ce5f4a9006ec906e4db643669246c6a', 'http://bestwebsoft.com/plugin/contact-form-to-db-pro/?k=6ce5f4a9006ec906e4db643669246c6a#purchase', 'admin.php?page=cntctfrmtdbpr_settings' ) | |
| 66 | - ); | |
| 67 | - foreach ( $array_plugins_pro as $plugins ) { | |
| 68 | - if ( 0 < count( preg_grep( "/" . $plugins[0] . "/", $active_plugins ) ) || is_plugin_active_for_network( str_replace( '\\', '', $plugins[0] ) ) ) { | |
| 69 | - $array_activate_pro[ $count_activate_pro ]["title"] = $plugins[1]; | |
| 70 | - $array_activate_pro[ $count_activate_pro ]["link"] = $plugins[2]; | |
| 71 | - $array_activate_pro[ $count_activate_pro ]["href"] = $plugins[3]; | |
| 72 | - $array_activate_pro[ $count_activate_pro ]["url"] = $plugins[4]; | |
| 73 | - $count_activate_pro++; | |
| 74 | - } else if ( array_key_exists( str_replace( "\\", "", $plugins[0]), $all_plugins ) ) { | |
| 75 | - $array_install_pro[ $count_install_pro ]["title"] = $plugins[1]; | |
| 76 | - $array_install_pro[ $count_install_pro ]["link"] = $plugins[2]; | |
| 77 | - $array_install_pro[ $count_install_pro ]["href"] = $plugins[3]; | |
| 78 | - $count_install_pro++; | |
| 41 | + | |
| 42 | + /* Get $bws_plugins */ | |
| 43 | + require dirname( __FILE__ ) . '/product_list.php'; | |
| 44 | + | |
| 45 | + $all_plugins = get_plugins(); | |
| 46 | + $active_plugins = get_option( 'active_plugins' ); | |
| 47 | + $sitewide_active_plugins = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'active_sitewide_plugins' ) : array(); | |
| 48 | + $update_availible_all = get_site_transient( 'update_plugins' ); | |
| 49 | + | |
| 50 | + $plugin_category = isset( $_GET['category'] ) ? sanitize_text_field( wp_unslash( $_GET['category'] ) ) : 'all'; | |
| 51 | + | |
| 52 | + if ( ( isset( $_GET['sub'] ) && 'installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) ) || ! isset( $_GET['sub'] ) ) { | |
| 53 | + $bws_plugins_update_availible = array(); | |
| 54 | + $bws_plugins_expired = array(); | |
| 55 | + foreach ( $bws_plugins as $key_plugin => $value_plugin ) { | |
| 56 | + | |
| 57 | + foreach ( $value_plugin['category'] as $category_key ) { | |
| 58 | + $bws_plugins_category[ $category_key ]['count'] = isset( $bws_plugins_category[ $category_key ]['count'] ) ? $bws_plugins_category[ $category_key ]['count'] + 1 : 1; | |
| 59 | + } | |
| 60 | + | |
| 61 | + $is_installed = array_key_exists( $key_plugin, $all_plugins ); | |
| 62 | + $is_pro_installed = false; | |
| 63 | + if ( isset( $value_plugin['pro_version'] ) ) { | |
| 64 | + $is_pro_installed = array_key_exists( $value_plugin['pro_version'], $all_plugins ); | |
| 65 | + } | |
| 66 | + /* Check update_availible */ | |
| 67 | + if ( ! empty( $update_availible_all ) && ! empty( $update_availible_all->response ) ) { | |
| 68 | + if ( $is_pro_installed && array_key_exists( $value_plugin['pro_version'], $update_availible_all->response ) ) { | |
| 69 | + unset( $bws_plugins[ $key_plugin ] ); | |
| 70 | + $value_plugin['update_availible'] = $value_plugin['pro_version']; | |
| 71 | + $bws_plugins_update_availible[ $key_plugin ] = $value_plugin; | |
| 72 | + } elseif ( $is_installed && array_key_exists( $key_plugin, $update_availible_all->response ) ) { | |
| 73 | + unset( $bws_plugins[ $key_plugin ] ); | |
| 74 | + $value_plugin['update_availible'] = $key_plugin; | |
| 75 | + $bws_plugins_update_availible[ $key_plugin ] = $value_plugin; | |
| 76 | + } | |
| 77 | + } | |
| 78 | + /* Check expired */ | |
| 79 | + if ( $is_pro_installed && isset( $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ] ) && | |
| 80 | + strtotime( $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ] ) < strtotime( gmdate( 'm/d/Y' ) ) ) { | |
| 81 | + unset( $bws_plugins[ $key_plugin ] ); | |
| 82 | + $value_plugin['expired'] = $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ]; | |
| 83 | + $bws_plugins_expired[ $key_plugin ] = $value_plugin; | |
| 84 | + } | |
| 85 | + } | |
| 86 | + $bws_plugins = $bws_plugins_update_availible + $bws_plugins_expired + $bws_plugins; | |
| 79 | 87 | } else { |
| 80 | - $array_recomend_pro[ $count_recomend_pro ]["title"] = $plugins[1]; | |
| 81 | - $array_recomend_pro[ $count_recomend_pro ]["link"] = $plugins[2]; | |
| 82 | - $array_recomend_pro[ $count_recomend_pro ]["href"] = $plugins[3]; | |
| 83 | - $count_recomend_pro++; | |
| 88 | + foreach ( $bws_plugins as $key_plugin => $value_plugin ) { | |
| 89 | + foreach ( $value_plugin['category'] as $category_key ) { | |
| 90 | + $bws_plugins_category[ $category_key ]['count'] = isset( $bws_plugins_category[ $category_key ]['count'] ) ? $bws_plugins_category[ $category_key ]['count'] + 1 : 1; | |
| 91 | + } | |
| 92 | + } | |
| 84 | 93 | } |
| 85 | - } | |
| 86 | - $sql_version = $wpdb->get_var( "SELECT VERSION() AS version" ); | |
| 87 | - $mysql_info = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" ); | |
| 88 | - if ( is_array( $mysql_info) ) | |
| 89 | - $sql_mode = $mysql_info[0]->Value; | |
| 90 | - if ( empty( $sql_mode ) ) | |
| 91 | - $sql_mode = __( 'Not set', 'bestwebsoft' ); | |
| 92 | - if ( ini_get( 'safe_mode' ) ) | |
| 93 | - $safe_mode = __( 'On', 'bestwebsoft' ); | |
| 94 | - else | |
| 95 | - $safe_mode = __( 'Off', 'bestwebsoft' ); | |
| 96 | - if ( ini_get( 'allow_url_fopen' ) ) | |
| 97 | - $allow_url_fopen = __( 'On', 'bestwebsoft' ); | |
| 98 | - else | |
| 99 | - $allow_url_fopen = __( 'Off', 'bestwebsoft' ); | |
| 100 | - if ( ini_get( 'upload_max_filesize' ) ) | |
| 101 | - $upload_max_filesize = ini_get( 'upload_max_filesize' ); | |
| 102 | - else | |
| 103 | - $upload_max_filesize = __( 'N/A', 'bestwebsoft' ); | |
| 104 | - if ( ini_get('post_max_size') ) | |
| 105 | - $post_max_size = ini_get('post_max_size'); | |
| 106 | - else | |
| 107 | - $post_max_size = __( 'N/A', 'bestwebsoft' ); | |
| 108 | - if ( ini_get( 'max_execution_time' ) ) | |
| 109 | - $max_execution_time = ini_get( 'max_execution_time' ); | |
| 110 | - else | |
| 111 | - $max_execution_time = __( 'N/A', 'bestwebsoft' ); | |
| 112 | - if ( ini_get( 'memory_limit' ) ) | |
| 113 | - $memory_limit = ini_get( 'memory_limit' ); | |
| 114 | - else | |
| 115 | - $memory_limit = __( 'N/A', 'bestwebsoft' ); | |
| 116 | - if ( function_exists( 'memory_get_usage' ) ) | |
| 117 | - $memory_usage = round( memory_get_usage() / 1024 / 1024, 2 ) . __( ' Mb', 'bestwebsoft' ); | |
| 118 | - else | |
| 119 | - $memory_usage = __( 'N/A', 'bestwebsoft' ); | |
| 120 | - if ( is_callable( 'exif_read_data' ) ) | |
| 121 | - $exif_read_data = __( 'Yes', 'bestwebsoft' ) . " ( V" . substr( phpversion( 'exif' ), 0,4 ) . ")" ; | |
| 122 | - else | |
| 123 | - $exif_read_data = __( 'No', 'bestwebsoft' ); | |
| 124 | - if ( is_callable( 'iptcparse' ) ) | |
| 125 | - $iptcparse = __( 'Yes', 'bestwebsoft' ); | |
| 126 | - else | |
| 127 | - $iptcparse = __( 'No', 'bestwebsoft' ); | |
| 128 | - if ( is_callable( 'xml_parser_create' ) ) | |
| 129 | - $xml_parser_create = __( 'Yes', 'bestwebsoft' ); | |
| 130 | - else | |
| 131 | - $xml_parser_create = __( 'No', 'bestwebsoft' ); | |
| 132 | 94 | |
| 133 | - if ( function_exists( 'wp_get_theme' ) ) | |
| 134 | - $theme = wp_get_theme(); | |
| 135 | - else | |
| 136 | - $theme = get_theme( get_current_theme() ); | |
| 95 | + /*** Membership */ | |
| 96 | + $bws_license_plugin = 'bws_get_list_for_membership'; | |
| 97 | + $bws_license_key = isset( $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) ? $bstwbsftwppdtplgns_options[ $bws_license_plugin ] : ''; | |
| 98 | + $update_membership_list = true; | |
| 137 | 99 | |
| 138 | - if ( function_exists( 'is_multisite' ) ) { | |
| 139 | - if ( is_multisite() ) { | |
| 140 | - $multisite = __( 'Yes', 'bestwebsoft' ); | |
| 141 | - } else { | |
| 142 | - $multisite = __( 'No', 'bestwebsoft' ); | |
| 100 | + if ( isset( $_POST['bws_license_key'] ) ) { | |
| 101 | + $bws_license_key = sanitize_text_field( wp_unslash( $_POST['bws_license_key'] ) ); | |
| 143 | 102 | } |
| 144 | - } else | |
| 145 | - $multisite = __( 'N/A', 'bestwebsoft' ); | |
| 146 | 103 | |
| 147 | - $site_url = get_option( 'siteurl' ); | |
| 148 | - $home_url = get_option( 'home' ); | |
| 149 | - $db_version = get_option( 'db_version' ); | |
| 150 | - $system_info = array( | |
| 151 | - 'system_info' => '', | |
| 152 | - 'active_plugins' => '', | |
| 153 | - 'inactive_plugins' => '' | |
| 154 | - ); | |
| 155 | - $system_info['system_info'] = array( | |
| 156 | - __( 'Operating System', 'bestwebsoft' ) => PHP_OS, | |
| 157 | - __( 'Server', 'bestwebsoft' ) => $_SERVER["SERVER_SOFTWARE"], | |
| 158 | - __( 'Memory usage', 'bestwebsoft' ) => $memory_usage, | |
| 159 | - __( 'MYSQL Version', 'bestwebsoft' ) => $sql_version, | |
| 160 | - __( 'SQL Mode', 'bestwebsoft' ) => $sql_mode, | |
| 161 | - __( 'PHP Version', 'bestwebsoft' ) => PHP_VERSION, | |
| 162 | - __( 'PHP Safe Mode', 'bestwebsoft' ) => $safe_mode, | |
| 163 | - __( 'PHP Allow URL fopen', 'bestwebsoft' ) => $allow_url_fopen, | |
| 164 | - __( 'PHP Memory Limit', 'bestwebsoft' ) => $memory_limit, | |
| 165 | - __( 'PHP Max Upload Size', 'bestwebsoft' ) => $upload_max_filesize, | |
| 166 | - __( 'PHP Max Post Size', 'bestwebsoft' ) => $post_max_size, | |
| 167 | - __( 'PHP Max Script Execute Time', 'bestwebsoft' ) => $max_execution_time, | |
| 168 | - __( 'PHP Exif support', 'bestwebsoft' ) => $exif_read_data, | |
| 169 | - __( 'PHP IPTC support', 'bestwebsoft' ) => $iptcparse, | |
| 170 | - __( 'PHP XML support', 'bestwebsoft' ) => $xml_parser_create, | |
| 171 | - __( 'Site URL', 'bestwebsoft' ) => $site_url, | |
| 172 | - __( 'Home URL', 'bestwebsoft' ) => $home_url, | |
| 173 | - __( 'WordPress Version', 'bestwebsoft' ) => $wp_version, | |
| 174 | - __( 'WordPress DB Version', 'bestwebsoft' ) => $db_version, | |
| 175 | - __( 'Multisite', 'bestwebsoft' ) => $multisite, | |
| 176 | - __( 'Active Theme', 'bestwebsoft' ) => $theme['Name'] . ' ' . $theme['Version'] | |
| 177 | - ); | |
| 178 | - foreach ( $all_plugins as $path => $plugin ) { | |
| 179 | - if ( is_plugin_active( $path ) ) { | |
| 180 | - $system_info['active_plugins'][ $plugin['Name'] ] = $plugin['Version']; | |
| 181 | - } else { | |
| 182 | - $system_info['inactive_plugins'][ $plugin['Name'] ] = $plugin['Version']; | |
| 104 | + if ( isset( $_SESSION['bws_membership_time_check'] ) && isset( $_SESSION['bws_membership_list'] ) && $_SESSION['bws_membership_time_check'] < strtotime( '+12 hours' ) ) { | |
| 105 | + $update_membership_list = false; | |
| 106 | + $plugins_array = $_SESSION['bws_membership_list']; | |
| 107 | + foreach ( $plugins_array as $plugins_key => $plugins_value ) { | |
| 108 | + if ( is_array( $plugins_value ) ) { | |
| 109 | + $plugins_array[ $plugins_key ] = array_map( 'sanitize_text_field', array_map( 'wp_unslash', $plugins_value ) ); | |
| 110 | + } elseif ( is_object( $plugins_value ) ) { | |
| 111 | + foreach ( $plugins_value as $plugins_key2 => $plugins_value2 ) { | |
| 112 | + $plugins_value->$plugins_key2 = sanitize_text_field( wp_unslash( $plugins_value2 ) ); | |
| 113 | + } | |
| 114 | + $plugins_array[ $plugins_key ] = $plugins_value; | |
| 115 | + } else { | |
| 116 | + $plugins_array[ $plugins_key ] = sanitize_text_field( wp_unslash( $plugins_value ) ); | |
| 117 | + } | |
| 118 | + } | |
| 183 | 119 | } |
| 184 | - } | |
| 185 | 120 | |
| 186 | - if ( ( isset( $_REQUEST['bwsmn_form_submit'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ) ) || | |
| 187 | - ( isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ) ) ) { | |
| 188 | - if ( isset( $_REQUEST['bwsmn_form_email'] ) ) { | |
| 189 | - $bwsmn_form_email = trim( $_REQUEST['bwsmn_form_email'] ); | |
| 190 | - if ( $bwsmn_form_email == "" || !preg_match( "/^((?:[a-z0-9']+(?:[a-z0-9\-_\.']+)?@[a-z0-9]+(?:[a-z0-9\-\.]+)?\.[a-z]{2,5})[, ]*)+$/i", $bwsmn_form_email ) ) { | |
| 191 | - $error = __( "Please enter a valid email address.", 'bestwebsoft' ); | |
| 121 | + if ( ( $update_membership_list && ! empty( $bws_license_key ) ) || ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_license_nonce_name' ) ) ) { | |
| 122 | + | |
| 123 | + if ( '' !== $bws_license_key ) { | |
| 124 | + if ( 18 !== strlen( $bws_license_key ) ) { | |
| 125 | + $error = __( 'Wrong license key', 'bestwebsoft' ); | |
| 126 | + } else { | |
| 127 | + | |
| 128 | + if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) { | |
| 129 | + $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] + 1; | |
| 130 | + } else { | |
| 131 | + $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = 1; | |
| 132 | + $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] = time(); | |
| 133 | + } | |
| 134 | + | |
| 135 | + /* get Pro list */ | |
| 136 | + $to_send = array(); | |
| 137 | + $to_send['plugins'][ $bws_license_plugin ] = array(); | |
| 138 | + $to_send['plugins'][ $bws_license_plugin ]['bws_license_key'] = $bws_license_key; | |
| 139 | + $options = array( | |
| 140 | + 'timeout' => ( ( defined( 'DOING_CRON' ) && DOING_CRON ) ? 30 : 3 ), | |
| 141 | + 'body' => array( 'plugins' => serialize( $to_send ) ), | |
| 142 | + 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ), | |
| 143 | + ); | |
| 144 | + $raw_response = wp_remote_post( 'https://bestwebsoft.com/wp-content/plugins/paid-products/plugins/pro-license-check/1.0/', $options ); | |
| 145 | + | |
| 146 | + if ( is_wp_error( $raw_response ) || 200 !== wp_remote_retrieve_response_code( $raw_response ) ) { | |
| 147 | + $error = __( 'Something went wrong. Please try again later. If the error appears again, please contact us', 'bestwebsoft' ) . ' <a href="https://support.bestwebsoft.com">BestWebSoft</a>. ' . __( 'We are sorry for inconvenience.', 'bestwebsoft' ); | |
| 148 | + } else { | |
| 149 | + $response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) ); | |
| 150 | + | |
| 151 | + if ( is_array( $response ) && ! empty( $response ) ) { | |
| 152 | + foreach ( $response as $key => $value ) { | |
| 153 | + if ( 'wrong_license_key' === $value->package ) { | |
| 154 | + $error = __( 'Wrong license key.', 'bestwebsoft' ); | |
| 155 | + } elseif ( 'wrong_domain' === $value->package ) { | |
| 156 | + $error = __( 'This license key is bound to another site. Change it via personal Client Area.', 'bestwebsoft' ) . '<a target="_blank" href="https://bestwebsoft.com/client-area">' . __( 'Log in', 'bestwebsoft' ) . '</a>'; | |
| 157 | + } elseif ( 'you_are_banned' === $value->package ) { | |
| 158 | + $error = __( 'Unfortunately, you have exceeded the number of available tries per day.', 'bestwebsoft' ); | |
| 159 | + } elseif ( 'time_out' === $value->package ) { | |
| 160 | + $error = sprintf( __( 'Unfortunately, Your license has expired. To continue getting top-priority support and plugin updates, you should extend it in your %s', 'bestwebsoft' ), ' <a href="https://bestwebsoft.com/client-area">Client Area</a>' ); | |
| 161 | + } elseif ( 'duplicate_domen_for_trial' === $value->package ) { | |
| 162 | + $error = __( 'Unfortunately, the Pro licence was already installed to this domain. The Pro Trial license can be installed only once.', 'bestwebsoft' ); | |
| 163 | + } elseif ( is_array( $value->package ) && ! empty( $value->package ) ) { | |
| 164 | + $plugins_array = $_SESSION['bws_membership_list'] = $value->package; | |
| 165 | + $_SESSION['bws_membership_time_check'] = strtotime( 'now' ); | |
| 166 | + | |
| 167 | + if ( isset( $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) && $bws_license_key === $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) { | |
| 168 | + $message = __( 'The license key is valid.', 'bestwebsoft' ); | |
| 169 | + if ( isset( $value->time_out ) && '' !== $value->time_out ) { | |
| 170 | + $message .= ' ' . __( 'Your license will expire on', 'bestwebsoft' ) . ' ' . $value->time_out . '.'; | |
| 171 | + } | |
| 172 | + } else { | |
| 173 | + $message = __( 'Congratulations! Pro Membership license is activated successfully.', 'bestwebsoft' ); | |
| 174 | + } | |
| 175 | + | |
| 176 | + $bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key; | |
| 177 | + } | |
| 178 | + } | |
| 179 | + } else { | |
| 180 | + $error = __( 'Something went wrong. Try again later or upload the plugin manually. We are sorry for inconvenience.', 'bestwebsoft' ); | |
| 181 | + } | |
| 182 | + } | |
| 183 | + | |
| 184 | + if ( is_multisite() ) { | |
| 185 | + update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); | |
| 186 | + } else { | |
| 187 | + update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); | |
| 188 | + } | |
| 189 | + } | |
| 192 | 190 | } else { |
| 193 | - $email = $bwsmn_form_email; | |
| 194 | - $bwsmn_form_email = ''; | |
| 195 | - $message = __( 'Email with system info is sent to ', 'bestwebsoft' ) . $email; | |
| 191 | + $error = __( 'Please enter your license key.', 'bestwebsoft' ); | |
| 196 | 192 | } |
| 193 | + } | |
| 194 | + } elseif ( 'bws_system_status' === $page || 'system-status' === $tab ) { | |
| 195 | + | |
| 196 | + $all_plugins = get_plugins(); | |
| 197 | + $active_plugins = get_option( 'active_plugins' ); | |
| 198 | + $mysql_info = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" ); | |
| 199 | + if ( is_array( $mysql_info ) ) { | |
| 200 | + $sql_mode = $mysql_info[0]->Value; | |
| 201 | + } | |
| 202 | + if ( empty( $sql_mode ) ) { | |
| 203 | + $sql_mode = __( 'Not set', 'bestwebsoft' ); | |
| 204 | + } | |
| 205 | + | |
| 206 | + $allow_url_fopen = ( ini_get( 'allow_url_fopen' ) ) ? __( 'On', 'bestwebsoft' ) : __( 'Off', 'bestwebsoft' ); | |
| 207 | + $upload_max_filesize = ( ini_get( 'upload_max_filesize' ) ) ? ini_get( 'upload_max_filesize' ) : __( 'N/A', 'bestwebsoft' ); | |
| 208 | + $post_max_size = ( ini_get( 'post_max_size' ) ) ? ini_get( 'post_max_size' ) : __( 'N/A', 'bestwebsoft' ); | |
| 209 | + $max_execution_time = ( ini_get( 'max_execution_time' ) ) ? ini_get( 'max_execution_time' ) : __( 'N/A', 'bestwebsoft' ); | |
| 210 | + $memory_limit = ( ini_get( 'memory_limit' ) ) ? ini_get( 'memory_limit' ) : __( 'N/A', 'bestwebsoft' ); | |
| 211 | + $wp_memory_limit = ( defined( 'WP_MEMORY_LIMIT' ) ) ? WP_MEMORY_LIMIT : __( 'N/A', 'bestwebsoft' ); | |
| 212 | + $memory_usage = ( function_exists( 'memory_get_usage' ) ) ? round( memory_get_usage() / 1024 / 1024, 2 ) . ' ' . __( 'Mb', 'bestwebsoft' ) : __( 'N/A', 'bestwebsoft' ); | |
| 213 | + $exif_read_data = ( is_callable( 'exif_read_data' ) ) ? __( 'Yes', 'bestwebsoft' ) . ' ( V' . substr( phpversion( 'exif' ), 0, 4 ) . ')' : __( 'No', 'bestwebsoft' ); | |
| 214 | + $iptcparse = ( is_callable( 'iptcparse' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' ); | |
| 215 | + $xml_parser_create = ( is_callable( 'xml_parser_create' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' ); | |
| 216 | + $theme = wp_get_theme(); | |
| 217 | + | |
| 218 | + if ( function_exists( 'is_multisite' ) ) { | |
| 219 | + $multisite = is_multisite() ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' ); | |
| 197 | 220 | } else { |
| 198 | - $email = 'plugin_system_status@bestwebsoft.com'; | |
| 199 | - $message = __( 'Thank you for contacting us.', 'bestwebsoft' ); | |
| 221 | + $multisite = __( 'N/A', 'bestwebsoft' ); | |
| 200 | 222 | } |
| 201 | 223 | |
| 202 | - if ( $error == '' ) { | |
| 203 | - $headers = 'MIME-Version: 1.0' . "\n"; | |
| 204 | - $headers .= 'Content-type: text/html; charset=utf-8' . "\n"; | |
| 205 | - $headers .= 'From: ' . get_option( 'admin_email' ); | |
| 206 | - $message_text = '<html><head><title>System Info From ' . $home_url . '</title></head><body> | |
| 207 | - <h4>Environment</h4> | |
| 208 | - <table>'; | |
| 209 | - foreach ( $system_info['system_info'] as $key => $value ) { | |
| 210 | - $message_text .= '<tr><td>'. $key .'</td><td>'. $value .'</td></tr>'; | |
| 224 | + $system_info = array( | |
| 225 | + 'wp_environment' => array( | |
| 226 | + 'name' => __( 'WordPress Environment', 'bestwebsoft' ), | |
| 227 | + 'data' => array( | |
| 228 | + __( 'Home URL', 'bestwebsoft' ) => home_url(), | |
| 229 | + __( 'Website URL', 'bestwebsoft' ) => get_option( 'siteurl' ), | |
| 230 | + __( 'WP Version', 'bestwebsoft' ) => $wp_version, | |
| 231 | + __( 'WP Multisite', 'bestwebsoft' ) => $multisite, | |
| 232 | + __( 'WP Memory Limit', 'bestwebsoft' ) => $wp_memory_limit, | |
| 233 | + __( 'Active Theme', 'bestwebsoft' ) => $theme['Name'] . ' ' . $theme['Version'] . ' (' . sprintf( __( 'by %s', 'bestwebsoft' ), $theme['Author'] ) . ')', | |
| 234 | + ), | |
| 235 | + ), | |
| 236 | + 'server_environment' => array( | |
| 237 | + 'name' => __( 'Server Environment', 'bestwebsoft' ), | |
| 238 | + 'data' => array( | |
| 239 | + __( 'Operating System', 'bestwebsoft' ) => PHP_OS, | |
| 240 | + __( 'Server', 'bestwebsoft' ) => isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_email( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : '', | |
| 241 | + __( 'PHP Version', 'bestwebsoft' ) => PHP_VERSION, | |
| 242 | + __( 'PHP Allow URL fopen', 'bestwebsoft' ) => $allow_url_fopen, | |
| 243 | + __( 'PHP Memory Limit', 'bestwebsoft' ) => $memory_limit, | |
| 244 | + __( 'Memory Usage', 'bestwebsoft' ) => $memory_usage, | |
| 245 | + __( 'PHP Max Upload Size', 'bestwebsoft' ) => $upload_max_filesize, | |
| 246 | + __( 'PHP Max Post Size', 'bestwebsoft' ) => $post_max_size, | |
| 247 | + __( 'PHP Max Script Execute Time', 'bestwebsoft' ) => $max_execution_time, | |
| 248 | + __( 'PHP Exif support', 'bestwebsoft' ) => $exif_read_data, | |
| 249 | + __( 'PHP IPTC support', 'bestwebsoft' ) => $iptcparse, | |
| 250 | + __( 'PHP XML support', 'bestwebsoft' ) => $xml_parser_create, | |
| 251 | + '$_SERVER[HTTP_HOST]' => isset( $_SERVER['HTTP_HOST'] ) ? sanitize_email( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : '', | |
| 252 | + '$_SERVER[SERVER_NAME]' => isset( $_SERVER['SERVER_NAME'] ) ? sanitize_email( wp_unslash( $_SERVER['SERVER_NAME'] ) ) : '', | |
| 253 | + ), | |
| 254 | + ), | |
| 255 | + 'db' => array( | |
| 256 | + 'name' => __( 'Database', 'bestwebsoft' ), | |
| 257 | + 'data' => array( | |
| 258 | + __( 'WP DB version', 'bestwebsoft' ) => get_option( 'db_version' ), | |
| 259 | + __( 'MySQL version', 'bestwebsoft' ) => $wpdb->get_var( 'SELECT VERSION() AS version' ), | |
| 260 | + __( 'SQL Mode', 'bestwebsoft' ) => $sql_mode, | |
| 261 | + ), | |
| 262 | + ), | |
| 263 | + 'active_plugins' => array( | |
| 264 | + 'name' => __( 'Active Plugins', 'bestwebsoft' ), | |
| 265 | + 'data' => array(), | |
| 266 | + 'count' => 0, | |
| 267 | + ), | |
| 268 | + 'inactive_plugins' => array( | |
| 269 | + 'name' => __( 'Inactive Plugins', 'bestwebsoft' ), | |
| 270 | + 'data' => array(), | |
| 271 | + 'count' => 0, | |
| 272 | + ), | |
| 273 | + ); | |
| 274 | + | |
| 275 | + foreach ( $all_plugins as $path => $plugin ) { | |
| 276 | + $name = str_replace( 'by BestWebSoft', '', $plugin['Name'] ); | |
| 277 | + if ( is_plugin_active( $path ) ) { | |
| 278 | + $system_info['active_plugins']['data'][ $name ] = sprintf( __( 'by %s', 'bestwebsoft' ), $plugin['Author'] ) . ' - ' . $plugin['Version']; | |
| 279 | + $system_info['active_plugins']['count'] = $system_info['active_plugins']['count'] + 1; | |
| 280 | + } else { | |
| 281 | + $system_info['inactive_plugins']['data'][ $name ] = sprintf( __( 'by %s', 'bestwebsoft' ), $plugin['Author'] ) . ' - ' . $plugin['Version']; | |
| 282 | + $system_info['inactive_plugins']['count'] = $system_info['inactive_plugins']['count'] + 1; | |
| 211 | 283 | } |
| 212 | - $message_text .= '</table> | |
| 213 | - <h4>Active Plugins</h4> | |
| 214 | - <table>'; | |
| 215 | - foreach ( $system_info['active_plugins'] as $key => $value ) { | |
| 216 | - $message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>'; | |
| 284 | + } | |
| 285 | + | |
| 286 | + if ( ( isset( $_REQUEST['bwsmn_form_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit' ) ) || ( isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit_custom_email' ) ) ) { | |
| 287 | + if ( isset( $_REQUEST['bwsmn_form_email'] ) ) { | |
| 288 | + $email = sanitize_email( wp_unslash( $_REQUEST['bwsmn_form_email'] ) ); | |
| 289 | + if ( '' === $email ) { | |
| 290 | + $error = __( 'Please enter a valid email address.', 'bestwebsoft' ); | |
| 291 | + } else { | |
| 292 | + $message = sprintf( __( 'Email with system info is sent to %s.', 'bestwebsoft' ), $email ); | |
| 293 | + } | |
| 294 | + } else { | |
| 295 | + $email = 'plugin_system_status@bestwebsoft.com'; | |
| 296 | + $message = __( 'Thank you for contacting us.', 'bestwebsoft' ); | |
| 217 | 297 | } |
| 218 | - $message_text .= '</table> | |
| 219 | - <h4>Inactive Plugins</h4> | |
| 220 | - <table>'; | |
| 221 | - foreach ( $system_info['inactive_plugins'] as $key => $value ) { | |
| 222 | - $message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>'; | |
| 298 | + | |
| 299 | + if ( '' === $error ) { | |
| 300 | + $headers = 'MIME-Version: 1.0' . "\n"; | |
| 301 | + $headers .= 'Content-type: text/html; charset=utf-8' . "\n"; | |
| 302 | + $headers .= 'From: ' . get_option( 'admin_email' ); | |
| 303 | + $message_text = '<html><head><title>System Info From ' . home_url() . '</title></head><body>'; | |
| 304 | + foreach ( $system_info as $info ) { | |
| 305 | + if ( ! empty( $info['data'] ) ) { | |
| 306 | + $message_text .= '<h4>' . $info['name']; | |
| 307 | + if ( isset( $info['count'] ) ) { | |
| 308 | + $message_text .= ' (' . $info['count'] . ')'; | |
| 309 | + } | |
| 310 | + $message_text .= '</h4><table>'; | |
| 311 | + foreach ( $info['data'] as $key => $value ) { | |
| 312 | + $message_text .= '<tr><td>' . $key . '</td><td>' . $value . '</td></tr>'; | |
| 313 | + } | |
| 314 | + $message_text .= '</table>'; | |
| 315 | + } | |
| 316 | + } | |
| 317 | + $message_text .= '</body></html>'; | |
| 318 | + $result = wp_mail( $email, 'System Info From ' . esc_url( home_url() ), wp_kses( $message_text ), $headers ); | |
| 319 | + if ( true !== $result ) { | |
| 320 | + $error = __( 'Sorry, email message could not be delivered.', 'bestwebsoft' ); | |
| 321 | + } | |
| 223 | 322 | } |
| 224 | - $message_text .= '</table></body></html>'; | |
| 225 | - $result = wp_mail( $email, 'System Info From ' . $home_url, $message_text, $headers ); | |
| 226 | - if ( $result != true ) | |
| 227 | - $error = __( "Sorry, email message could not be delivered.", 'bestwebsoft' ); | |
| 228 | 323 | } |
| 229 | - } | |
| 230 | - ?><div class="wrap"> | |
| 231 | - <div class="icon32 icon32-bws" id="icon-options-general"></div> | |
| 232 | - <h2><?php echo $title; ?></h2> | |
| 233 | - <div class="updated fade" <?php if ( ! ( isset( $_REQUEST['bwsmn_form_submit'] ) || isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div> | |
| 234 | - <div class="error" <?php if ( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div> | |
| 235 | - <h3 style="color: blue;"><?php _e( 'Pro plugins', 'bestwebsoft' ); ?></h3> | |
| 236 | - <?php if ( 0 < $count_activate_pro ) { ?> | |
| 237 | - <div style="padding-left:15px;"> | |
| 238 | - <h4><?php _e( 'Activated plugins', 'bestwebsoft' ); ?></h4> | |
| 239 | - <?php foreach ( $array_activate_pro as $activate_plugin ) { ?> | |
| 240 | - <div style="float:left; width:200px;"><?php echo $activate_plugin["title"]; ?></div> <p><a href="<?php echo $activate_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $activate_plugin["url"]; ?>"><?php echo __( "Settings", 'bestwebsoft' ); ?></a></p> | |
| 241 | - <?php } ?> | |
| 324 | + } ?> | |
| 325 | + <div class="bws-wrap"> | |
| 326 | + <div class="bws-header"> | |
| 327 | + <div class="bws-title"> | |
| 328 | + <a href="<?php echo esc_url( ( $is_main_page ) ? self_admin_url( 'admin.php?page=bws_panel' ) : self_admin_url( 'admin.php?page=' . $page ) ); ?>"> | |
| 329 | + <span class="bws-logo bwsicons bwsicons-bws-logo"></span> | |
| 330 | + BestWebSoft | |
| 331 | + <span>panel</span> | |
| 332 | + </a> | |
| 333 | + </div> | |
| 334 | + <div class="bws-menu-item-icon">•••</div> | |
| 335 | + <div class="bws-nav-tab-wrapper"> | |
| 336 | + <?php if ( $is_main_page ) { ?> | |
| 337 | + <a class="bws-nav-tab | |
| 338 | + <?php | |
| 339 | + if ( 'bws_panel' === $page ) { | |
| 340 | + echo esc_attr( ' bws-nav-tab-active' ); | |
| 341 | + } | |
| 342 | + ?> | |
| 343 | + " href="<?php echo esc_url( self_admin_url( 'admin.php?page=bws_panel' ) ); ?>"> | |
| 344 | + <?php | |
| 345 | + esc_html_e( 'Plugins', 'bestwebsoft' ); | |
| 346 | + ?> | |
| 347 | + </a> | |
| 348 | + <!-- pls --> | |
| 349 | + <a class="bws-nav-tab | |
| 350 | + <?php | |
| 351 | + if ( 'bws_themes' === $page ) { | |
| 352 | + echo esc_attr( ' bws-nav-tab-active' ); | |
| 353 | + } | |
| 354 | + ?> | |
| 355 | + " href="<?php echo esc_url( self_admin_url( 'admin.php?page=bws_themes' ) ); ?>"><?php esc_html_e( 'Themes', 'bestwebsoft' ); ?></a> | |
| 356 | + <a class="bws-nav-tab | |
| 357 | + <?php | |
| 358 | + if ( 'bws_system_status' === $page ) { | |
| 359 | + echo esc_attr( ' bws-nav-tab-active' ); | |
| 360 | + } | |
| 361 | + ?> | |
| 362 | + " href="<?php echo esc_url( self_admin_url( 'admin.php?page=bws_system_status' ) ); ?>"> | |
| 363 | + <?php | |
| 364 | + esc_html_e( 'System status', 'bestwebsoft' ); | |
| 365 | + ?> | |
| 366 | + </a> | |
| 367 | + <?php } else { ?> | |
| 368 | + <a class="bws-nav-tab | |
| 369 | + <?php | |
| 370 | + if ( ! isset( $_GET['tab'] ) ) { | |
| 371 | + echo esc_attr( ' bws-nav-tab-active' ); | |
| 372 | + } | |
| 373 | + ?> | |
| 374 | + " href="<?php echo esc_url( self_admin_url( 'admin.php?page=' . $page ) ); ?>"> | |
| 375 | + <?php | |
| 376 | + esc_html_e( 'Plugins', 'bestwebsoft' ); | |
| 377 | + ?> | |
| 378 | + </a> | |
| 379 | + <a class="bws-nav-tab | |
| 380 | + <?php | |
| 381 | + if ( 'themes' === $tab ) { | |
| 382 | + echo esc_attr( ' bws-nav-tab-active' ); | |
| 383 | + } | |
| 384 | + ?> | |
| 385 | + " href="<?php echo esc_url( self_admin_url( 'admin.php?page=' . $page . '&tab=themes' ) ); ?>"> | |
| 386 | + <?php | |
| 387 | + esc_html_e( 'Themes', 'bestwebsoft' ); | |
| 388 | + ?> | |
| 389 | + </a> | |
| 390 | + <a class="bws-nav-tab | |
| 391 | + <?php | |
| 392 | + if ( 'system-status' === $tab ) { | |
| 393 | + echo esc_attr( ' bws-nav-tab-active' ); | |
| 394 | + } | |
| 395 | + ?> | |
| 396 | + " href="<?php echo esc_url( self_admin_url( 'admin.php?page=' . $page . '&tab=system-status' ) ); ?>"> | |
| 397 | + <?php | |
| 398 | + esc_html_e( 'System status', 'bestwebsoft' ); | |
| 399 | + ?> | |
| 400 | + </a> | |
| 401 | + <?php } ?> | |
| 402 | + </div> | |
| 403 | + <!-- pls --> | |
| 404 | + <div class="bws-help-links-wrapper"> | |
| 405 | + <a href="https://support.bestwebsoft.com" target="_blank"><?php esc_html_e( 'Support', 'bestwebsoft' ); ?></a> | |
| 406 | + <a href="https://bestwebsoft.com/client-area" target="_blank" title="<?php esc_html_e( 'Manage purchased licenses & subscriptions', 'bestwebsoft' ); ?>">Client Area</a> | |
| 407 | + </div> | |
| 408 | + <!-- end pls --> | |
| 409 | + <div class="clear"></div> | |
| 242 | 410 | </div> |
| 411 | + <?php if ( ( 'bws_panel' === $page || ( ! isset( $_GET['tab'] ) && ! $is_main_page ) ) && ! isset( $_POST['bws_plugin_action_submit'] ) ) { ?> | |
| 412 | + <div class="bws-membership-wrap"> | |
| 413 | + <div class="bws-membership-backround"></div> | |
| 414 | + <div class="bws-membership"> | |
| 415 | + <div class="bws-membership-title"><?php printf( esc_html__( 'Get Access to %s+ Premium Plugins', 'bestwebsoft' ), '30' ); ?></div> | |
| 416 | + <form class="bws-membership-form" method="post" action=""> | |
| 417 | + <span class="bws-membership-link"><a target="_blank" href="https://bestwebsoft.com/membership/"><?php esc_html_e( 'Subscribe to Pro Membership', 'bestwebsoft' ); ?></a> <?php esc_html_e( 'or', 'bestwebsoft' ); ?></span> | |
| 418 | + <?php | |
| 419 | + if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && | |
| 420 | + '5' < $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] && | |
| 421 | + $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) { | |
| 422 | + ?> | |
| 423 | + <div class="bws_form_input_wrap"> | |
| 424 | + <input disabled="disabled" type="text" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" /> | |
| 425 | + <div class="bws_error"><?php esc_html_e( 'Unfortunately, you have exceeded the number of available tries per day.', 'bestwebsoft' ); ?></div> | |
| 426 | + </div> | |
| 427 | + <input disabled="disabled" type="submit" class="bws-button" value="<?php esc_html_e( 'Check license key', 'bestwebsoft' ); ?>" /> | |
| 428 | + <?php } else { ?> | |
| 429 | + <div class="bws_form_input_wrap"> | |
| 430 | + <input | |
| 431 | + <?php | |
| 432 | + if ( '' !== $error ) { | |
| 433 | + echo 'class="bws_input_error"'; | |
| 434 | + } | |
| 435 | + ?> | |
| 436 | + type="text" placeholder="<?php esc_html_e( 'Enter your license key', 'bestwebsoft' ); ?>" maxlength="100" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" /> | |
| 437 | + <div class="bws_error" | |
| 438 | + <?php | |
| 439 | + if ( '' === $error ) { | |
| 440 | + echo 'style="display:none"'; | |
| 441 | + } | |
| 442 | + ?> | |
| 443 | + ><?php echo esc_html( $error ); ?></div> | |
| 444 | + </div> | |
| 445 | + <input type="hidden" name="bws_license_plugin" value="<?php echo esc_attr( $bws_license_plugin ); ?>" /> | |
| 446 | + <input type="hidden" name="bws_license_submit" value="submit" /> | |
| 447 | + <?php if ( empty( $plugins_array ) ) { ?> | |
| 448 | + <input type="submit" class="bws-button" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" /> | |
| 449 | + <?php } else { ?> | |
| 450 | + <input type="submit" class="bws-button" value="<?php esc_html_e( 'Check license key', 'bestwebsoft' ); ?>" /> | |
| 451 | + <?php } ?> | |
| 452 | + <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_license_nonce_name' ); ?> | |
| 453 | + <?php } ?> | |
| 454 | + </form> | |
| 455 | + <div class="clear"></div> | |
| 456 | + </div> | |
| 457 | + </div> | |
| 243 | 458 | <?php } ?> |
| 244 | - <?php if ( 0 < $count_install_pro ) { ?> | |
| 245 | - <div style="padding-left:15px;"> | |
| 246 | - <h4><?php _e( 'Installed plugins', 'bestwebsoft' ); ?></h4> | |
| 247 | - <?php foreach ( $array_install_pro as $install_plugin) { ?> | |
| 248 | - <div style="float:left; width:200px;"><?php echo $install_plugin["title"]; ?></div> <p><a href="<?php echo $install_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a></p> | |
| 249 | - <?php } ?> | |
| 250 | - </div> | |
| 251 | - <?php } ?> | |
| 252 | - <?php if ( 0 < $count_recomend_pro ) { ?> | |
| 253 | - <div style="padding-left:15px;"> | |
| 254 | - <h4><?php _e( 'Recommended plugins', 'bestwebsoft' ); ?></h4> | |
| 255 | - <?php foreach ( $array_recomend_pro as $recomend_plugin ) { ?> | |
| 256 | - <div style="float:left; width:200px;"><?php echo $recomend_plugin["title"]; ?></div> <p><a href="<?php echo $recomend_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $recomend_plugin["href"]; ?>" target="_blank"><?php echo __( "Purchase", 'bestwebsoft' ); ?></a></p> | |
| 257 | - <?php } ?> | |
| 258 | - </div> | |
| 259 | - <?php } ?> | |
| 260 | - <br /> | |
| 261 | - <h3 style="color: green"><?php _e( 'Free plugins', 'bestwebsoft' ); ?></h3> | |
| 262 | - <?php if ( 0 < $count_activate ) { ?> | |
| 263 | - <div style="padding-left:15px;"> | |
| 264 | - <h4><?php _e( 'Activated plugins', 'bestwebsoft' ); ?></h4> | |
| 265 | - <?php foreach ( $array_activate as $activate_plugin ) { ?> | |
| 266 | - <div style="float:left; width:200px;"><?php echo $activate_plugin["title"]; ?></div> <p><a href="<?php echo $activate_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $activate_plugin["url"]; ?>"><?php echo __( "Settings", 'bestwebsoft' ); ?></a></p> | |
| 267 | - <?php } ?> | |
| 268 | - </div> | |
| 269 | - <?php } ?> | |
| 270 | - <?php if ( 0 < $count_install ) { ?> | |
| 271 | - <div style="padding-left:15px;"> | |
| 272 | - <h4><?php _e( 'Installed plugins', 'bestwebsoft' ); ?></h4> | |
| 273 | - <?php foreach ( $array_install as $install_plugin ) { ?> | |
| 274 | - <div style="float:left; width:200px;"><?php echo $install_plugin["title"]; ?></div> <p><a href="<?php echo $install_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a></p> | |
| 275 | - <?php } ?> | |
| 276 | - </div> | |
| 277 | - <?php } ?> | |
| 278 | - <?php if ( 0 < $count_recomend ) { ?> | |
| 279 | - <div style="padding-left:15px;"> | |
| 280 | - <h4><?php _e( 'Recommended plugins', 'bestwebsoft' ); ?></h4> | |
| 281 | - <?php foreach ( $array_recomend as $recomend_plugin ) { ?> | |
| 282 | - <div style="float:left; width:200px;"><?php echo $recomend_plugin["title"]; ?></div> <p><a href="<?php echo $recomend_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $recomend_plugin["href"]; ?>" target="_blank"><?php echo __( "Download", 'bestwebsoft' ); ?></a> <a class="install-now" href="<?php echo get_bloginfo( "url" ) . $recomend_plugin["slug"]; ?>" title="<?php esc_attr( sprintf( __( 'Install %s' ), $recomend_plugin["title"] ) ) ?>" target="_blank"><?php echo __( 'Install now from wordpress.org', 'bestwebsoft' ) ?></a></p> | |
| 283 | - <?php } ?> | |
| 284 | - </div> | |
| 285 | - <?php } ?> | |
| 286 | - <br /> | |
| 287 | - <span style="color: rgb(136, 136, 136); font-size: 10px;"><?php _e( 'If you have any questions, please contact us via', 'bestwebsoft' ); ?> <a href="http://support.bestwebsoft.com">http://support.bestwebsoft.com</a></span> | |
| 288 | - <div id="poststuff" class="bws_system_info_meta_box"> | |
| 289 | - <div class="postbox"> | |
| 290 | - <div class="handlediv" title="Click to toggle"> | |
| 459 | + <!-- end pls --> | |
| 460 | + <div class="bws-wrap-content wrap"> | |
| 461 | + <?php if ( 'bws_panel' === $page || ( ! isset( $_GET['tab'] ) && ! $is_main_page ) ) { ?> | |
| 462 | + <div class="updated notice is-dismissible inline" | |
| 463 | + <?php | |
| 464 | + if ( '' === $message || '' !== $error ) { | |
| 465 | + echo 'style="display:none"'; | |
| 466 | + } | |
| 467 | + ?> | |
| 468 | + ><p><?php echo esc_html( $message ); ?></p></div> | |
| 469 | + <h1> | |
| 470 | + <?php esc_html_e( 'Plugins', 'bestwebsoft' ); ?> | |
| 471 | + <a href="<?php echo esc_url( self_admin_url( 'plugin-install.php?tab=upload' ) ); ?>" class="upload page-title-action add-new-h2"><?php esc_html_e( 'Upload Plugin', 'bestwebsoft' ); ?></a> | |
| 472 | + </h1> | |
| 473 | + <?php | |
| 474 | + if ( isset( $_GET['error'] ) ) { | |
| 475 | + if ( isset( $_GET['charsout'] ) ) { | |
| 476 | + $errmsg = sprintf( __( 'The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.' ), intval( $_GET['charsout'] ) ); | |
| 477 | + } else { | |
| 478 | + $errmsg = __( 'Plugin could not be activated because it triggered a <strong>fatal error</strong>.' ); | |
| 479 | + } | |
| 480 | + ?> | |
| 481 | + <div id="message" class="error is-dismissible"><p><?php echo wp_kses( $errmsg ); ?></p></div> | |
| 482 | + <?php } elseif ( isset( $_GET['activate'] ) ) { ?> | |
| 483 | + <div id="message" class="updated notice is-dismissible"><p><?php esc_html_e( 'Plugin <strong>activated</strong>.' ); ?></p></div> | |
| 484 | + <?php | |
| 485 | + } | |
| 486 | + | |
| 487 | + if ( isset( $_POST['bws_plugin_action_submit'] ) && isset( $_POST['bws_install_plugin'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_license_install_nonce_name' ) ) { | |
| 488 | + | |
| 489 | + $bws_license_plugin = sanitize_text_field( wp_unslash( $_POST['bws_install_plugin'] ) ); | |
| 490 | + | |
| 491 | + $bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key; | |
| 492 | + if ( is_multisite() ) { | |
| 493 | + update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); | |
| 494 | + } else { | |
| 495 | + update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); | |
| 496 | + } | |
| 497 | + | |
| 498 | + $url = $plugins_array[ $bws_license_plugin ]['link'] . '&download_from=5'; | |
| 499 | + ?> | |
| 500 | + <h2><?php esc_html_e( 'Download Pro Plugin', 'bestwebsoft' ); ?></h2> | |
| 501 | + <p> | |
| 502 | + <strong><?php esc_html_e( 'Your Pro plugin is ready', 'bestwebsoft' ); ?></strong> | |
| 503 | + <br> | |
| 504 | + <?php esc_html_e( 'Your plugin has been zipped, and now is ready to download.', 'bestwebsoft' ); ?> | |
| 505 | + </p> | |
| 506 | + <p> | |
| 507 | + <a class="button button-secondary" target="_parent" href="<?php echo esc_url( $url ); ?>"><?php esc_html_e( 'Download Now', 'bestwebsoft' ); ?></a> | |
| 508 | + </p> | |
| 291 | 509 | <br> |
| 510 | + <p> | |
| 511 | + <strong><?php esc_html_e( 'Need help installing the plugin?', 'bestwebsoft' ); ?></strong> | |
| 512 | + <br> | |
| 513 | + <a target="_blank" href="https://bestwebsoft.com/documentation/how-to-install-a-wordpress-product/how-to-install-a-wordpress-plugin/"><?php esc_html_e( 'How to install WordPress plugin from your admin Dashboard (ZIP archive)', 'bestwebsoft' ); ?></a> | |
| 514 | + </p> | |
| 515 | + <p> | |
| 516 | + <strong><?php esc_html_e( 'Get Started', 'bestwebsoft' ); ?></strong> | |
| 517 | + <br> | |
| 518 | + <a target="_blank" href="https://bestwebsoft.com/documentation/"><?php esc_html_e( 'Documentation', 'bestwebsoft' ); ?></a> | |
| 519 | + <br> | |
| 520 | + <a target="_blank" href="https://www.youtube.com/user/bestwebsoft"><?php esc_html_e( 'Video Instructions', 'bestwebsoft' ); ?></a> | |
| 521 | + <br> | |
| 522 | + <a target="_blank" href="https://support.bestwebsoft.com"><?php esc_html_e( 'Knowledge Base', 'bestwebsoft' ); ?></a> | |
| 523 | + </p> | |
| 524 | + <p> | |
| 525 | + <strong><?php esc_html_e( 'Licenses & Domains', 'bestwebsoft' ); ?></strong> | |
| 526 | + <br> | |
| 527 | + <?php | |
| 528 | + printf( | |
| 529 | + 'Manage your license(-s) and change domain names using the %s at BestWebSoft.', | |
| 530 | + '<a target="_blank" href="https://bestwebsoft.com/client-area">' . esc_html__( 'Client Area', 'bestwebsoft' ) . '</a>' | |
| 531 | + ); | |
| 532 | + ?> | |
| 533 | + </p> | |
| 534 | + <p><a href="<?php echo esc_url( self_admin_url( $current_page ) ); ?>" target="_parent"><?php esc_html_e( 'Return to BestWebSoft Panel', 'bestwebsoft' ); ?></a></p> | |
| 535 | + <?php | |
| 536 | + } else { | |
| 537 | + $category_href = $current_page; | |
| 538 | + if ( 'all' !== $plugin_category ) { | |
| 539 | + $category_href .= '&category=' . $plugin_category; | |
| 540 | + } | |
| 541 | + ?> | |
| 542 | + <ul class="subsubsub"> | |
| 543 | + <li> | |
| 544 | + <a | |
| 545 | + <?php | |
| 546 | + if ( ! isset( $_GET['sub'] ) ) { | |
| 547 | + echo 'class="current" '; | |
| 548 | + } | |
| 549 | + ?> | |
| 550 | + href="<?php echo esc_url( self_admin_url( $category_href ) ); ?>"><?php esc_html_e( 'All', 'bestwebsoft' ); ?></a> | |
| 551 | + </li> | | |
| 552 | + <li> | |
| 553 | + <a | |
| 554 | + <?php | |
| 555 | + if ( isset( $_GET['sub'] ) && 'installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) ) { | |
| 556 | + echo 'class="current" '; | |
| 557 | + } | |
| 558 | + ?> | |
| 559 | + href="<?php echo esc_url( self_admin_url( $category_href . '&sub=installed' ) ); ?>"><?php esc_html_e( 'Installed', 'bestwebsoft' ); ?></a> | |
| 560 | + </li> | | |
| 561 | + <li> | |
| 562 | + <a | |
| 563 | + <?php | |
| 564 | + if ( isset( $_GET['sub'] ) && 'not_installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) ) { | |
| 565 | + echo 'class="current" '; | |
| 566 | + } | |
| 567 | + ?> | |
| 568 | + href="<?php echo esc_url( self_admin_url( $category_href . '&sub=not_installed' ) ); ?>"><?php esc_html_e( 'Not Installed', 'bestwebsoft' ); ?></a> | |
| 569 | + </li> | |
| 570 | + </ul> | |
| 571 | + <div class="clear"></div> | |
| 572 | + <div class="bws-filter-top"> | |
| 573 | + <h2> | |
| 574 | + <span class="bws-toggle-indicator"></span> | |
| 575 | + <?php esc_html_e( 'Filter results', 'bestwebsoft' ); ?> | |
| 576 | + </h2> | |
| 577 | + <div class="bws-filter-top-inside"> | |
| 578 | + <div class="bws-filter-title"><?php esc_html_e( 'Category', 'bestwebsoft' ); ?></div> | |
| 579 | + <ul class="bws-category"> | |
| 580 | + <li> | |
| 581 | + <?php $sub_in_url = ( isset( $_GET['sub'] ) && in_array( sanitize_text_field( wp_unslash( $_GET['sub'] ) ), array( 'installed', 'not_installed' ) ) ) ? '&sub=' . sanitize_text_field( wp_unslash( $_GET['sub'] ) ) : ''; ?> | |
| 582 | + <a | |
| 583 | + <?php | |
| 584 | + if ( 'all' === $plugin_category ) { | |
| 585 | + echo ' class="bws-active"'; | |
| 586 | + } | |
| 587 | + ?> | |
| 588 | + href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url ) ); ?>"><?php esc_html_e( 'All', 'bestwebsoft' ); ?> | |
| 589 | + <span>(<?php echo count( $bws_plugins ); ?>)</span> | |
| 590 | + </a> | |
| 591 | + </li> | |
| 592 | + <?php foreach ( $bws_plugins_category as $category_key => $category_value ) { ?> | |
| 593 | + <li> | |
| 594 | + <a | |
| 595 | + <?php | |
| 596 | + if ( $category_key === $plugin_category ) { | |
| 597 | + echo ' class="bws-active"'; | |
| 598 | + } | |
| 599 | + ?> | |
| 600 | + href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url . '&category=' . $category_key ) ); ?>"><?php echo esc_html( $category_value['name'] ); ?> | |
| 601 | + <span>(<?php echo absint( $category_value['count'] ); ?>)</span> | |
| 602 | + </a> | |
| 603 | + </li> | |
| 604 | + <?php } ?> | |
| 605 | + </ul> | |
| 606 | + </div> | |
| 607 | + </div> | |
| 608 | + <div class="bws-products"> | |
| 609 | + <?php | |
| 610 | + $nothing_found = true; | |
| 611 | + foreach ( $bws_plugins as $key_plugin => $value_plugin ) { | |
| 612 | + | |
| 613 | + if ( 'all' !== $plugin_category && isset( $bws_plugins_category[ $plugin_category ] ) && ! in_array( $plugin_category, $value_plugin['category'] ) ) { | |
| 614 | + continue; | |
| 615 | + } | |
| 616 | + | |
| 617 | + $key_plugin_explode = explode( '/', $key_plugin ); | |
| 618 | + if ( in_array( $key_plugin_explode[0], array( 'car-rental', 'contact-form-multi', 'custom-admin-page', 'adsense-plugin', 'zendesk-help-center', 'bws-adsense' ) ) ) { | |
| 619 | + $icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.png'; | |
| 620 | + } else { | |
| 621 | + $icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.gif'; | |
| 622 | + } | |
| 623 | + | |
| 624 | + $is_pro_isset = isset( $value_plugin['pro_version'] ); | |
| 625 | + $is_installed = array_key_exists( $key_plugin, $all_plugins ); | |
| 626 | + $is_active = in_array( $key_plugin, $active_plugins ) || isset( $sitewide_active_plugins[ $key_plugin ] ); | |
| 627 | + | |
| 628 | + $is_pro_installed = $is_pro_active = false; | |
| 629 | + if ( $is_pro_isset ) { | |
| 630 | + $is_pro_installed = array_key_exists( $value_plugin['pro_version'], $all_plugins ); | |
| 631 | + $is_pro_active = in_array( $value_plugin['pro_version'], $active_plugins ) || isset( $sitewide_active_plugins[ $value_plugin['pro_version'] ] ); | |
| 632 | + } | |
| 633 | + | |
| 634 | + if ( ( isset( $_GET['sub'] ) && 'installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) && ! $is_pro_installed && ! $is_installed ) || | |
| 635 | + ( isset( $_GET['sub'] ) && 'not_installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) && ( $is_pro_installed || $is_installed ) ) ) { | |
| 636 | + continue; | |
| 637 | + } | |
| 638 | + | |
| 639 | + if ( is_multisite() ) { | |
| 640 | + $link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . esc_url( $value_plugin['install_url'] ) . '" target="_blank"' : 'href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $key_plugin_explode[0] . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal"'; | |
| 641 | + } else { | |
| 642 | + $link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . esc_url( $value_plugin['install_url'] ) . '" target="_blank"' : 'href="' . esc_url( self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $key_plugin_explode[0] . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal"'; | |
| 643 | + } | |
| 644 | + | |
| 645 | + $nothing_found = false; | |
| 646 | + ?> | |
| 647 | + <div class="bws_product_box | |
| 648 | + <?php | |
| 649 | + if ( $is_active || $is_pro_active ) { | |
| 650 | + echo esc_attr( ' bws_product_active' ); | |
| 651 | + } | |
| 652 | + ?> | |
| 653 | + "> | |
| 654 | + <div class="bws_product_image"> | |
| 655 | + <a <?php echo wp_kses_data( $link_attr ); ?>><img src="<?php echo esc_url( $icon ); ?>"/></a> | |
| 656 | + </div> | |
| 657 | + <div class="bws_product_content"> | |
| 658 | + <div class="bws_product_title"><a <?php echo wp_kses_data( $link_attr ); ?>><?php echo esc_html( $value_plugin['name'] ); ?></a></div> | |
| 659 | + <div class="bws-version"> | |
| 660 | + <?php | |
| 661 | + if ( $is_pro_installed ) { | |
| 662 | + echo '<span'; | |
| 663 | + if ( ! empty( $value_plugin['expired'] ) || ! empty( $value_plugin['update_availible'] ) ) { | |
| 664 | + echo ' class="bws-update-available"'; | |
| 665 | + } | |
| 666 | + echo '>v ' . esc_attr( $all_plugins[ $value_plugin['pro_version'] ]['Version'] ) . '</span>'; | |
| 667 | + } elseif ( $is_installed ) { | |
| 668 | + echo '<span'; | |
| 669 | + if ( ! empty( $value_plugin['expired'] ) || ! empty( $value_plugin['update_availible'] ) ) { | |
| 670 | + echo ' class="bws-update-available"'; | |
| 671 | + } | |
| 672 | + echo '>v ' . esc_attr( $all_plugins[ $key_plugin ]['Version'] ) . '</span>'; | |
| 673 | + } else { | |
| 674 | + echo '<span>' . esc_html__( 'Not installed', 'bestwebsoft' ) . '</span>'; | |
| 675 | + } | |
| 676 | + | |
| 677 | + if ( ! empty( $value_plugin['expired'] ) ) { | |
| 678 | + echo ' - <a class="bws-update-now" href="https://support.bestwebsoft.com/hc/en-us/articles/202356359" target="_blank">' . esc_html__( 'Renew to get updates', 'bestwebsoft' ) . '</a>'; | |
| 679 | + } elseif ( ! empty( $value_plugin['update_availible'] ) ) { | |
| 680 | + $r = $update_availible_all->response[ $value_plugin['update_availible'] ]; | |
| 681 | + echo ' - <a class="bws-update-now" href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' . $value_plugin['update_availible'] ), 'upgrade-plugin_' . $value_plugin['update_availible'] ) ) . '" class="update-link" aria-label="' . sprintf( esc_html__( 'Update to v %s', 'bestwebsoft' ), esc_attr( $r->new_version ) ) . '">' . sprintf( esc_html__( 'Update to v %s', 'bestwebsoft' ), esc_html( $r->new_version ) ) . '</a>'; | |
| 682 | + } | |
| 683 | + ?> | |
| 684 | + </div> | |
| 685 | + <div class="bws_product_description"> | |
| 686 | + <?php echo esc_html( strlen( $value_plugin['description'] ) > 100 ? mb_substr( $value_plugin['description'], 0, 100 ) . '...' : $value_plugin['description'] ); ?> | |
| 687 | + </div> | |
| 688 | + <div class="bws_product_links"> | |
| 689 | + <?php | |
| 690 | + if ( $is_active || $is_pro_active ) { | |
| 691 | + if ( $is_pro_isset ) { | |
| 692 | + if ( ! $is_pro_installed ) { | |
| 693 | + if ( ! empty( $plugins_array ) && array_key_exists( $value_plugin['pro_version'], $plugins_array ) ) { | |
| 694 | + ?> | |
| 695 | + <form method="post" action=""> | |
| 696 | + <input type="submit" class="button button-secondary" value="<?php esc_html_e( 'Get Pro', 'bestwebsoft' ); ?>" /> | |
| 697 | + <input type="hidden" name="bws_plugin_action_submit" value="submit" /> | |
| 698 | + <input type="hidden" name="bws_install_plugin" value="<?php echo esc_attr( $value_plugin['pro_version'] ); ?>" /> | |
| 699 | + <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_license_install_nonce_name' ); ?> | |
| 700 | + </form> | |
| 701 | + <?php } else { ?> | |
| 702 | + <a class="button button-secondary bws_upgrade_button" href="<?php echo esc_url( $bws_plugins[ $key_plugin ]['purchase'] ); ?>" target="_blank"><?php esc_html_e( 'Upgrade to Pro', 'bestwebsoft' ); ?></a> | |
| 703 | + <?php | |
| 704 | + } | |
| 705 | + } | |
| 706 | + } else { | |
| 707 | + ?> | |
| 708 | + <a class="bws_donate" href="https://bestwebsoft.com/donate/" target="_blank"><?php esc_html_e( 'Donate', 'bestwebsoft' ); ?></a> <span>|</span> | |
| 709 | + <?php | |
| 710 | + } | |
| 711 | + | |
| 712 | + if ( $is_pro_active ) { | |
| 713 | + ?> | |
| 714 | + <a class="bws_settings" href="<?php echo esc_url( self_admin_url( $bws_plugins[ $key_plugin ]['pro_settings'] ) ); ?>"><?php esc_html_e( 'Settings', 'bestwebsoft' ); ?></a> | |
| 715 | + <?php } else { ?> | |
| 716 | + <a class="bws_settings" href="<?php echo esc_url( self_admin_url( $bws_plugins[ $key_plugin ]['settings'] ) ); ?>"><?php esc_html_e( 'Settings', 'bestwebsoft' ); ?></a> | |
| 717 | + <?php | |
| 718 | + } | |
| 719 | + } else { | |
| 720 | + if ( $is_pro_installed ) { | |
| 721 | + ?> | |
| 722 | + <a class="button button-secondary" href="<?php echo esc_url( wp_nonce_url( self_admin_url( $current_page . '&bws_activate_plugin=' . $value_plugin['pro_version'] ), 'bws_activate_plugin' . $value_plugin['pro_version'] ) ); ?>" title="<?php esc_html_e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php esc_html_e( 'Activate', 'bestwebsoft' ); ?></a> | |
| 723 | + <?php } elseif ( ! empty( $plugins_array ) && isset( $value_plugin['pro_version'] ) && array_key_exists( $value_plugin['pro_version'], $plugins_array ) ) { ?> | |
| 724 | + <form method="post" action=""> | |
| 725 | + <input type="submit" class="button button-secondary" value="<?php esc_html_e( 'Get Pro', 'bestwebsoft' ); ?>" /> | |
| 726 | + <input type="hidden" name="bws_plugin_action_submit" value="submit" /> | |
| 727 | + <input type="hidden" name="bws_install_plugin" value="<?php echo esc_url( $value_plugin['pro_version'] ); ?>" /> | |
| 728 | + <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_license_install_nonce_name' ); ?> | |
| 729 | + </form> | |
| 730 | + <?php } elseif ( $is_installed ) { ?> | |
| 731 | + <a class="button button-secondary" href="<?php echo esc_url( wp_nonce_url( self_admin_url( $current_page . '&bws_activate_plugin=' . $key_plugin ), 'bws_activate_plugin' . $key_plugin ) ); ?>" title="<?php esc_html_e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php esc_html_e( 'Activate', 'bestwebsoft' ); ?></a> | |
| 732 | + <?php | |
| 733 | + } else { | |
| 734 | + $install_url = isset( $value_plugin['install_url'] ) ? $value_plugin['install_url'] : network_admin_url( 'plugin-install.php?tab=search&type=term&s=' . str_replace( array( ' ', '-' ), '+', str_replace( '&', '', $value_plugin['name'] ) ) . '+BestWebSoft&plugin-search-input=Search+Plugins' ); | |
| 735 | + ?> | |
| 736 | + <a class="button button-secondary" href="<?php echo esc_url( $install_url ); ?>" title="<?php esc_html_e( 'Install this plugin', 'bestwebsoft' ); ?>" target="_blank"><?php esc_html_e( 'Install Now', 'bestwebsoft' ); ?></a> | |
| 737 | + <?php | |
| 738 | + } | |
| 739 | + } | |
| 740 | + ?> | |
| 741 | + </div> | |
| 742 | + </div> | |
| 743 | + <div class="clear"></div> | |
| 744 | + </div> | |
| 745 | + <?php | |
| 746 | + } | |
| 747 | + if ( $nothing_found ) { | |
| 748 | + ?> | |
| 749 | + <p class="description"><?php esc_html_e( 'Nothing found. Try another criteria.', 'bestwebsoft' ); ?></p> | |
| 750 | + <?php } ?> | |
| 751 | + </div> | |
| 752 | + <div id="bws-filter-wrapper"> | |
| 753 | + <div class="bws-filter"> | |
| 754 | + <div class="bws-filter-title"><?php esc_html_e( 'Category', 'bestwebsoft' ); ?></div> | |
| 755 | + <ul class="bws-category"> | |
| 756 | + <li> | |
| 757 | + <?php $sub_in_url = ( isset( $_GET['sub'] ) && in_array( sanitize_text_field( wp_unslash( $_GET['sub'] ) ), array( 'installed', 'not_installed' ) ) ) ? '&sub=' . sanitize_text_field( wp_unslash( $_GET['sub'] ) ) : ''; ?> | |
| 758 | + <a | |
| 759 | + <?php | |
| 760 | + if ( 'all' === $plugin_category ) { | |
| 761 | + echo ' class="bws-active"'; | |
| 762 | + } | |
| 763 | + ?> | |
| 764 | + href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url ) ); ?>"><?php esc_html_e( 'All', 'bestwebsoft' ); ?> | |
| 765 | + <span>(<?php echo count( $bws_plugins ); ?>)</span> | |
| 766 | + </a> | |
| 767 | + </li> | |
| 768 | + <?php foreach ( $bws_plugins_category as $category_key => $category_value ) { ?> | |
| 769 | + <li> | |
| 770 | + <a | |
| 771 | + <?php | |
| 772 | + if ( $category_key === $plugin_category ) { | |
| 773 | + echo ' class="bws-active"'; | |
| 774 | + } | |
| 775 | + ?> | |
| 776 | + href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url . '&category=' . $category_key ) ); ?>"><?php echo esc_html( $category_value['name'] ); ?> | |
| 777 | + <span>(<?php echo absint( $category_value['count'] ); ?>)</span> | |
| 778 | + </a> | |
| 779 | + </li> | |
| 780 | + <?php } ?> | |
| 781 | + </ul> | |
| 782 | + </div> | |
| 783 | + </div><!-- #bws-filter-wrapper --> | |
| 784 | + <div class="clear"></div> | |
| 785 | + <?php | |
| 786 | + } | |
| 787 | + } elseif ( 'bws_themes' === $page || 'themes' === $tab ) { | |
| 788 | + require dirname( __FILE__ ) . '/product_list.php'; | |
| 789 | + ?> | |
| 790 | + <h1><?php esc_html_e( 'Themes', 'bestwebsoft' ); ?></h1> | |
| 791 | + <div id="availablethemes" class="bws-availablethemes"> | |
| 792 | + <div class="theme-browser content-filterable rendered"> | |
| 793 | + <div class="themes wp-clearfix"> | |
| 794 | + <?php | |
| 795 | + foreach ( $themes as $key => $theme ) { | |
| 796 | + $installed_theme = wp_get_theme( $theme->slug ); | |
| 797 | + ?> | |
| 798 | + <div class="theme" tabindex="0"> | |
| 799 | + <div class="theme-screenshot"> | |
| 800 | + <img src="<?php echo esc_url( bws_menu_url( 'icons/themes/' ) . $theme->slug . '.png' ); ?>" alt="" /> | |
| 801 | + </div> | |
| 802 | + <div class="theme-author"><?php printf( esc_html__( 'By %s', 'bestwebsoft' ), 'BestWebSoft' ); ?></div> | |
| 803 | + <h3 class="theme-name"><?php echo esc_html( $theme->name ); ?></h3> | |
| 804 | + <div class="theme-actions"> | |
| 805 | + <a class="button button-secondary preview install-theme-preview" href="<?php echo esc_url( $theme->href ); ?>" target="_blank"><?php esc_html_e( 'Learn More', 'bestwebsoft' ); ?></a> | |
| 806 | + </div> | |
| 807 | + <?php | |
| 808 | + if ( $installed_theme->exists() ) { | |
| 809 | + if ( $wp_version < '4.6' ) { | |
| 810 | + ?> | |
| 811 | + <div class="theme-installed"><?php esc_html_e( 'Already Installed', 'bestwebsoft' ); ?></div> | |
| 812 | + <?php } else { ?> | |
| 813 | + <div class="notice notice-success notice-alt inline"><p><?php esc_html_e( 'Installed', 'bestwebsoft' ); ?></p></div> | |
| 814 | + <?php | |
| 815 | + } | |
| 816 | + } | |
| 817 | + ?> | |
| 818 | + </div> | |
| 819 | + <?php } ?> | |
| 820 | + <br class="clear" /> | |
| 821 | + </div> | |
| 822 | + </div> | |
| 823 | + <p><a class="bws_browse_link" href="https://bestwebsoft.com/products/wordpress/themes/" target="_blank"><?php esc_html_e( 'Browse More WordPress Themes', 'bestwebsoft' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span></a></p> | |
| 292 | 824 | </div> |
| 293 | - <h3 class="hndle"> | |
| 294 | - <span><?php _e( 'System status', 'bestwebsoft' ); ?></span> | |
| 295 | - </h3> | |
| 296 | - <div class="inside"> | |
| 297 | - <table class="bws_system_info"> | |
| 298 | - <thead><tr><th><?php _e( 'Environment', 'bestwebsoft' ); ?></th><td></td></tr></thead> | |
| 825 | + <?php } elseif ( 'bws_system_status' === $page || 'system-status' === $tab ) { ?> | |
| 826 | + <h1><?php esc_html_e( 'System status', 'bestwebsoft' ); ?></h1> | |
| 827 | + <div class="updated fade notice is-dismissible inline" | |
| 828 | + <?php | |
| 829 | + if ( ! ( isset( $_REQUEST['bwsmn_form_submit'] ) || isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) ) || '' !== $error ) { | |
| 830 | + echo 'style="display:none"'; | |
| 831 | + } | |
| 832 | + ?> | |
| 833 | + ><p><strong><?php echo esc_html( $message ); ?></strong></p></div> | |
| 834 | + <div class="error" | |
| 835 | + <?php | |
| 836 | + if ( '' === $error ) { | |
| 837 | + echo 'style="display:none"'; | |
| 838 | + } | |
| 839 | + ?> | |
| 840 | + ><p><strong><?php echo esc_html( $error ); ?></strong></p></div> | |
| 841 | + <form method="post" action=""> | |
| 842 | + <p> | |
| 843 | + <input type="hidden" name="bwsmn_form_submit" value="submit" /> | |
| 844 | + <input type="submit" class="button-primary" value="<?php esc_html_e( 'Send to support', 'bestwebsoft' ); ?>" /> | |
| 845 | + <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit' ); ?> | |
| 846 | + </p> | |
| 847 | + </form> | |
| 848 | + <form method="post" action=""> | |
| 849 | + <p> | |
| 850 | + <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" /> | |
| 851 | + <input type="submit" class="button" value="<?php esc_html_e( 'Send to custom email »', 'bestwebsoft' ); ?>" /> | |
| 852 | + <input type="text" maxlength="250" value="" name="bwsmn_form_email" /> | |
| 853 | + <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit_custom_email' ); ?> | |
| 854 | + </p> | |
| 855 | + </form> | |
| 856 | + <?php foreach ( $system_info as $info ) { ?> | |
| 857 | + <table class="widefat bws-system-info" cellspacing="0"> | |
| 858 | + <thead> | |
| 859 | + <tr> | |
| 860 | + <th colspan="2"> | |
| 861 | + <strong> | |
| 862 | + <?php | |
| 863 | + echo esc_html( $info['name'] ); | |
| 864 | + if ( isset( $info['count'] ) ) { | |
| 865 | + echo ' (' . intval( $info['count'] ) . ')'; | |
| 866 | + } | |
| 867 | + ?> | |
| 868 | + </strong> | |
| 869 | + </th> | |
| 870 | + </tr> | |
| 871 | + </thead> | |
| 299 | 872 | <tbody> |
| 300 | - <?php foreach ( $system_info['system_info'] as $key => $value ) { ?> | |
| 873 | + <?php foreach ( $info['data'] as $key => $value ) { ?> | |
| 301 | 874 | <tr> |
| 302 | - <td scope="row"><?php echo $key; ?></td> | |
| 303 | - <td scope="row"><?php echo $value; ?></td> | |
| 304 | - </tr> | |
| 875 | + <td scope="row"><?php echo esc_attr( $key ); ?></td> | |
| 876 | + <td scope="row"><?php echo esc_html( $value ); ?></td> | |
| 877 | + </tr> | |
| 305 | 878 | <?php } ?> |
| 306 | 879 | </tbody> |
| 307 | 880 | </table> |
| 308 | - <table class="bws_system_info"> | |
| 309 | - <thead><tr><th><?php _e( 'Active Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead> | |
| 310 | - <tbody> | |
| 311 | - <?php foreach ( $system_info['active_plugins'] as $key => $value ) { ?> | |
| 312 | - <tr> | |
| 313 | - <td scope="row"><?php echo $key; ?></td> | |
| 314 | - <td scope="row"><?php echo $value; ?></td> | |
| 315 | - </tr> | |
| 316 | - <?php } ?> | |
| 317 | - </tbody> | |
| 318 | - </table> | |
| 319 | - <table class="bws_system_info"> | |
| 320 | - <thead><tr><th><?php _e( 'Inactive Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead> | |
| 321 | - <tbody> | |
| 322 | - <?php foreach ( $system_info['inactive_plugins'] as $key => $value ) { ?> | |
| 323 | - <tr> | |
| 324 | - <td scope="row"><?php echo $key; ?></td> | |
| 325 | - <td scope="row"><?php echo $value; ?></td> | |
| 326 | - </tr> | |
| 327 | - <?php } ?> | |
| 328 | - </tbody> | |
| 329 | - </table> | |
| 330 | - <div class="clear"></div> | |
| 331 | - <form method="post" action="admin.php?page=bws_plugins"> | |
| 332 | - <p> | |
| 333 | - <input type="hidden" name="bwsmn_form_submit" value="submit" /> | |
| 334 | - <input type="submit" class="button-primary" value="<?php _e( 'Send to support', 'bestwebsoft' ) ?>" /> | |
| 335 | - <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ); ?> | |
| 336 | - </p> | |
| 337 | - </form> | |
| 338 | - <form method="post" action="admin.php?page=bws_plugins"> | |
| 339 | - <p> | |
| 340 | - <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" /> | |
| 341 | - <input type="submit" class="button" value="<?php _e( 'Send to custom email »', 'bestwebsoft' ) ?>" /> | |
| 342 | - <input type="text" value="<?php echo $bwsmn_form_email; ?>" name="bwsmn_form_email" /> | |
| 343 | - <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ); ?> | |
| 344 | - </p> | |
| 345 | - </form> | |
| 346 | - </div> | |
| 347 | - </div> | |
| 348 | - </div> | |
| 881 | + <?php | |
| 882 | + } | |
| 883 | + } | |
| 884 | + ?> | |
| 885 | + </div> | |
| 349 | 886 | </div> |
| 350 | - <?php } | |
| 351 | -} ?> | |
| 887 | + <?php | |
| 888 | + } | |
| 889 | +} | |
| 890 | + | |
| 891 | +if ( ! function_exists( 'bws_get_banner_array' ) ) { | |
| 892 | + /** | |
| 893 | + * Get banner array | |
| 894 | + */ | |
| 895 | + function bws_get_banner_array() { | |
| 896 | + global $bstwbsftwppdtplgns_banner_array; | |
| 897 | + $bstwbsftwppdtplgns_banner_array = array( | |
| 898 | + array( 'gglstpvrfctn_hide_banner_on_plugin_page', 'bws-google-2-step-verification/bws-google-2-step-verification.php', '1.0.0' ), | |
| 899 | + array( 'sclbttns_hide_banner_on_plugin_page', 'social-buttons-pack/social-buttons-pack.php', '1.1.0' ), | |
| 900 | + array( 'tmsht_hide_banner_on_plugin_page', 'timesheet/timesheet.php', '0.1.3' ), | |
| 901 | + array( 'pgntn_hide_banner_on_plugin_page', 'pagination/pagination.php', '1.0.6' ), | |
| 902 | + array( 'crrntl_hide_banner_on_plugin_page', 'car-rental/car-rental.php', '1.0.0' ), | |
| 903 | + array( 'lnkdn_hide_banner_on_plugin_page', 'bws-linkedin/bws-linkedin.php', '1.0.1' ), | |
| 904 | + array( 'pntrst_hide_banner_on_plugin_page', 'bws-pinterest/bws-pinterest.php', '1.0.1' ), | |
| 905 | + array( 'zndskhc_hide_banner_on_plugin_page', 'zendesk-help-center/zendesk-help-center.php', '1.0.0' ), | |
| 906 | + array( 'gglcptch_hide_banner_on_plugin_page', 'google-captcha/google-captcha.php', '1.18' ), | |
| 907 | + array( 'mltlngg_hide_banner_on_plugin_page', 'multilanguage/multilanguage.php', '1.1.1' ), | |
| 908 | + array( 'adsns_hide_banner_on_plugin_page', 'bws-adsense/bws-adsense.php', '1.36' ), | |
| 909 | + array( 'vstrsnln_hide_banner_on_plugin_page', 'visitors-online/visitors-online.php', '0.2' ), | |
| 910 | + array( 'cstmsrch_hide_banner_on_plugin_page', 'custom-search-plugin/custom-search-plugin.php', '1.28' ), | |
| 911 | + array( 'prtfl_hide_banner_on_plugin_page', 'portfolio/portfolio.php', '2.33' ), | |
| 912 | + array( 'rlt_hide_banner_on_plugin_page', 'realty/realty.php', '1.0.0' ), | |
| 913 | + array( 'prmbr_hide_banner_on_plugin_page', 'promobar/promobar.php', '1.0.0' ), | |
| 914 | + array( 'gglnltcs_hide_banner_on_plugin_page', 'bws-google-analytics/bws-google-analytics.php', '1.6.2' ), | |
| 915 | + array( 'htccss_hide_banner_on_plugin_page', 'htaccess/htaccess.php', '1.6.3' ), | |
| 916 | + array( 'sbscrbr_hide_banner_on_plugin_page', 'subscriber/subscriber.php', '1.1.8' ), | |
| 917 | + array( 'lmtttmpts_hide_banner_on_plugin_page', 'limit-attempts/limit-attempts.php', '1.0.2' ), | |
| 918 | + array( 'sndr_hide_banner_on_plugin_page', 'sender/sender.php', '0.5' ), | |
| 919 | + array( 'srrl_hide_banner_on_plugin_page', 'user-role/user-role.php', '1.4' ), | |
| 920 | + array( 'pdtr_hide_banner_on_plugin_page', 'updater/updater.php', '1.12' ), | |
| 921 | + array( 'cntctfrmtdb_hide_banner_on_plugin_page', 'contact-form-to-db/contact_form_to_db.php', '1.2' ), | |
| 922 | + array( 'cntctfrmmlt_hide_banner_on_plugin_page', 'contact-form-multi/contact-form-multi.php', '1.0.7' ), | |
| 923 | + array( 'gglmps_hide_banner_on_plugin_page', 'bws-google-maps/bws-google-maps.php', '1.2' ), | |
| 924 | + array( 'fcbkbttn_hide_banner_on_plugin_page', 'facebook-button-plugin/facebook-button-plugin.php', '2.29' ), | |
| 925 | + array( 'twttr_hide_banner_on_plugin_page', 'twitter-plugin/twitter.php', '2.34' ), | |
| 926 | + array( 'pdfprnt_hide_banner_on_plugin_page', 'pdf-print/pdf-print.php', '1.7.1' ), | |
| 927 | + array( 'gglstmp_hide_banner_on_plugin_page', 'google-sitemap-plugin/google-sitemap-plugin.php', '2.8.4' ), | |
| 928 | + array( 'cntctfrmpr_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-pro/contact_form_pro.php', '1.14' ), | |
| 929 | + array( 'cntctfrm_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.47' ), | |
| 930 | + array( 'cptch_hide_banner_on_plugin_page', 'captcha-bws/captcha-bws.php', '3.8.4' ), | |
| 931 | + array( 'gllr_hide_banner_on_plugin_page', 'gallery-plugin/gallery-plugin.php', '3.9.1' ), | |
| 932 | + array( 'cntctfrm_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.62' ), | |
| 933 | + array( 'bwscrrntl_hide_banner_on_plugin_page', 'bws-car-rental/bws-car-rental.php', '0.0.1' ), | |
| 934 | + array( 'rtng_hide_banner_on_plugin_page', 'rating-bws/rating-bws.php', '1.0.0' ), | |
| 935 | + array( 'prflxtrflds_hide_banner_on_plugin_page', 'profile-extra-fields/profile-extra-fields.php', '1.1.3' ), | |
| 936 | + array( 'psttcsv_hide_banner_on_plugin_page', 'post-to-csv/post-to-csv.php', '1.3.4' ), | |
| 937 | + array( 'cstmdmnpg_hide_banner_on_plugin_page', 'custom-admin-page/custom-admin-page.php', '1.0.0' ), | |
| 938 | + ); | |
| 939 | + } | |
| 940 | +} | |