No Description

settings.php 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. defined('ABSPATH') || die();
  3. /** @var $this NextendSocialProviderAdmin */
  4. $provider = $this->getProvider();
  5. $settings = $provider->settings;
  6. ?>
  7. <div class="nsl-admin-sub-content">
  8. <?php if (substr($provider->getLoginUrl(), 0, 8) !== 'https://'): ?>
  9. <div class="error">
  10. <p><?php printf(__('%1$s allows HTTPS OAuth Redirects only. You must move your site to HTTPS in order to allow login with %1$s.', 'nextend-facebook-connect'), 'Facebook'); ?></p>
  11. <p>
  12. <a href="https://nextendweb.com/nextend-social-login-docs/facebook-api-changes/#enforce-https" target="_blank"><?php _e('How to get SSL for my WordPress site?', 'nextend-facebook-connect'); ?></a>
  13. </p>
  14. </div>
  15. <?php endif; ?>
  16. <?php
  17. $this->renderSettingsHeader();
  18. ?>
  19. <form method="post" action="<?php echo admin_url('admin-post.php'); ?>" novalidate="novalidate">
  20. <?php wp_nonce_field('nextend-social-login'); ?>
  21. <input type="hidden" name="action" value="nextend-social-login"/>
  22. <input type="hidden" name="view" value="provider-<?php echo $provider->getId(); ?>"/>
  23. <input type="hidden" name="subview" value="settings"/>
  24. <input type="hidden" name="settings_saved" value="1"/>
  25. <input type="hidden" name="tested" id="tested" value="<?php echo esc_attr($settings->get('tested')); ?>"/>
  26. <table class="form-table">
  27. <tbody>
  28. <?php if (!defined('NEXTEND_FB_APP_ID')): ?>
  29. <tr>
  30. <th scope="row"><label for="appid"><?php _e('App ID', 'nextend-facebook-connect'); ?>
  31. - <em>(<?php _e('Required', 'nextend-facebook-connect'); ?>)</em></label></th>
  32. <td>
  33. <input name="appid" type="text" id="appid"
  34. value="<?php echo esc_attr($settings->get('appid')); ?>" class="regular-text">
  35. <p class="description"
  36. id="tagline-appid"><?php printf(__('If you are not sure what is your %1$s, please head over to <a href="%2$s">Getting Started</a>', 'nextend-facebook-connect'), 'App ID', $this->getUrl()); ?></p>
  37. </td>
  38. </tr>
  39. <?php endif; ?>
  40. <?php if (!defined('NEXTEND_FB_APP_SECRET')): ?>
  41. <tr>
  42. <th scope="row"><label for="secret"><?php _e('App Secret', 'nextend-facebook-connect'); ?>
  43. - <em>(<?php _e('Required', 'nextend-facebook-connect'); ?>)</em></label>
  44. </th>
  45. <td><input name="secret" type="text" id="secret"
  46. value="<?php echo esc_attr($settings->get('secret')); ?>" class="regular-text"></td>
  47. </tr>
  48. <?php endif; ?>
  49. </tbody>
  50. </table>
  51. <?php if ($settings->get('appid')): ?>
  52. <div class="error">
  53. <p><?php printf(__('By replacing your existing %1$s App, users with linked %1$s accounts will no longer be able to login with %1$s.', 'nextend-facebook-connect'), 'Facebook'); ?></p>
  54. <p>
  55. <a href="https://nextendweb.com/nextend-social-login-docs/provider-facebook/#app_scoped_user_id" target="_blank"><?php _e('Find out why?', 'nextend-facebook-connect'); ?></a>
  56. </p>
  57. </div>
  58. <?php endif; ?>
  59. <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
  60. value="<?php _e('Save Changes'); ?>"></p>
  61. <?php
  62. $this->renderOtherSettings();
  63. $this->renderProSettings();
  64. ?>
  65. </form>
  66. </div>