bws_go_pro_tab_show

The Google Captcha (reCAPTCHA) by BestWebSoft bws go pro tab show function.

Description

Parameters (11)

0. $bws_hide_premium_options_check
The bws hide premium options check.
1. $plugin_info
The plugin info.
2. $plugin_basename (string)
The plugin basename.
3. $page
The page.
4. $pro_page
The pro page.
5. $bws_license_plugin
The bws license plugin.
6. $link_slug
The link slug.
7. $link_key
The link key.
8. $link_pn
The link pn.
9. $pro_plugin_is_activated — Optional. (constant) => false
The pro plugin is activated.
10. $trial_days_number — Optional. (bool) => false
The trial days number.

Usage

  1. if ( !function_exists( 'bws_go_pro_tab_show' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-captcha-recaptcha-by-bestwebsoft/bws_menu/deprecated.php'; 
  3.  
  4. // The bws hide premium options check. 
  5. $bws_hide_premium_options_check = null; 
  6.  
  7. // The plugin info. 
  8. $plugin_info = null; 
  9.  
  10. // The plugin basename. 
  11. $plugin_basename = ''; 
  12.  
  13. // The page. 
  14. $page = null; 
  15.  
  16. // The pro page. 
  17. $pro_page = null; 
  18.  
  19. // The bws license plugin. 
  20. $bws_license_plugin = null; 
  21.  
  22. // The link slug. 
  23. $link_slug = null; 
  24.  
  25. // The link key. 
  26. $link_key = null; 
  27.  
  28. // The link pn. 
  29. $link_pn = null; 
  30.  
  31. // The pro plugin is activated. 
  32. $pro_plugin_is_activated = false; 
  33.  
  34. // The trial days number. 
  35. $trial_days_number = false; 
  36.  
  37. // NOTICE! Understand what this does before running. 
  38. $result = bws_go_pro_tab_show($bws_hide_premium_options_check, $plugin_info, $plugin_basename, $page, $pro_page, $bws_license_plugin, $link_slug, $link_key, $link_pn, $pro_plugin_is_activated, $trial_days_number); 
  39.  

Defined (1)

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

/bws_menu/deprecated.php  
  1. function bws_go_pro_tab_show( $bws_hide_premium_options_check, $plugin_info, $plugin_basename, $page, $pro_page, $bws_license_plugin, $link_slug, $link_key, $link_pn, $pro_plugin_is_activated = false, $trial_days_number = false ) { 
  2. global $wp_version, $bstwbsftwppdtplgns_options; 
  3. $bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? stripslashes( esc_html( trim( $_POST['bws_license_key'] ) ) ) : ""; 
  4. if ( $pro_plugin_is_activated ) { ?> 
  5. <script type="text/javascript"> 
  6. window.setTimeout( function() { 
  7. window.location.href = 'admin.php?page=<?php echo $pro_page; ?>'; 
  8. }, 5000 ); 
  9. </script> 
  10. <p><?php _e( "Congratulations! Pro version of the plugin is installed and activated successfully.", 'bestwebsoft' ); ?></p> 
  11. <p> 
  12. <?php _e( "Please, go to", 'bestwebsoft' ); ?> <a href="admin.php?page=<?php echo $pro_page; ?>"><?php _e( 'the setting page', 'bestwebsoft' ); ?></a> 
  13. (<?php _e( "You will be redirected automatically in 5 seconds.", 'bestwebsoft' ); ?>) 
  14. </p> 
  15. <?php } else { 
  16. if ( $bws_hide_premium_options_check ) { ?> 
  17. <form method="post" action=""> 
  18. <p> 
  19. <input type="hidden" name="bws_hide_premium_options_submit" value="submit" /> 
  20. <input type="submit" class="button" value="<?php _e( 'Show Pro features', 'bestwebsoft' ); ?>" /> 
  21. <?php wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?> 
  22. </p> 
  23. </form> 
  24. <?php } ?> 
  25. <form method="post" action=""> 
  26. <p> 
  27. <?php _e( 'Enter your license key to install and activate', 'bestwebsoft' ); ?> 
  28. <a href="https://bestwebsoft.com/products/wordpress/plugins/<?php echo $link_slug; ?>/?k=<?php echo $link_key; ?>&pn=<?php echo $link_pn; ?>&v=<?php echo $plugin_info["Version"]; ?>&wp_v=<?php echo $wp_version; ?>" target="_blank" title="<?php echo $plugin_info["Name"]; ?> Pro">Pro</a> 
  29. <?php _e( 'version of the plugin.', 'bestwebsoft' ); ?><br /> 
  30. <span class="bws_info"> 
  31. <?php _e( 'License key can be found in the', 'bestwebsoft' ); ?> 
  32. <a href="https://bestwebsoft.com/wp-login.php">Client Area</a> 
  33. <?php _e( '(your username is the email address specified during the purchase).', 'bestwebsoft' ); ?> 
  34. </span> 
  35. </p> 
  36. <?php if ( $trial_days_number !== false ) 
  37. $trial_days_number = __( 'or', 'bestwebsoft' ) . ' <a href="https://bestwebsoft.com/products/wordpress/plugins/' . $link_slug . '/trial/" target="_blank">' . sprintf( __( 'Start Your Free %s-Day Trial Now', 'bestwebsoft' ), $trial_days_number ) . '</a>'; 
  38. if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && 
  39. '5' < $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] && 
  40. $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) { ?> 
  41. <p> 
  42. <input disabled="disabled" type="text" name="bws_license_key" value="<?php echo $bws_license_key; ?>" /> 
  43. <input disabled="disabled" type="submit" class="button-primary" value="<?php _e( 'Activate', 'bestwebsoft' ); ?>" /> 
  44. <?php if ( $trial_days_number !== false ) echo $trial_days_number; ?> 
  45. </p> 
  46. <p><?php _e( "Unfortunately, you have exceeded the number of available tries per day. Please, upload the plugin manually.", 'bestwebsoft' ); ?></p> 
  47. <?php } else { ?> 
  48. <p> 
  49. <input type="text" maxlength="100" name="bws_license_key" value="<?php echo $bws_license_key; ?>" /> 
  50. <input type="hidden" name="bws_license_plugin" value="<?php echo $bws_license_plugin; ?>" /> 
  51. <input type="hidden" name="bws_license_submit" value="submit" /> 
  52. <input type="submit" class="button-primary" value="<?php _e( 'Activate', 'bestwebsoft' ); ?>" /> 
  53. <?php if ( $trial_days_number !== false ) echo $trial_days_number; 
  54. wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?> 
  55. </p> 
  56. <?php } ?> 
  57. </form> 
  58. <?php }