Нет описания

custom-actions.php 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. defined('ABSPATH') || die();
  3. $isPRO = NextendSocialLoginAdmin::isPro();
  4. $attr = '';
  5. if (!$isPRO) {
  6. $attr = ' disabled ';
  7. }
  8. $settings = NextendSocialLogin::$settings;
  9. NextendSocialLoginAdmin::showProBox();
  10. ?>
  11. <table class="form-table">
  12. <tbody>
  13. <tr>
  14. <th scope="row"><?php _e('Custom Actions', 'nextend-facebook-connect'); ?></th>
  15. <td>
  16. <?php
  17. $customActions = $settings->get('custom_actions');
  18. ?>
  19. <textarea rows="4" cols="53" name="custom_actions" id="custom_actions"<?php echo $attr; ?>><?php echo esc_textarea($customActions); ?></textarea>
  20. <p class="description"><?php printf(__('%1$s Add your custom actions here. One action per line.', 'nextend-facebook-connect'), '<b>' . __("Usage:", "nextend-facebook-connect") . '</b>'); ?></p>
  21. <p class="description"><?php printf(__('%1$s The HTML of the social buttons will be added at the place where the action is fired.', 'nextend-facebook-connect'), '<b>' . __("Important:", "nextend-facebook-connect") . '</b>'); ?></p>
  22. <p class="description"><?php printf(__('If you %1$sexperience problems%2$s because of this feature, you can disable it by defining the %3$s constant.', 'nextend-facebook-connect'), '<a href="https://nextendweb.com/nextend-social-login-docs/global-settings-custom-actions/#custom-actions" target="_blank">', '</a>', '<code>NSL_DISABLE_CUSTOM_ACTIONS</code>'); ?></p>
  23. </td>
  24. </tr>
  25. <tr>
  26. <th scope="row"><?php _e('Button style', 'nextend-facebook-connect'); ?></th>
  27. <td>
  28. <fieldset>
  29. <label>
  30. <input type="radio" name="custom_actions_button_style"
  31. value="default" <?php if ($settings->get('custom_actions_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  32. <span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
  33. <img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
  34. </label>
  35. <label>
  36. <input type="radio" name="custom_actions_button_style"
  37. value="fullwidth" <?php if ($settings->get('custom_actions_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  38. <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
  39. <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
  40. </label>
  41. <label>
  42. <input type="radio" name="custom_actions_button_style"
  43. value="icon" <?php if ($settings->get('custom_actions_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  44. <span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
  45. <img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
  46. </label><br>
  47. </fieldset>
  48. </td>
  49. </tr>
  50. <tr>
  51. <th scope="row"><?php _e('Button layout', 'nextend-facebook-connect'); ?></th>
  52. <td>
  53. <fieldset>
  54. <label>
  55. <input type="radio" name="custom_actions_button_layout"
  56. value="default" <?php if ($settings->get('custom_actions_button_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  57. <span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
  58. <img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
  59. </label>
  60. <label>
  61. <input type="radio" name="custom_actions_button_layout"
  62. value="default-separator-top" <?php if ($settings->get('custom_actions_button_layout') == 'default-separator-top') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  63. <span><?php _e('Default with top separator', 'nextend-facebook-connect'); ?></span><br/>
  64. <img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
  65. </label>
  66. <label>
  67. <input type="radio" name="custom_actions_button_layout"
  68. value="default-separator-bottom" <?php if ($settings->get('custom_actions_button_layout') == 'default-separator-bottom') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  69. <span><?php _e('Default with bottom separator', 'nextend-facebook-connect'); ?></span><br/>
  70. <img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
  71. </label><br>
  72. </fieldset>
  73. </td>
  74. </tr>
  75. <tr>
  76. <th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
  77. <td>
  78. <fieldset>
  79. <label><input type="radio" name="custom_actions_button_align"
  80. value="left" <?php if ($settings->get('custom_actions_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  81. <span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
  82. <label><input type="radio" name="custom_actions_button_align"
  83. value="center" <?php if ($settings->get('custom_actions_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  84. <span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
  85. <label><input type="radio" name="custom_actions_button_align"
  86. value="right" <?php if ($settings->get('custom_actions_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  87. <span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
  88. </fieldset>
  89. </td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. <?php if ($isPRO): ?>
  94. <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
  95. value="<?php _e('Save Changes'); ?>"></p>
  96. <?php endif; ?>