Нема описа

getting-started.php 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. defined('ABSPATH') || die();
  3. /** @var $this NextendSocialProviderAdmin */
  4. $lastUpdated = '2021-10-27';
  5. $provider = $this->getProvider();
  6. ?>
  7. <div class="nsl-admin-sub-content">
  8. <div class="nsl-admin-getting-started">
  9. <h2 class="title"><?php _e('Getting Started', 'nextend-facebook-connect'); ?></h2>
  10. <p><?php printf(__('To allow your visitors to log in with their %1$s account, first you must create a %1$s App. The following guide will help you through the %1$s App creation process. After you have created your %1$s App, head over to "Settings" and configure the given "%2$s" and "%3$s" according to your %1$s App.', 'nextend-facebook-connect'), "Twitter", "Consumer Key", "Consumer Secret"); ?></p>
  11. <p><?php do_action('nsl_getting_started_warnings', $provider, $lastUpdated); ?></p>
  12. <h2 class="title"><?php printf(_x('Create %s', 'App creation', 'nextend-facebook-connect'), 'Twitter App'); ?></h2>
  13. <ol>
  14. <li><?php printf(__('Navigate to <b>%s</b>', 'nextend-facebook-connect'), '<a href="https://developer.twitter.com/en/portal/projects-and-apps" target="_blank">https://developer.twitter.com/en/portal/projects-and-apps</a>'); ?></li>
  15. <li><?php printf(__('Log in with your %s credentials if you are not logged in.', 'nextend-facebook-connect'), 'Twitter'); ?></li>
  16. <li><?php _e('If you don\'t have a developer account yet, please apply one by filling all the required details! This is required for the next steps!', 'nextend-facebook-connect'); ?></li>
  17. <li><?php printf(__('Once your developer account is complete, navigate back to <b>%s</b> if you aren\'t already there!', 'nextend-facebook-connect'), '<a href="https://developer.twitter.com/en/portal/projects-and-apps" target="_blank">https://developer.twitter.com/en/portal/projects-and-apps</a>'); ?>
  18. <li><?php printf(__('Click on "<b>%s</b>"!', 'nextend-facebook-connect'), '+ Create Project'); ?></li>
  19. <li><?php _e('Name your project, and go through the basic setup. You’ll need to select your use case, give a description and enter a name for the App as well.', 'nextend-facebook-connect'); ?></li>
  20. <li><?php printf(__('Click "<b>%s</b>"!', 'nextend-facebook-connect'), 'Next'); ?></li>
  21. <li><?php printf(__('You’ll find your API key and secret on this page. Copy and paste the "<b>%1$s</b>" and the "<b>%2$s</b>" to the corresponding fields at %3$s and press "<b>Save Changes</b>".', 'nextend-facebook-connect'), 'API key', 'API secret key', 'Nextend Social Login > Twitter > Settings'); ?></li>
  22. <li><?php printf(__('Go back to your Twitter project and on the left side, under the "<b>%s</b>" section click on the name of your App.', 'nextend-facebook-connect'), 'Projects and Apps'); ?></li>
  23. <li><?php printf(__('Scroll down and click on the "<b>%1$s</b>" button at "<b>%2$s</b>".', 'nextend-facebook-connect'), 'Edit', 'Authentication settings'); ?></li>
  24. <li><?php printf(__('Switch on the "<b>%s</b>" option.', 'nextend-facebook-connect'), 'Enable 3-legged OAuth'); ?></li>
  25. <li><?php
  26. $loginUrls = $provider->getAllRedirectUrisForAppCreation();
  27. printf(__('Add the following URL to the "<b>%1$s</b>" field:', 'nextend-facebook-connect'), 'Callback URLs');
  28. echo "<ul>";
  29. foreach ($loginUrls as $loginUrl) {
  30. echo "<li><strong>" . $loginUrl . "</strong></li>";
  31. }
  32. echo "</ul>";
  33. ?>
  34. </li>
  35. <li><?php printf(__('Enter your site\'s URL to the "<b>%1$s</b>" field: <b>%2$s</b>', 'nextend-facebook-connect'), 'Website URL', site_url()); ?></li>
  36. <li><?php printf(__('If you want to get the email address as well, then don’t forget to enable the "<b>%1$s</b>" option. In this case you also need to fill the "<b>%2$s</b>" and the "<b>%3$s</b>" fields with the corresponding URLs!', 'nextend-facebook-connect'), 'Request email address from users', 'Terms of service', 'Privacy policy'); ?></li>
  37. <li><?php printf(__('Click on "<b>%s</b>".', 'nextend-facebook-connect'), 'Save'); ?></li>
  38. <li><?php printf(__('Go back to %1$s and <b>Verify</b> your %2$s provider.', 'nextend-facebook-connect'), 'Nextend Social Login', 'Twitter'); ?></li>
  39. </ol>
  40. <a href="<?php echo $this->getUrl('settings'); ?>"
  41. class="button button-primary"><?php printf(__('I am done setting up my %s', 'nextend-facebook-connect'), 'Twitter App'); ?></a>
  42. </div>
  43. <br>
  44. <div class="nsl-admin-embed-youtube">
  45. <div></div>
  46. <iframe src="https://www.youtube.com/embed/5m4kD11Ai2w?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  47. </div>
  48. </div>