bws_add_menu_render

The BestWebSoft Google Analytics bws add menu render function.

Description

bws_add_menu_render(); 

Usage

  1. if ( !function_exists( 'bws_add_menu_render' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bestwebsoft-google-analytics/bws_menu/bws_menu.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bws_add_menu_render(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bws_menu/bws_menu.php  
  1. function bws_add_menu_render() { 
  2. global $wpdb, $wpmu, $wp_version, $bws_plugin_info; 
  3. $error = $message = $bwsmn_form_email = ''; 
  4. $bws_donate_link = 'https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=1&product_id=94'; 
  5.  
  6. if ( ! function_exists( 'is_plugin_active_for_network' ) ) 
  7. require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 
  8.  
  9. if ( function_exists( 'is_multisite' ) ) 
  10. $admin_url = ( ! is_multisite() ) ? admin_url( '/' ) : network_admin_url( '/' ); 
  11. else 
  12. $admin_url = admin_url( '/' ); 
  13.  
  14. $bws_plugins = array( 
  15. 'captcha/captcha.php' => array( 
  16. 'name' => 'Captcha',  
  17. 'description' => 'Plugin intended to prove that the visitor is a human being and not a spam robot.',  
  18. 'link' => 'http://bestwebsoft.com/products/captcha/?k=d678516c0990e781edfb6a6c874f0b8a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  19. 'download' => 'http://bestwebsoft.com/products/captcha/download/?k=d678516c0990e781edfb6a6c874f0b8a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  20. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Captcha+bestwebsoft&plugin-search-input=Search+Plugins',  
  21. 'settings' => 'admin.php?page=captcha.php',  
  22. 'pro_version' => 'captcha-pro/captcha_pro.php',  
  23. 'purchase' => 'http://bestwebsoft.com/products/captcha/buy/?k=ff7d65e55e5e7f98f219be9ed711094e&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  24. 'pro_settings' => 'admin.php?page=captcha_pro.php' 
  25. ),  
  26. 'contact-form-plugin/contact_form.php' => array( 
  27. 'name' => 'Contact Form',  
  28. 'description' => 'Add Contact Form to your WordPress website.',  
  29. 'link' => 'http://bestwebsoft.com/products/contact-form/?k=012327ef413e5b527883e031d43b088b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  30. 'download' => 'http://bestwebsoft.com/products/contact-form/download/?k=012327ef413e5b527883e031d43b088b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  31. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Contact+Form+bestwebsoft&plugin-search-input=Search+Plugins',  
  32. 'settings' => 'admin.php?page=contact_form.php',  
  33. 'pro_version' => 'contact-form-pro/contact_form_pro.php',  
  34. 'purchase' => 'http://bestwebsoft.com/products/contact-form/buy/?k=773dc97bb3551975db0e32edca1a6d71&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  35. 'pro_settings' => 'admin.php?page=contact_form_pro.php' 
  36. ),  
  37. 'facebook-button-plugin/facebook-button-plugin.php' => array( 
  38. 'name' => 'Facebook Like Button',  
  39. 'description' => 'Allows you to add the Follow and Like buttons the easiest way.',  
  40. 'link' => 'http://bestwebsoft.com/products/facebook-like-button/?k=05ec4f12327f55848335802581467d55&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  41. 'download' => 'http://bestwebsoft.com/products/facebook-like-button/download/?k=05ec4f12327f55848335802581467d55&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  42. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Facebook+Like+Button+Plugin+bestwebsoft&plugin-search-input=Search+Plugins',  
  43. 'settings' => 'admin.php?page=facebook-button-plugin.php',  
  44. 'pro_version' => 'facebook-button-pro/facebook-button-pro.php',  
  45. 'purchase' => 'http://bestwebsoft.com/products/facebook-like-button/buy/?k=8da168e60a831cfb3525417c333ad275&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  46. 'pro_settings' => 'admin.php?page=facebook-button-pro.php' 
  47. ),  
  48. 'twitter-plugin/twitter.php' => array( 
  49. 'name' => 'Twitter',  
  50. 'description' => 'Allows you to add the Twitter "Follow" and "Like" buttons the easiest way.',  
  51. 'link' => 'http://bestwebsoft.com/products/twitter/?k=f8cb514e25bd7ec4974d64435c5eb333&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  52. 'download' => 'http://bestwebsoft.com/products/twitter/download/?k=f8cb514e25bd7ec4974d64435c5eb333&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  53. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Twitter+Plugin+bestwebsoft&plugin-search-input=Search+Plugins',  
  54. 'settings' => 'admin.php?page=twitter.php',  
  55. 'pro_version' => 'twitter-pro/twitter-pro.php',  
  56. 'purchase' => 'http://bestwebsoft.com/products/twitter/buy/?k=63ecbf0cc9cebf060b5a3c9362299700&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  57. 'pro_settings' => 'admin.php?page=twitter-pro.php' 
  58. ),  
  59. 'portfolio/portfolio.php' => array( 
  60. 'name' => 'Portfolio',  
  61. 'description' => 'Allows you to create a page with the information about your past projects.',  
  62. 'link' => 'http://bestwebsoft.com/products/portfolio/?k=1249a890c5b7bba6bda3f528a94f768b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  63. 'download' => 'http://bestwebsoft.com/products/portfolio/download/?k=1249a890c5b7bba6bda3f528a94f768b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  64. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Portfolio+bestwebsoft&plugin-search-input=Search+Plugins',  
  65. 'settings' => 'admin.php?page=portfolio.php' 
  66. ),  
  67. 'gallery-plugin/gallery-plugin.php' => array( 
  68. 'name' => 'Gallery',  
  69. 'description' => 'Allows you to implement a Gallery page into your website.',  
  70. 'link' => 'http://bestwebsoft.com/products/gallery/?k=2da21c0a64eec7ebf16337fa134c5f78&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  71. 'download' => 'http://bestwebsoft.com/products/gallery/download/?k=2da21c0a64eec7ebf16337fa134c5f78&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  72. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Gallery+Plugin+bestwebsoft&plugin-search-input=Search+Plugins',  
  73. 'settings' => 'admin.php?page=gallery-plugin.php',  
  74. 'pro_version' => 'gallery-plugin-pro/gallery-plugin-pro.php',  
  75. 'purchase' => 'http://bestwebsoft.com/products/gallery/buy/?k=382e5ce7c96a6391f5ffa5e116b37fe0&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  76. 'pro_settings' => 'admin.php?page=gallery-plugin-pro.php' 
  77. ),  
  78. 'adsense-plugin/adsense-plugin.php'=> array( 
  79. 'name' => 'Google AdSense',  
  80. 'description' => 'Allows Google AdSense implementation to your website.',  
  81. 'link' => 'http://bestwebsoft.com/products/google-adsense/?k=60e3979921e354feb0347e88e7d7b73d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  82. 'download' => 'http://bestwebsoft.com/products/google-adsense/download/?k=60e3979921e354feb0347e88e7d7b73d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  83. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Adsense+Plugin+bestwebsoft&plugin-search-input=Search+Plugins',  
  84. 'settings' => 'admin.php?page=adsense-plugin.php' 
  85. ),  
  86. 'custom-search-plugin/custom-search-plugin.php'=> array( 
  87. 'name' => 'Custom Search',  
  88. 'description' => 'Allows to extend your website search functionality by adding a custom post type.',  
  89. 'link' => 'http://bestwebsoft.com/products/custom-search/?k=933be8f3a8b8719d95d1079d15443e29&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  90. 'download' => 'http://bestwebsoft.com/products/custom-search/download/?k=933be8f3a8b8719d95d1079d15443e29&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  91. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Custom+Search+plugin+bestwebsoft&plugin-search-input=Search+Plugins',  
  92. 'settings' => 'admin.php?page=custom_search.php' 
  93. ),  
  94. 'quotes-and-tips/quotes-and-tips.php'=> array( 
  95. 'name' => 'Quotes and Tips',  
  96. 'description' => 'Allows you to implement quotes & tips block into your web site.',  
  97. 'link' => 'http://bestwebsoft.com/products/quotes-and-tips/?k=5738a4e85a798c4a5162240c6515098d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  98. 'download' => 'http://bestwebsoft.com/products/quotes-and-tips/download/?k=5738a4e85a798c4a5162240c6515098d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  99. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Quotes+and+Tips+bestwebsoft&plugin-search-input=Search+Plugins',  
  100. 'settings' => 'admin.php?page=quotes-and-tips.php' 
  101. ),  
  102. 'google-sitemap-plugin/google-sitemap-plugin.php'=> array( 
  103. 'name' => 'Google Sitemap',  
  104. 'description' => 'Allows you to add sitemap file to Google Webmaster Tools.',  
  105. 'link' => 'http://bestwebsoft.com/products/google-sitemap/?k=5202b2f5ce2cf85daee5e5f79a51d806&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  106. 'download' => 'http://bestwebsoft.com/products/google-sitemap/download/?k=5202b2f5ce2cf85daee5e5f79a51d806&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  107. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Google+sitemap+plugin+bestwebsoft&plugin-search-input=Search+Plugins',  
  108. 'settings' => 'admin.php?page=google-sitemap-plugin.php',  
  109. 'pro_version' => 'google-sitemap-pro/google-sitemap-pro.php',  
  110. 'purchase' => 'http://bestwebsoft.com/products/google-sitemap/buy/?k=7ea384a5cc36cb4c22741caa20dcd56d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  111. 'pro_settings' => 'admin.php?page=google-sitemap-pro.php' 
  112. ),  
  113. 'updater/updater.php'=> array( 
  114. 'name' => 'Updater',  
  115. 'description' => 'Allows you to update plugins and WP core.',  
  116. 'link' => 'http://bestwebsoft.com/products/updater/?k=66f3ecd4c1912009d395c4bb30f779d1&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  117. 'download' => 'http://bestwebsoft.com/products/updater/download/?k=66f3ecd4c1912009d395c4bb30f779d1&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  118. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=updater+bestwebsoft&plugin-search-input=Search+Plugins',  
  119. 'settings' => 'admin.php?page=updater-options',  
  120. 'pro_version' => 'updater-pro/updater_pro.php',  
  121. 'purchase' => 'http://bestwebsoft.com/products/updater/buy/?k=cf633acbefbdff78545347fe08a3aecb&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  122. 'pro_settings' => 'admin.php?page=updater-pro-options' 
  123. ),  
  124. 'custom-fields-search/custom-fields-search.php'=> array( 
  125. 'name' => 'Custom Fields Search',  
  126. 'description' => 'Allows you to add website search any existing custom fields.',  
  127. 'link' => 'http://bestwebsoft.com/products/custom-fields-search/?k=f3f8285bb069250c42c6ffac95ed3284&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  128. 'download' => 'http://bestwebsoft.com/products/custom-fields-search/download/?k=f3f8285bb069250c42c6ffac95ed3284&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  129. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Custom+Fields+Search+bestwebsoft&plugin-search-input=Search+Plugins',  
  130. 'settings' => 'admin.php?page=custom_fields_search.php' 
  131. ),  
  132. 'google-one/google-plus-one.php' => array( 
  133. 'name' => 'Google +1',  
  134. 'description' => 'Allows you to see how many times your page has been liked on Google Search Engine as well as who has liked the article.',  
  135. 'link' => 'http://bestwebsoft.com/products/google-plus-one/?k=ce7a88837f0a857b3a2bb142f470853c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  136. 'download' => 'http://bestwebsoft.com/products/google-plus-one/download/?k=ce7a88837f0a857b3a2bb142f470853c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  137. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Google+%2B1+bestwebsoft&plugin-search-input=Search+Plugins',  
  138. 'settings' => 'admin.php?page=google-plus-one.php',  
  139. 'pro_version' => 'google-one-pro/google-plus-one-pro.php',  
  140. 'purchase' => 'http://bestwebsoft.com/products/google-plus-one/buy/?k=f4b0a62d155c9df9601a0531ad5bd832&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  141. 'pro_settings' => 'admin.php?page=google-plus-one-pro.php' 
  142. ),  
  143. 'relevant/related-posts-plugin.php' => array( 
  144. 'name' => 'Relevant - Related Posts',  
  145. 'description' => 'Allows you to display related posts with similar words in category, tags, title or by adding special meta key for posts.',  
  146. 'link' => 'http://bestwebsoft.com/products/related-posts/?k=73fb737037f7141e66415ec259f7e426&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  147. 'download' => 'http://bestwebsoft.com/products/related-posts/download/?k=73fb737037f7141e66415ec259f7e426&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  148. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Related+Posts+Plugin+Bestwebsoft&plugin-search-input=Search+Plugins',  
  149. 'settings' => 'admin.php?page=related-posts-plugin.php' 
  150. ),  
  151. 'contact-form-to-db/contact_form_to_db.php' => array( 
  152. 'name' => 'Contact Form To DB',  
  153. 'description' => 'Allows you to manage the messages that have been sent from your site.',  
  154. 'link' => 'http://bestwebsoft.com/products/contact-form-to-db/?k=ba3747d317c2692e4136ca096a8989d6&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  155. 'download' => 'http://bestwebsoft.com/products/contact-form-to-db/download/?k=ba3747d317c2692e4136ca096a8989d6&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  156. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Contact+Form+to+DB+bestwebsoft&plugin-search-input=Search+Plugins',  
  157. 'settings' => 'admin.php?page=cntctfrmtdb_settings',  
  158. 'pro_version' => 'contact-form-to-db-pro/contact_form_to_db_pro.php',  
  159. 'purchase' => 'http://bestwebsoft.com/products/contact-form-to-db/buy/?k=6ce5f4a9006ec906e4db643669246c6a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  160. 'pro_settings' => 'admin.php?page=cntctfrmtdbpr_settings' 
  161. ),  
  162. 'pdf-print/pdf-print.php' => array( 
  163. 'name' => 'PDF & Print',  
  164. 'description' => 'Allows you to create PDF and Print page with adding appropriate buttons to the content.',  
  165. 'link' => 'http://bestwebsoft.com/products/pdf-print/?k=bfefdfb522a4c0ff0141daa3f271840c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  166. 'download' => 'http://bestwebsoft.com/products/pdf-print/download/?k=bfefdfb522a4c0ff0141daa3f271840c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  167. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=PDF+Print+Bestwebsoft&plugin-search-input=Search+Plugins',  
  168. 'settings' => 'admin.php?page=pdf-print.php',  
  169. 'pro_version' => 'pdf-print-pro/pdf-print-pro.php',  
  170. 'purchase' => 'http://bestwebsoft.com/products/pdf-print/buy/?k=fd43a0e659ddc170a9060027cbfdcc3a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  171. 'pro_settings' => 'admin.php?page=pdf-print-pro.php' 
  172. ),  
  173. 'donate-button/donate.php' => array( 
  174. 'name' => 'Donate',  
  175. 'description' => 'Makes it possible to place donation buttons of various payment systems on your web page.',  
  176. 'link' => 'http://bestwebsoft.com/products/donate/?k=a8b2e2a56914fb1765dd20297c26401b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  177. 'download' => 'http://bestwebsoft.com/products/donate/download/?k=a8b2e2a56914fb1765dd20297c26401b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  178. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Donate+Bestwebsoft&plugin-search-input=Search+Plugins',  
  179. 'settings' => 'admin.php?page=donate.php' 
  180. ),  
  181. 'post-to-csv/post-to-csv.php' => array( 
  182. 'name' => 'Post To CSV',  
  183. 'description' => 'The plugin allows to export posts of any types to a csv file.',  
  184. 'link' => 'http://bestwebsoft.com/products/post-to-csv/?k=653aa55518ae17409293a7a894268b8f&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  185. 'download' => 'http://bestwebsoft.com/products/post-to-csv/download/?k=653aa55518ae17409293a7a894268b8f&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  186. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Post+To+CSV+Bestwebsoft&plugin-search-input=Search+Plugins',  
  187. 'settings' => 'admin.php?page=post-to-csv.php' 
  188. ),  
  189. 'google-shortlink/google-shortlink.php' => array( 
  190. 'name' => 'Google Shortlink',  
  191. 'description' => 'Allows you to get short links from goo.gl servise without leaving your site.',  
  192. 'link' => 'http://bestwebsoft.com/products/google-shortlink/?k=afcf3eaed021bbbbeea1090e16bc22db&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  193. 'download' => 'http://bestwebsoft.com/products/google-shortlink/download/?k=afcf3eaed021bbbbeea1090e16bc22db&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  194. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Google+Shortlink+Bestwebsoft&plugin-search-input=Search+Plugins',  
  195. 'settings' => 'admin.php?page=gglshrtlnk_options' 
  196. ),  
  197. 'htaccess/htaccess.php' => array( 
  198. 'name' => 'Htaccess',  
  199. 'description' => 'Allows controlling access to your website using the directives Allow and Deny.',  
  200. 'link' => 'http://bestwebsoft.com/products/htaccess/?k=2b865fcd56a935d22c5c4f1bba52ed46&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  201. 'download' => 'http://bestwebsoft.com/products/htaccess/download/?k=2b865fcd56a935d22c5c4f1bba52ed46&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  202. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Htaccess+Bestwebsoft&plugin-search-input=Search+Plugins',  
  203. 'settings' => 'admin.php?page=htaccess.php' 
  204. ),  
  205. 'google-captcha/google-captcha.php' => array( 
  206. 'name' => 'Google Captcha (reCAPTCHA)',  
  207. 'description' => 'Plugin intended to prove that the visitor is a human being and not a spam robot.',  
  208. 'link' => 'http://bestwebsoft.com/products/google-captcha/?k=7b59fbe542acf950b29f3e020d5ad735&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  209. 'download' => 'http://bestwebsoft.com/products/google-captcha/download/?k=7b59fbe542acf950b29f3e020d5ad735&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  210. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Google+Captcha+Bestwebsoft&plugin-search-input=Search+Plugins',  
  211. 'settings' => 'admin.php?page=google-captcha.php' 
  212. ),  
  213. 'sender/sender.php' => array( 
  214. 'name' => 'Sender',  
  215. 'description' => 'You can send mails to all users or to certain categories of users.',  
  216. 'link' => 'http://bestwebsoft.com/products/sender/?k=89c297d14ba85a8417a0f2fc05e089c7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  217. 'download' => 'http://bestwebsoft.com/products/sender/download/?k=89c297d14ba85a8417a0f2fc05e089c7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  218. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Sender+Bestwebsoft&plugin-search-input=Search+Plugins',  
  219. 'settings' => 'admin.php?page=sndr_settings',  
  220. 'pro_version' => 'sender-pro/sender-pro.php',  
  221. 'purchase' => 'http://bestwebsoft.com/products/sender/buy/?k=dc5d1a87bdc8aeab2de40ffb99b38054&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  222. 'pro_settings' => 'admin.php?page=sndrpr_settings' 
  223. ),  
  224. 'subscriber/subscriber.php' => array( 
  225. 'name' => 'Subscriber',  
  226. 'description' => 'This plugin allows you to subscribe users for newsletters from your website.',  
  227. 'link' => 'http://bestwebsoft.com/products/subscriber/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  228. 'download' => 'http://bestwebsoft.com/products/subscriber/download/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  229. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Subscriber+Bestwebsoft&plugin-search-input=Search+Plugins',  
  230. 'settings' => 'admin.php?page=sbscrbr_settings_page' 
  231. ),  
  232. 'contact-form-multi/contact-form-multi.php' => array( 
  233. 'name' => 'Contact Form Multi',  
  234. 'description' => 'This plugin allows you to subscribe users for newsletters from your website.',  
  235. 'link' => 'http://bestwebsoft.com/products/contact-form-multi/?k=83cdd9e72a9f4061122ad28a67293c72&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  236. 'download' => 'http://bestwebsoft.com/products/contact-form-multi/download/?k=83cdd9e72a9f4061122ad28a67293c72&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  237. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Contact+Form+Multi+Bestwebsoft&plugin-search-input=Search+Plugins',  
  238. 'settings' => '',  
  239. 'pro_version' => 'contact-form-multi-pro/contact-form-multi-pro.php',  
  240. 'purchase' => 'http://bestwebsoft.com/products/contact-form-multi/buy/?k=fde3a18581c143654f060c398b07e8ac&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  241. 'pro_settings' => '' 
  242. ),  
  243. 'bws-google-maps/bws-google-maps.php' => array( 
  244. 'name' => 'BestWebSoft Google Maps',  
  245. 'description' => 'Easy to set up and insert Google Maps to your website.',  
  246. 'link' => 'http://bestwebsoft.com/products/bws-google-maps/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  247. 'download' => 'http://bestwebsoft.com/products/bws-google-maps/download/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  248. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=BestWebSoft+Google+Maps&plugin-search-input=Search+Plugins',  
  249. 'settings' => 'admin.php?page=bws-google-maps.php',  
  250. 'pro_version' => 'bws-google-maps-pro/bws-google-maps-pro.php',  
  251. 'purchase' => 'http://bestwebsoft.com/products/bws-google-maps/buy/?k=117c3f9fc17f2c83ef430a8a9dc06f56&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  252. 'pro_settings' => 'admin.php?page=bws-google-maps-pro.php' 
  253. ),  
  254. 'bws-google-analytics/bws-google-analytics.php' => array( 
  255. 'name' => 'BestWebSoft Google Analytics',  
  256. 'description' => 'Allows you to retrieve basic stats from Google Analytics account and add the tracking code to your blog.',  
  257. 'link' => 'http://bestwebsoft.com/products/bws-google-analytics/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  258. 'download' => 'http://bestwebsoft.com/products/bws-google-analytics/download/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  259. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=BestWebSoft+Google+Analytics&plugin-search-input=Search+Plugins',  
  260. 'settings' => 'admin.php?page=bws-google-analytics.php' 
  261. ),  
  262. 'db-manager/db-manager.php' => array( 
  263. 'name' => 'DB manager',  
  264. 'description' => 'Allows you to download the latest version of PhpMyadmin and Dumper and manage your site.',  
  265. 'link' => 'http://bestwebsoft.com/products/db-manager/?k=01ed9731780d87f85f5901064b7d76d8&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  266. 'download' => 'http://bestwebsoft.com/products/db-manager/download/?k=01ed9731780d87f85f5901064b7d76d8&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  267. 'wp_install' => 'http://bestwebsoft.com/products/db-manager/download/?k=01ed9731780d87f85f5901064b7d76d8&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  268. 'settings' => 'admin.php?page=db-manager.php' 
  269. ),  
  270. 'user-role/user-role.php' => array( 
  271. 'name' => 'User Role',  
  272. 'description' => 'Allows to change wordpress user role capabilities.',  
  273. 'link' => 'http://bestwebsoft.com/products/user-role/?k=dfe2244835c6fbf601523964b3f34ccc&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  274. 'download' => 'http://bestwebsoft.com/products/user-role/download/?k=dfe2244835c6fbf601523964b3f34ccc&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  275. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=User+Role+BestWebSoft&plugin-search-input=Search+Plugins',  
  276. 'settings' => 'admin.php?page=user-role.php',  
  277. 'pro_version' => 'user-role-pro/user-role-pro.php',  
  278. 'purchase' => 'http://bestwebsoft.com/products/user-role/buy/?k=cfa9cea6613fb3d7c0a3622fa2faaf46&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  279. 'pro_settings' => 'admin.php?page=user-role-pro.php' 
  280. ),  
  281. 'email-queue/email-queue.php' => array( 
  282. 'name' => 'Email Queue',  
  283. 'description' => 'Allows to manage email massages sent by BestWebSoft plugins.',  
  284. 'link' => 'http://bestwebsoft.com/products/email-queue/?k=e345e1b6623f0dca119bc2d9433b130b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  285. 'download' => 'http://bestwebsoft.com/products/email-queue/download/?k=e345e1b6623f0dca119bc2d9433b130b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  286. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Email+Queue+BestWebSoft&plugin-search-input=Search+Plugins',  
  287. 'settings' => 'admin.php?page=mlq_settings' 
  288. ),  
  289. 'limit-attempts/limit-attempts.php' => array( 
  290. 'name' => 'Limit Attempts',  
  291. 'description' => 'Allows you to limit rate of login attempts by the ip, and create whitelist and blacklist.',  
  292. 'link' => 'http://bestwebsoft.com/products/limit-attempts/?k=b14e1697ee4d008abcd4bd34d492573a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  293. 'download' => 'http://bestwebsoft.com/products/limit-attempts/download/?k=b14e1697ee4d008abcd4bd34d492573a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  294. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Limit+Attempts+BestWebSoft&plugin-search-input=Search+Plugins',  
  295. 'settings' => 'admin.php?page=limit-attempts.php',  
  296. 'pro_version' => 'limit-attempts-pro/limit-attempts-pro.php',  
  297. 'purchase' => 'http://bestwebsoft.com/products/limit-attempts/buy/?k=9d42cdf22c7fce2c4b6b447e6a2856e0&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  298. 'pro_settings' => 'admin.php?page=limit-attempts-pro.php' 
  299. ),  
  300. 'job-board/job-board.php' => array( 
  301. 'name' => 'Job board',  
  302. 'description' => 'Allows to create a job-board page on your site.',  
  303. 'link' => 'http://bestwebsoft.com/products/job-board/?k=b0c504c9ce6edd6692e04222af3fed6f&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  304. 'download' => 'http://bestwebsoft.com/products/job-board/download/?k=b0c504c9ce6edd6692e04222af3fed6f&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  305. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Job+board+BestWebSoft&plugin-search-input=Search+Plugins',  
  306. 'settings' => 'admin.php?page=job-board.php' 
  307. ),  
  308. 'multilanguage/multilanguage.php' => array( 
  309. 'name' => 'Multilanguage',  
  310. 'description' => 'Allows to create content on a Wordpress site in different languages.',  
  311. 'link' => 'http://bestwebsoft.com/products/multilanguage/?k=7d68c7bfec2486dc350c67fff57ad433&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  312. 'download' => 'http://bestwebsoft.com/products/multilanguage/download/?k=7d68c7bfec2486dc350c67fff57ad433&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,  
  313. 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Multilanguage+BestWebSoft&plugin-search-input=Search+Plugins',  
  314. 'settings' => 'admin.php?page=mltlngg_settings' 
  315. ); 
  316.  
  317. $all_plugins = get_plugins(); 
  318. $active_plugins = get_option( 'active_plugins' ); 
  319. $recommend_plugins = array_diff_key( $bws_plugins, $all_plugins ); 
  320. $bws_plugins_pro = array(); 
  321.  
  322. foreach ( $bws_plugins as $key_plugin => $value_plugin ) { 
  323. if ( ! isset( $all_plugins[ $key_plugin ] ) && isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) {  
  324. unset( $recommend_plugins[ $key_plugin ] ); 
  325.  
  326. foreach ( $all_plugins as $key_plugin => $value_plugin ) { 
  327. if ( isset( $value_plugin['Author'] ) && $value_plugin['Author'] != "BestWebSoft" ) 
  328. unset( $all_plugins[ $key_plugin ] ); 
  329. elseif ( '-plus.php' == substr( $key_plugin, -9, 9 ) ) 
  330. unset( $all_plugins[ $key_plugin ] ); 
  331. else { 
  332. foreach ( $bws_plugins as $key => $value ) { 
  333. if ( isset( $value['pro_version'] ) && $value['pro_version'] == $key_plugin ) { 
  334. $bws_plugins_pro[ $key_plugin ] = $key; 
  335. unset( $all_plugins[ $key ] ); 
  336. }  
  337.  
  338. if ( isset( $_GET['action'] ) && 'system_status' == $_GET['action'] ) { 
  339. $all_plugins = get_plugins(); 
  340. $active_plugins = get_option( 'active_plugins' ); 
  341. $mysql_info = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" ); 
  342. if ( is_array( $mysql_info ) ) 
  343. $sql_mode = $mysql_info[0]->Value; 
  344. if ( empty( $sql_mode ) ) 
  345. $sql_mode = __( 'Not set', 'bestwebsoft' ); 
  346.  
  347. $safe_mode = ( ini_get( 'safe_mode' ) ) ? __( 'On', 'bestwebsoft' ) : __( 'Off', 'bestwebsoft' ); 
  348. $allow_url_fopen = ( ini_get( 'allow_url_fopen' ) ) ? __( 'On', 'bestwebsoft' ) : __( 'Off', 'bestwebsoft' ); 
  349. $upload_max_filesize = ( ini_get( 'upload_max_filesize' ) )? ini_get( 'upload_max_filesize' ) : __( 'N/A', 'bestwebsoft' ); 
  350. $post_max_size = ( ini_get( 'post_max_size' ) ) ? ini_get( 'post_max_size' ) : __( 'N/A', 'bestwebsoft' ); 
  351. $max_execution_time = ( ini_get( 'max_execution_time' ) ) ? ini_get( 'max_execution_time' ) : __( 'N/A', 'bestwebsoft' ); 
  352. $memory_limit = ( ini_get( 'memory_limit' ) ) ? ini_get( 'memory_limit' ) : __( 'N/A', 'bestwebsoft' ); 
  353. $memory_usage = ( function_exists( 'memory_get_usage' ) ) ? round( memory_get_usage() / 1024 / 1024, 2 ) . __( ' Mb', 'bestwebsoft' ) : __( 'N/A', 'bestwebsoft' ); 
  354. $exif_read_data = ( is_callable( 'exif_read_data' ) ) ? __( 'Yes', 'bestwebsoft' ) . " ( V" . substr( phpversion( 'exif' ), 0, 4 ) . ")" : __( 'No', 'bestwebsoft' ); 
  355. $iptcparse = ( is_callable( 'iptcparse' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' ); 
  356. $xml_parser_create = ( is_callable( 'xml_parser_create' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' ); 
  357. $theme = ( function_exists( 'wp_get_theme' ) ) ? wp_get_theme() : get_theme( get_current_theme() ); 
  358.  
  359. if ( function_exists( 'is_multisite' ) ) { 
  360. if ( is_multisite() ) 
  361. $multisite = __( 'Yes', 'bestwebsoft' ); 
  362. else 
  363. $multisite = __( 'No', 'bestwebsoft' ); 
  364. } else 
  365. $multisite = __( 'N/A', 'bestwebsoft' ); 
  366.  
  367. $system_info = array( 
  368. 'system_info' => '',  
  369. 'active_plugins' => '',  
  370. 'inactive_plugins' => '' 
  371. ); 
  372. $system_info['system_info'] = array( 
  373. __( 'Operating System', 'bestwebsoft' ) => PHP_OS,  
  374. __( 'Server', 'bestwebsoft' ) => $_SERVER["SERVER_SOFTWARE"],  
  375. __( 'Memory usage', 'bestwebsoft' ) => $memory_usage,  
  376. __( 'MYSQL Version', 'bestwebsoft' ) => $wpdb->get_var( "SELECT VERSION() AS version" ),  
  377. __( 'SQL Mode', 'bestwebsoft' ) => $sql_mode,  
  378. __( 'PHP Version', 'bestwebsoft' ) => PHP_VERSION,  
  379. __( 'PHP Safe Mode', 'bestwebsoft' ) => $safe_mode,  
  380. __( 'PHP Allow URL fopen', 'bestwebsoft' ) => $allow_url_fopen,  
  381. __( 'PHP Memory Limit', 'bestwebsoft' ) => $memory_limit,  
  382. __( 'PHP Max Upload Size', 'bestwebsoft' ) => $upload_max_filesize,  
  383. __( 'PHP Max Post Size', 'bestwebsoft' ) => $post_max_size,  
  384. __( 'PHP Max Script Execute Time', 'bestwebsoft' ) => $max_execution_time,  
  385. __( 'PHP Exif support', 'bestwebsoft' ) => $exif_read_data,  
  386. __( 'PHP IPTC support', 'bestwebsoft' ) => $iptcparse,  
  387. __( 'PHP XML support', 'bestwebsoft' ) => $xml_parser_create,  
  388. __( 'Site URL', 'bestwebsoft' ) => get_option( 'siteurl' ),  
  389. __( 'Home URL', 'bestwebsoft' ) => home_url(),  
  390. '$_SERVER[HTTP_HOST]' => $_SERVER['HTTP_HOST'],  
  391. '$_SERVER[SERVER_NAME]' => $_SERVER['SERVER_NAME'],  
  392. __( 'WordPress Version', 'bestwebsoft' ) => $wp_version,  
  393. __( 'WordPress DB Version', 'bestwebsoft' ) => get_option( 'db_version' ),  
  394. __( 'Multisite', 'bestwebsoft' ) => $multisite,  
  395. __( 'Active Theme', 'bestwebsoft' ) => $theme['Name'] . ' ' . $theme['Version'] 
  396. ); 
  397. foreach ( $all_plugins as $path => $plugin ) { 
  398. if ( is_plugin_active( $path ) ) 
  399. $system_info['active_plugins'][ $plugin['Name'] ] = $plugin['Version']; 
  400. else 
  401. $system_info['inactive_plugins'][ $plugin['Name'] ] = $plugin['Version']; 
  402. }  
  403.  
  404. if ( ( isset( $_REQUEST['bwsmn_form_submit'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ) ) || 
  405. ( isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ) ) ) { 
  406. if ( isset( $_REQUEST['bwsmn_form_email'] ) ) { 
  407. $bwsmn_form_email = esc_html( trim( $_REQUEST['bwsmn_form_email'] ) ); 
  408. if ( $bwsmn_form_email == "" || ! is_email( $bwsmn_form_email ) ) { 
  409. $error = __( "Please enter a valid email address.", 'bestwebsoft' ); 
  410. } else { 
  411. $email = $bwsmn_form_email; 
  412. $bwsmn_form_email = ''; 
  413. $message = __( 'Email with system info is sent to ', 'bestwebsoft' ) . $email;  
  414. } else { 
  415. $email = 'plugin_system_status@bestwebsoft.com'; 
  416. $message = __( 'Thank you for contacting us.', 'bestwebsoft' ); 
  417.  
  418. if ( $error == '' ) { 
  419. $headers = 'MIME-Version: 1.0' . "\n"; 
  420. $headers .= 'Content-type: text/html; charset=utf-8' . "\n"; 
  421. $headers .= 'From: ' . get_option( 'admin_email' ); 
  422. $message_text = '<html><head><title>System Info From ' . home_url() . '</title></head><body> 
  423. <h4>Environment</h4> 
  424. <table>'; 
  425. foreach ( $system_info['system_info'] as $key => $value ) { 
  426. $message_text .= '<tr><td>'. $key .'</td><td>'. $value .'</td></tr>';  
  427. $message_text .= '</table>'; 
  428. if ( ! empty( $system_info['active_plugins'] ) ) { 
  429. $message_text .= '<h4>Active Plugins</h4> 
  430. <table>'; 
  431. foreach ( $system_info['active_plugins'] as $key => $value ) {  
  432. $message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>';  
  433. $message_text .= '</table>'; 
  434. if ( ! empty( $system_info['inactive_plugins'] ) ) { 
  435. $message_text .= '<h4>Inactive Plugins</h4> 
  436. <table>'; 
  437. foreach ( $system_info['inactive_plugins'] as $key => $value ) { 
  438. $message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>'; 
  439. $message_text .= '</table>'; 
  440. $message_text .= '</body></html>'; 
  441. $result = wp_mail( $email, 'System Info From ' . home_url(), $message_text, $headers ); 
  442. if ( $result != true ) 
  443. $error = __( "Sorry, email message could not be delivered.", 'bestwebsoft' ); 
  444. } ?> 
  445. <div class="wrap"> 
  446. <div class="icon32 icon32-bws" id="icon-options-general"></div> 
  447. <h2> 
  448. <span class="bws_main title">BestWebSoft</span> 
  449. <ul class="subsubsub bws_title_menu"> 
  450. <li><a href="<?php echo esc_url( 'http://support.bestwebsoft.com/home' ); ?>" target="_blank"><?php _e( 'Need help?', 'bestwebsoft' ); ?></a></li> | 
  451. <li><a href="<?php echo esc_url( 'http://bestwebsoft.com/wp-login.php' ); ?>" target="_blank"><?php _e( 'Client area', 'bestwebsoft' ); ?></a></li> 
  452. <li><a class="bws_system_status <?php if ( isset( $_GET['action'] ) && 'system_status' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins&action=system_status"><?php _e( 'System status', 'bestwebsoft' ); ?></a></li> 
  453. </ul> 
  454. <div class="clear"></div> 
  455. </h2>  
  456. <h2 class="nav-tab-wrapper"> 
  457. <a class="nav-tab<?php if ( !isset( $_GET['action'] ) ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins"><?php _e( 'Plugins', 'bestwebsoft' ); ?></a> 
  458. <?php if ( $wp_version >= '3.4' ) { ?> 
  459. <a class="nav-tab<?php if ( isset( $_GET['action'] ) && 'themes' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins&action=themes"><?php _e( 'Themes', 'bestwebsoft' ); ?></a> 
  460. <?php } ?> 
  461. </h2>  
  462. <?php if ( ! isset( $_GET['action'] ) ) { ?>  
  463. <ul class="subsubsub"> 
  464. <li><a <?php if ( !isset( $_GET['sub'] ) ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins"><?php _e( 'All', 'bestwebsoft' ); ?></a></li> | 
  465. <li><a <?php if ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins&sub=installed"><?php _e( 'Installed', 'bestwebsoft' ); ?></a></li> | 
  466. <li><a <?php if ( isset( $_GET['sub'] ) && 'recommended' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins&sub=recommended"><?php _e( 'Recommended', 'bestwebsoft' ); ?></a></li> 
  467. </ul> 
  468. <div class="clear"></div> 
  469. <?php if ( ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) || !isset( $_GET['sub'] ) ) { ?>  
  470. <h4 class="bws_installed"><?php _e( 'Installed plugins', 'bestwebsoft' ); ?></h4> 
  471. <?php foreach ( $all_plugins as $key_plugin => $value_plugin ) { 
  472. if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) 
  473. $key_plugin = $bws_plugins_pro[ $key_plugin ]; 
  474.  
  475. if ( isset( $bws_plugins[ $key_plugin ] ) ) { 
  476. $key_plugin_explode = explode( '-plugin/', $key_plugin ); 
  477. if ( isset( $key_plugin_explode[1] ) ) 
  478. $icon = $key_plugin_explode[0]; 
  479. else { 
  480. $key_plugin_explode = explode( '/', $key_plugin ); 
  481. $icon = $key_plugin_explode[0]; 
  482. }  
  483.  
  484. if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && ( in_array( $bws_plugins[ $key_plugin ]['pro_version'], $active_plugins ) || is_plugin_active_for_network( $bws_plugins[ $key_plugin ]['pro_version'] ) ) ) { ?> 
  485. <div class="bws_product_box bws_exist_overlay"> 
  486. <div class="bws_product">  
  487. <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div> 
  488. <div class="bws_product_content"> 
  489. <div class="bws_product_icon"> 
  490. <div class="bws_product_icon_pro">PRO</div> 
  491. <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>  
  492. </div>  
  493. <div class="bws_product_description"><?php echo $value_plugin["Description"]; ?></div> 
  494. </div> 
  495. <div class="clear"></div> 
  496. </div> 
  497. <div class="bws_product_links">  
  498. <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a> 
  499. <?php if ( '' != $bws_plugins[ $key_plugin ]["pro_settings"] ) { ?> 
  500. <span> | </span> 
  501. <a href="<?php echo $bws_plugins[ $key_plugin ]["pro_settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a> 
  502. <?php } ?> 
  503. </div> 
  504. </div>  
  505. <?php } elseif ( in_array( $key_plugin, $active_plugins ) || is_plugin_active_for_network( $key_plugin ) ) { 
  506. if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?> 
  507. <div class="bws_product_box bws_product_deactivated"> 
  508. <div class="bws_product">  
  509. <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div> 
  510. <div class="bws_product_content"> 
  511. <div class="bws_product_icon"> 
  512. <div class="bws_product_icon_pro">PRO</div> 
  513. <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/> 
  514. </div> 
  515. <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div> 
  516. </div> 
  517. <div class="clear"></div> 
  518. </div>  
  519. <div class="bws_product_links"> 
  520. <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a> 
  521. <span> | </span> 
  522. <a class="bws_activate" href="plugins.php" title="<?php _e( "Activate this plugin", 'bestwebsoft' ); ?>" target="_blank"><?php _e( "Activate", 'bestwebsoft' ); ?></a> 
  523. </div> 
  524. </div> 
  525. <?php } else { ?> 
  526. <div class="bws_product_box bws_product_free"> 
  527. <div class="bws_product">  
  528. <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div> 
  529. <div class="bws_product_content"> 
  530. <div class="bws_product_icon"> 
  531. <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/> 
  532. </div> 
  533. <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div> 
  534. </div> 
  535. <?php if ( isset( $bws_plugins[ $key_plugin ]["purchase"] ) ) { ?> 
  536. <a class="bws_product_button" href="<?php echo $bws_plugins[ $key_plugin ]["purchase"]; ?>" target="_blank"> 
  537. <?php _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong> 
  538. </a> 
  539. <?php } else { ?> 
  540. <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank"> 
  541. <strong><?php _e( 'DONATE', 'bestwebsoft' );?></strong> 
  542. </a> 
  543. <?php } ?> 
  544. <div class="clear"></div> 
  545. </div>  
  546. <div class="bws_product_links"> 
  547. <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a> 
  548. <?php if ( '' != $bws_plugins[ $key_plugin ]["settings"] ) { ?> 
  549. <span> | </span> 
  550. <a href="<?php echo $bws_plugins[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a> 
  551. <?php } ?> 
  552. </div> 
  553. </div> 
  554. <?php } 
  555. } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) { ?> 
  556. <div class="bws_product_box bws_product_deactivated bws_product_free"> 
  557. <div class="bws_product">  
  558. <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div> 
  559. <div class="bws_product_content">  
  560. <div class="bws_product_icon"> 
  561. <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/> 
  562. </div> 
  563. <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div> 
  564. </div> 
  565. <?php if ( isset( $bws_plugins[ $key_plugin ]["purchase"] ) ) { ?> 
  566. <a class="bws_product_button" href="<?php echo $bws_plugins[ $key_plugin ]["purchase"]; ?>" target="_blank"> 
  567. <?php _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong> 
  568. </a> 
  569. <?php } else { ?> 
  570. <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank"> 
  571. <strong><?php _e( 'DONATE', 'bestwebsoft' );?></strong> 
  572. </a> 
  573. <?php } ?> 
  574. <div class="clear"></div> 
  575. </div> 
  576. <div class="bws_product_links"> 
  577. <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a> 
  578. <span> | </span> 
  579. <a class="bws_activate" href="plugins.php" title="<?php _e( "Activate this plugin", 'bestwebsoft' ); ?>" target="_blank"><?php _e( "Activate", 'bestwebsoft' ); ?></a> 
  580. </div> 
  581. </div> 
  582. <?php } 
  583. } ?> 
  584. <div class="clear"></div> 
  585. <?php if ( ( isset( $_GET['sub'] ) && 'recommended' == $_GET['sub'] ) || !isset( $_GET['sub'] ) ) { ?> 
  586. <h4 class="bws_recommended"><?php _e( 'Recommended plugins', 'bestwebsoft' ); ?></h4> 
  587. <?php foreach ( $recommend_plugins as $key_plugin => $value_plugin ) { 
  588.  
  589. if ( isset( $bws_plugins[ $key_plugin ] ) ) { 
  590. $key_plugin_explode = explode( '-plugin/', $key_plugin ); 
  591. if ( isset( $key_plugin_explode[1] ) ) 
  592. $icon = $key_plugin_explode[0]; 
  593. else { 
  594. $key_plugin_explode = explode( '/', $key_plugin ); 
  595. $icon = $key_plugin_explode[0]; 
  596. } ?> 
  597. <div class="bws_product_box"> 
  598. <div class="bws_product">  
  599. <div class="bws_product_title"><?php echo $value_plugin["name"]; ?></div> 
  600. <div class="bws_product_content"> 
  601. <div class="bws_product_icon"> 
  602. <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) ) { ?>  
  603. <div class="bws_product_icon_pro">PRO</div> 
  604. <?php } ?> 
  605. <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/> 
  606. </div> 
  607. <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div> 
  608. </div> 
  609. <?php if ( isset( $bws_plugins[ $key_plugin ]["pro_version"] ) ) { ?>  
  610. <a class="bws_product_button" href="<?php echo $bws_plugins[ $key_plugin ]["purchase"]; ?>" target="_blank"> 
  611. <?php _e( 'Go', 'bestwebsoft' ); ?> <strong>PRO</strong> 
  612. </a>  
  613. <?php } else { ?> 
  614. <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank"> 
  615. <strong><?php _e( 'DONATE', 'bestwebsoft' ); ?></strong> 
  616. </a> 
  617. <?php } ?> 
  618. </div> 
  619. <div class="clear"></div> 
  620. <div class="bws_product_links">  
  621. <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a> 
  622. <span> | </span> 
  623. <a href="<?php echo $bws_plugins[ $key_plugin ]["wp_install"]; ?>" target="_blank"><?php _e( "Install now", 'bestwebsoft' ); ?></a> 
  624. </div> 
  625. </div> 
  626. <?php }  
  627. } ?>  
  628. <?php } elseif ( 'themes' == $_GET['action'] ) { ?>  
  629. <div id="availablethemes"> 
  630. <?php global $tabs, $tab, $paged, $type, $theme_field_defaults; 
  631. include( ABSPATH . 'wp-admin/includes/theme-install.php' ); 
  632. include( ABSPATH . 'wp-admin/includes/class-wp-themes-list-table.php' ); 
  633. include( ABSPATH . 'wp-admin/includes/class-wp-theme-install-list-table.php' ); 
  634.  
  635. $theme_class = new WP_Theme_Install_List_Table(); 
  636. $paged = $theme_class->get_pagenum(); 
  637. $per_page = 36; 
  638. $args = array( 'page' => $paged, 'per_page' => $per_page, 'fields' => $theme_field_defaults ); 
  639. $args['author'] = 'bestwebsoft'; 
  640. $args = apply_filters( 'install_themes_table_api_args_search', $args ); 
  641. $api = themes_api( 'query_themes', $args ); 
  642.  
  643. if ( is_wp_error( $api ) ) 
  644. wp_die( $api->get_error_message() . '</p> <p><a href="#" onclick="document.location.reload(); return false;">' . __( 'Try again' ) . '</a>' ); 
  645.  
  646. $theme_class->items = $api->themes; 
  647. $theme_class->set_pagination_args( array( 
  648. 'total_items' => $api->info['results'],  
  649. 'per_page' => $per_page,  
  650. 'infinite_scroll' => true,  
  651. ) ); 
  652. $themes = $theme_class->items; 
  653. if ( $wp_version < '3.9' ) { 
  654. foreach ( $themes as $theme ) { ?> 
  655. <div class="available-theme installable-theme"><?php 
  656. global $themes_allowedtags; 
  657. if ( empty( $theme ) ) 
  658. return; 
  659.  
  660. $name = wp_kses( $theme->name, $themes_allowedtags ); 
  661. $author = wp_kses( $theme->author, $themes_allowedtags ); 
  662. $preview_title = sprintf( __('Preview “%s”'), $name ); 
  663. $preview_url = add_query_arg( array( 
  664. 'tab' => 'theme-information',  
  665. 'theme' => $theme->slug,  
  666. ), self_admin_url( 'theme-install.php' ) ); 
  667.  
  668. $actions = array(); 
  669.  
  670. $install_url = add_query_arg( array( 
  671. 'action' => 'install-theme',  
  672. 'theme' => $theme->slug,  
  673. ), self_admin_url( 'update.php' ) ); 
  674.  
  675. $update_url = add_query_arg( array( 
  676. 'action' => 'upgrade-theme',  
  677. 'theme' => $theme->slug,  
  678. ), self_admin_url( 'update.php' ) ); 
  679.  
  680. $status = 'install'; 
  681. $installed_theme = wp_get_theme( $theme->slug ); 
  682. if ( $installed_theme->exists() ) { 
  683. if ( version_compare( $installed_theme->get('Version'), $theme->version, '=' ) ) 
  684. $status = 'latest_installed'; 
  685. elseif ( version_compare( $installed_theme->get('Version'), $theme->version, '>' ) ) 
  686. $status = 'newer_installed'; 
  687. else 
  688. $status = 'update_available'; 
  689. switch ( $status ) { 
  690. default: 
  691. case 'install': 
  692. $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>'; 
  693. break; 
  694. case 'update_available': 
  695. $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>'; 
  696. break; 
  697. case 'newer_installed': 
  698. case 'latest_installed': 
  699. $actions[] = '<span class="install-now" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>'; 
  700. break; 
  701. $actions[] = '<a class="install-theme-preview" href="' . esc_url( $preview_url ) . '" title="' . esc_attr( sprintf( __( 'Preview %s' ), $name ) ) . '">' . __( 'Preview' ) . '</a>'; 
  702. $actions = apply_filters( 'theme_install_actions', $actions, $theme ); ?> 
  703. <a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>"> 
  704. <img src='<?php echo esc_url( $theme->screenshot_url ); ?>' width='150' /> 
  705. </a> 
  706. <h3><?php echo $name; ?></h3> 
  707. <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div> 
  708. <div class="action-links"> 
  709. <ul> 
  710. <?php foreach ( $actions as $action ): ?> 
  711. <li><?php echo $action; ?></li> 
  712. <?php endforeach; ?> 
  713. <li class="hide-if-no-js"><a href="#" class="theme-detail"><?php _e('Details') ?></a></li> 
  714. </ul> 
  715. </div> 
  716. <?php $theme_class->install_theme_info( $theme ); ?> 
  717. </div> 
  718. <?php } 
  719. // end foreach $theme_names 
  720. $theme_class->theme_installer(); 
  721. } else { ?> 
  722. <div class="theme-browser"> 
  723. <div class="themes"> 
  724. <?php foreach ( $themes as $key => $theme ) { 
  725. $installed_theme = wp_get_theme( $theme->slug ); 
  726. if ( $installed_theme->exists() ) 
  727. $theme->installed = true; 
  728. else 
  729. $theme->installed = false; 
  730. ?> 
  731. <div class="theme" tabindex="0"> 
  732. <?php if ( $theme->screenshot_url ) { ?> 
  733. <div class="theme-screenshot"> 
  734. <img src="<?php echo $theme->screenshot_url; ?>" alt="" /> 
  735. </div> 
  736. <?php } else { ?> 
  737. <div class="theme-screenshot blank"></div> 
  738. <?php } ?> 
  739. <div class="theme-author"><?php printf( __( 'By %s' ), $theme->author ); ?></div> 
  740. <h3 class="theme-name"><?php echo $theme->name; ?></h3> 
  741. <div class="theme-actions"> 
  742. <a class="button button-secondary preview install-theme-preview" href="theme-install.php?theme=<?php echo $theme->slug ?>"><?php esc_html_e( 'Learn More' ); ?></a> 
  743. </div> 
  744. <?php if ( $theme->installed ) { ?> 
  745. <div class="theme-installed"><?php _e( 'Already Installed' ); ?></div> 
  746. <?php } ?> 
  747. </div> 
  748. <?php } ?> 
  749. <br class="clear" /> 
  750. </div> 
  751. </div> 
  752. <div class="theme-overlay"></div> 
  753. <?php } ?> 
  754. </div> 
  755. <?php } elseif ( 'system_status' == $_GET['action'] ) { ?> 
  756. <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> 
  757. <div class="error" <?php if ( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div> 
  758. <h3><?php _e( 'System status', 'bestwebsoft' ); ?></h3> 
  759. <div class="inside"> 
  760. <table class="bws_system_info"> 
  761. <thead><tr><th><?php _e( 'Environment', 'bestwebsoft' ); ?></th><td></td></tr></thead> 
  762. <tbody> 
  763. <?php foreach ( $system_info['system_info'] as $key => $value ) { ?>  
  764. <tr> 
  765. <td scope="row"><?php echo $key; ?></td> 
  766. <td scope="row"><?php echo $value; ?></td> 
  767. </tr>  
  768. <?php } ?> 
  769. </tbody> 
  770. </table> 
  771. <table class="bws_system_info"> 
  772. <thead><tr><th><?php _e( 'Active Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead> 
  773. <tbody> 
  774. <?php if ( ! empty( $system_info['active_plugins'] ) ) { 
  775. foreach ( $system_info['active_plugins'] as $key => $value ) { ?>  
  776. <tr> 
  777. <td scope="row"><?php echo $key; ?></td> 
  778. <td scope="row"><?php echo $value; ?></td> 
  779. </tr>  
  780. <?php } 
  781. } ?> 
  782. </tbody> 
  783. </table> 
  784. <table class="bws_system_info"> 
  785. <thead><tr><th><?php _e( 'Inactive Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead> 
  786. <tbody> 
  787. <?php if ( ! empty( $system_info['inactive_plugins'] ) ) { 
  788. foreach ( $system_info['inactive_plugins'] as $key => $value ) { ?>  
  789. <tr> 
  790. <td scope="row"><?php echo $key; ?></td> 
  791. <td scope="row"><?php echo $value; ?></td> 
  792. </tr>  
  793. <?php }  
  794. } ?> 
  795. </tbody> 
  796. </table> 
  797. <div class="clear"></div>  
  798. <form method="post" action="admin.php?page=bws_plugins&action=system_status"> 
  799. <p>  
  800. <input type="hidden" name="bwsmn_form_submit" value="submit" /> 
  801. <input type="submit" class="button-primary" value="<?php _e( 'Send to support', 'bestwebsoft' ) ?>" /> 
  802. <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ); ?>  
  803. </p>  
  804. </form>  
  805. <form method="post" action="admin.php?page=bws_plugins&action=system_status">  
  806. <p>  
  807. <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" />  
  808. <input type="submit" class="button" value="<?php _e( 'Send to custom email »', 'bestwebsoft' ) ?>" /> 
  809. <input type="text" value="<?php echo $bwsmn_form_email; ?>" name="bwsmn_form_email" /> 
  810. <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ); ?> 
  811. </p>  
  812. </form>  
  813. </div> 
  814. <?php } ?> 
  815. </div> 
  816. <?php }