Açıklama Yok

pro.php 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. $state = NextendSocialLoginAdmin::getProState();
  3. function nsl_get_pro_no_license() {
  4. ?>
  5. <div class="nsl-box nsl-box-yellow nsl-box-yellow-bg nsl-box-padlock">
  6. <h2 class="title"><?php _e('Get Pro Addon to unlock more features', 'nextend-facebook-connect'); ?></h2>
  7. <p><?php printf(__('The features below are available in %s Pro Addon. Get it today and tweak the awesome settings.', 'nextend-facebook-connect'), "Nextend Social Login"); ?></p>
  8. <p><?php _e('If you already have a license, you can Authorize your Pro Addon. Otherwise you can purchase it using the button below.', 'nextend-facebook-connect'); ?></p>
  9. <p>
  10. <a href="<?php echo NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/social-login/', 'buy-pro-addon-button'); ?>"
  11. target="_blank"
  12. class="button button-primary"><?php _e('Buy Pro Addon', 'nextend-facebook-connect'); ?></a>
  13. <a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('pro-addon'); ?>"
  14. class="button button-secondary"><?php _e('Authorize Pro Addon', 'nextend-facebook-connect'); ?></a>
  15. </p>
  16. </div>
  17. <?php
  18. }
  19. function nsl_get_pro_installed() {
  20. ?>
  21. <div class="nsl-box nsl-box-blue">
  22. <h2 class="title"><?php _e('Pro Addon is not activated', 'nextend-facebook-connect'); ?></h2>
  23. <p><?php _e('To be able to use the Pro features, you need to install and activate the Nextend Social Login Pro Addon.', 'nextend-facebook-connect'); ?></p>
  24. <p>
  25. <a href="<?php echo wp_nonce_url(add_query_arg(array(
  26. 'action' => 'activate',
  27. 'plugin' => urlencode('nextend-social-login-pro/nextend-social-login-pro.php'),
  28. 'plugin_status' => 'all'
  29. ), admin_url('plugins.php')), 'activate-plugin_' . 'nextend-social-login-pro/nextend-social-login-pro.php'); ?>"
  30. target="_blank" onclick="setTimeout(function(){window.location.reload(true)}, 2000)"
  31. class="button button-primary"><?php _e('Activate Pro Addon', 'nextend-facebook-connect'); ?></a>
  32. </p>
  33. </div>
  34. <?php
  35. }
  36. function nsl_get_pro_not_installed() {
  37. ?>
  38. <div class="nsl-box nsl-box-blue">
  39. <h2 class="title"><?php _e('Pro Addon is not installed', 'nextend-facebook-connect'); ?></h2>
  40. <p><?php _e('To be able to use the Pro features, you need to install and activate the Nextend Social Login Pro Addon.', 'nextend-facebook-connect'); ?></p>
  41. <p>
  42. <a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('pro-addon'); ?>"
  43. class="button button-primary"><?php _e('Install Pro Addon', 'nextend-facebook-connect'); ?></a>
  44. </p>
  45. </div>
  46. <?php
  47. }
  48. switch ($state) {
  49. case 'no-capability':
  50. break;
  51. case 'not-installed':
  52. nsl_get_pro_not_installed();
  53. break;
  54. case 'installed':
  55. nsl_get_pro_installed();
  56. break;
  57. default:
  58. nsl_get_pro_no_license();
  59. break;
  60. }