/bws_menu/bws_menu.php

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