Нема описа

buddypress.php 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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('Register form', 'nextend-facebook-connect'); ?></th>
  15. <td>
  16. <fieldset>
  17. <label><input type="radio" name="buddypress_register_button"
  18. value="" <?php if ($settings->get('buddypress_register_button') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  19. <span><?php _e('No Connect button', 'nextend-facebook-connect'); ?></span></label><br>
  20. <label><input type="radio" name="buddypress_register_button"
  21. value="bp_before_register_page" <?php if ($settings->get('buddypress_register_button') == 'bp_before_register_page') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  22. <span><?php _e('Connect button before register', 'nextend-facebook-connect'); ?></span>
  23. <code><?php _e('Action:'); ?>
  24. bp_before_register_page</code></label><br>
  25. <label><input type="radio" name="buddypress_register_button"
  26. value="bp_before_account_details_fields" <?php if ($settings->get('buddypress_register_button') == 'bp_before_account_details_fields') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  27. <span><?php _e('Connect button before account details', 'nextend-facebook-connect'); ?></span>
  28. <code><?php _e('Action:'); ?>
  29. bp_before_account_details_fields</code></label><br>
  30. <label><input type="radio" name="buddypress_register_button"
  31. value="bp_after_register_page" <?php if ($settings->get('buddypress_register_button') == 'bp_after_register_page') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  32. <span><?php _e('Connect button after register', 'nextend-facebook-connect'); ?></span>
  33. <code><?php _e('Action:'); ?>
  34. bp_after_register_page</code></label><br>
  35. </fieldset>
  36. </td>
  37. </tr>
  38. <tr>
  39. <th scope="row"><?php _e('Register button style', 'nextend-facebook-connect'); ?></th>
  40. <td>
  41. <fieldset>
  42. <label>
  43. <input type="radio" name="buddypress_register_button_style"
  44. value="default" <?php if ($settings->get('buddypress_register_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  45. <span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
  46. <img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
  47. </label>
  48. <label>
  49. <input type="radio" name="buddypress_register_button_style"
  50. value="fullwidth" <?php if ($settings->get('buddypress_register_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  51. <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
  52. <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
  53. </label>
  54. <label>
  55. <input type="radio" name="buddypress_register_button_style"
  56. value="icon" <?php if ($settings->get('buddypress_register_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  57. <span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
  58. <img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
  59. </label><br>
  60. </fieldset>
  61. </td>
  62. </tr>
  63. <tr>
  64. <th scope="row"><?php _e('Register layout', 'nextend-facebook-connect'); ?></th>
  65. <td>
  66. <fieldset>
  67. <label>
  68. <input type="radio" name="buddypress_register_form_layout"
  69. value="default" <?php if ($settings->get('buddypress_register_form_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  70. <span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
  71. <img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
  72. </label>
  73. <label>
  74. <input type="radio" name="buddypress_register_form_layout"
  75. value="below" <?php if ($settings->get('buddypress_register_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  76. <span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
  77. <img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
  78. </label>
  79. <label>
  80. <input type="radio" name="buddypress_register_form_layout"
  81. value="below-separator" <?php if ($settings->get('buddypress_register_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  82. <span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
  83. <img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
  84. </label>
  85. <label>
  86. <input type="radio" name="buddypress_register_form_layout"
  87. value="above" <?php if ($settings->get('buddypress_register_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  88. <span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
  89. <img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
  90. </label>
  91. <label>
  92. <input type="radio" name="buddypress_register_form_layout"
  93. value="above-separator" <?php if ($settings->get('buddypress_register_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  94. <span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
  95. <img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
  96. </label><br>
  97. </fieldset>
  98. </td>
  99. </tr>
  100. <tr>
  101. <th scope="row"><?php _e('Sidebar Login form', 'nextend-facebook-connect'); ?></th>
  102. <td>
  103. <fieldset>
  104. <label><input type="radio" name="buddypress_sidebar_login"
  105. value="" <?php if ($settings->get('buddypress_sidebar_login') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  106. <span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
  107. <label><input type="radio" name="buddypress_sidebar_login"
  108. value="show" <?php if ($settings->get('buddypress_sidebar_login') == 'show') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  109. <span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
  110. <p class="description" id="tagline-buddypress_sidebar_login"><?php _e('Some themes that use BuddyPress, display the social buttons twice in the same login form. This option can disable the one for: <b>bp_sidebar_login_form action</b>. ', 'nextend-facebook-connect'); ?></p>
  111. </fieldset>
  112. </td>
  113. </tr>
  114. <tr>
  115. <th scope="row"><?php _e('Login form', 'nextend-facebook-connect'); ?></th>
  116. <td>
  117. <fieldset>
  118. <label><input type="radio" name="buddypress_login"
  119. value="" <?php if ($settings->get('buddypress_login') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  120. <span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
  121. <label><input type="radio" name="buddypress_login"
  122. value="show" <?php if ($settings->get('buddypress_login') == 'show') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  123. <span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
  124. </fieldset>
  125. </td>
  126. </tr>
  127. <tr>
  128. <th scope="row"><?php _e('Login button style', 'nextend-facebook-connect'); ?></th>
  129. <td>
  130. <fieldset>
  131. <label>
  132. <input type="radio" name="buddypress_login_button_style"
  133. value="default" <?php if ($settings->get('buddypress_login_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  134. <span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
  135. <img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
  136. </label>
  137. <label>
  138. <input type="radio" name="buddypress_login_button_style"
  139. value="fullwidth" <?php if ($settings->get('buddypress_login_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  140. <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
  141. <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
  142. </label>
  143. <label>
  144. <input type="radio" name="buddypress_login_button_style"
  145. value="icon" <?php if ($settings->get('buddypress_login_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  146. <span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
  147. <img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
  148. </label><br>
  149. </fieldset>
  150. </td>
  151. </tr>
  152. <tr>
  153. <th scope="row"><?php _e('Login layout', 'nextend-facebook-connect'); ?></th>
  154. <td>
  155. <fieldset>
  156. <label>
  157. <input type="radio" name="buddypress_login_form_layout"
  158. value="default" <?php if ($settings->get('buddypress_login_form_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  159. <span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
  160. <img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
  161. </label>
  162. <label>
  163. <input type="radio" name="buddypress_login_form_layout"
  164. value="below" <?php if ($settings->get('buddypress_login_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  165. <span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
  166. <img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
  167. </label>
  168. <label>
  169. <input type="radio" name="buddypress_login_form_layout"
  170. value="below-separator" <?php if ($settings->get('buddypress_login_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  171. <span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
  172. <img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
  173. </label>
  174. <label>
  175. <input type="radio" name="buddypress_login_form_layout"
  176. value="above" <?php if ($settings->get('buddypress_login_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  177. <span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
  178. <img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
  179. </label>
  180. <label>
  181. <input type="radio" name="buddypress_login_form_layout"
  182. value="above-separator" <?php if ($settings->get('buddypress_login_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  183. <span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
  184. <img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
  185. </label><br>
  186. </fieldset>
  187. </td>
  188. </tr>
  189. <tr>
  190. <th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
  191. <td>
  192. <fieldset>
  193. <label><input type="radio" name="buddypress_register_button_align"
  194. value="left" <?php if ($settings->get('buddypress_register_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  195. <span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
  196. <label><input type="radio" name="buddypress_register_button_align"
  197. value="center" <?php if ($settings->get('buddypress_register_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  198. <span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
  199. <label><input type="radio" name="buddypress_register_button_align"
  200. value="right" <?php if ($settings->get('buddypress_register_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
  201. <span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
  202. </fieldset>
  203. </td>
  204. </tr>
  205. </tbody>
  206. </table>
  207. <?php if ($isPRO): ?>
  208. <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
  209. value="<?php _e('Save Changes'); ?>"></p>
  210. <?php endif; ?>