bws_go_pro_from_trial_tab

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

Description

bws_go_pro_from_trial_tab( $plugin_info, (string) $plugin_basename, $page, $link_slug, $link_key, $link_pn, (bool) $trial_license_is_set = true ); 

Parameters (7)

0. $plugin_info
The plugin info.
1. $plugin_basename (string)
The plugin basename.
2. $page
The page.
3. $link_slug
The link slug.
4. $link_key
The link key.
5. $link_pn
The link pn.
6. $trial_license_is_set — Optional. (bool) => true
The trial license is set.

Usage

  1. if ( !function_exists( 'bws_go_pro_from_trial_tab' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-captcha-recaptcha-by-bestwebsoft/bws_menu/deprecated.php'; 
  3.  
  4. // The plugin info. 
  5. $plugin_info = null; 
  6.  
  7. // The plugin basename. 
  8. $plugin_basename = ''; 
  9.  
  10. // The page. 
  11. $page = null; 
  12.  
  13. // The link slug. 
  14. $link_slug = null; 
  15.  
  16. // The link key. 
  17. $link_key = null; 
  18.  
  19. // The link pn. 
  20. $link_pn = null; 
  21.  
  22. // The trial license is set. 
  23. $trial_license_is_set = true; 
  24.  
  25. // NOTICE! Understand what this does before running. 
  26. $result = bws_go_pro_from_trial_tab($plugin_info, $plugin_basename, $page, $link_slug, $link_key, $link_pn, $trial_license_is_set); 
  27.  

Defined (1)

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

/bws_menu/deprecated.php  
  1. function bws_go_pro_from_trial_tab( $plugin_info, $plugin_basename, $page, $link_slug, $link_key, $link_pn, $trial_license_is_set = true ) { 
  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 ( $trial_license_is_set ) { ?> 
  5. <form method="post" action=""> 
  6. <p> 
  7. <?php echo sprintf( __( 'In order to continue using the plugin it is necessary to buy a %s license.', 'bestwebsoft' ), '<a href="https://bestwebsoft.com/products/wordpress/plugins/' . $link_slug . '/?k=' . $link_key . '&pn=' . $link_pn . '&v=' . $plugin_info["Version"] . '&wp_v=' . $wp_version .'" target="_blank" title="' . $plugin_info["Name"] . '">Pro</a>' ) . ' '; 
  8. _e( 'After that, you can activate it by entering your license key.', 'bestwebsoft' ); ?><br /> 
  9. <span class="bws_info"> 
  10. <?php _e( 'License key can be found in the', 'bestwebsoft' ); ?> 
  11. <a href="https://bestwebsoft.com/wp-login.php">Client Area</a> 
  12. <?php _e( '(your username is the email address specified during the purchase).', 'bestwebsoft' ); ?> 
  13. </span> 
  14. </p> 
  15. <?php if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $plugin_basename ]['count'] ) && 
  16. '5' < $bstwbsftwppdtplgns_options['go_pro'][ $plugin_basename ]['count'] && 
  17. $bstwbsftwppdtplgns_options['go_pro'][ $plugin_basename ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) { ?> 
  18. <p> 
  19. <input disabled="disabled" type="text" name="bws_license_key" value="" /> 
  20. <input disabled="disabled" type="submit" class="button-primary" value="<?php _e( 'Activate', 'bestwebsoft' ); ?>" /> 
  21. </p> 
  22. <p><?php _e( "Unfortunately, you have exceeded the number of available tries per day.", 'bestwebsoft' ); ?></p> 
  23. <?php } else { ?> 
  24. <p> 
  25. <input type="text" maxlength="100" name="bws_license_key" value="" /> 
  26. <input type="hidden" name="bws_license_plugin" value="<?php echo $plugin_basename; ?>" /> 
  27. <input type="hidden" name="bws_license_submit" value="submit" /> 
  28. <input type="submit" class="button-primary" value="<?php _e( 'Activate', 'bestwebsoft' ); ?>" /> 
  29. <?php wp_nonce_field( $plugin_basename, 'bws_license_nonce_name' ); ?> 
  30. </p> 
  31. <?php } ?> 
  32. </form> 
  33. <?php } else { ?> 
  34. <script type="text/javascript"> 
  35. window.setTimeout( function() { 
  36. window.location.href = 'admin.php?page=<?php echo $page; ?>'; 
  37. }, 5000 ); 
  38. </script> 
  39. <p><?php _e( "Congratulations! The Pro license of the plugin is activated successfully.", 'bestwebsoft' ); ?></p> 
  40. <p> 
  41. <?php _e( "Please, go to", 'bestwebsoft' ); ?> <a href="admin.php?page=<?php echo $page; ?>"><?php _e( 'the setting page', 'bestwebsoft' ); ?></a> 
  42. (<?php _e( "You will be redirected automatically in 5 seconds.", 'bestwebsoft' ); ?>) 
  43. </p> 
  44. <?php }