/bp-templates/bp-legacy/buddypress/members/register.php

  1. <?php 
  2. /** 
  3. * BuddyPress - Members Register 
  4. * 
  5. * @package BuddyPress 
  6. * @subpackage bp-legacy 
  7. */ 
  8.  
  9. ?> 
  10.  
  11. <div id="buddypress"> 
  12.  
  13. <?php 
  14.  
  15. /** 
  16. * Fires at the top of the BuddyPress member registration page template. 
  17. * 
  18. * @since 1.1.0 
  19. */ 
  20. do_action( 'bp_before_register_page' ); ?> 
  21.  
  22. <div class="page" id="register-page"> 
  23.  
  24. <form action="" name="signup_form" id="signup_form" class="standard-form" method="post" enctype="multipart/form-data"> 
  25.  
  26. <?php if ( 'registration-disabled' == bp_get_current_signup_step() ) : ?> 
  27.  
  28. <div id="template-notices" role="alert" aria-atomic="true"> 
  29. <?php 
  30.  
  31. /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */ 
  32. do_action( 'template_notices' ); ?> 
  33.  
  34. </div> 
  35.  
  36. <?php 
  37.  
  38. /** 
  39. * Fires before the display of the registration disabled message. 
  40. * 
  41. * @since 1.5.0 
  42. */ 
  43. do_action( 'bp_before_registration_disabled' ); ?> 
  44.  
  45. <p><?php _e( 'User registration is currently not allowed.', 'buddypress' ); ?></p> 
  46.  
  47. <?php 
  48.  
  49. /** 
  50. * Fires after the display of the registration disabled message. 
  51. * 
  52. * @since 1.5.0 
  53. */ 
  54. do_action( 'bp_after_registration_disabled' ); ?> 
  55. <?php endif; // registration-disabled signup step ?> 
  56.  
  57. <?php if ( 'request-details' == bp_get_current_signup_step() ) : ?> 
  58.  
  59. <div id="template-notices" role="alert" aria-atomic="true"> 
  60. <?php 
  61.  
  62. /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */ 
  63. do_action( 'template_notices' ); ?> 
  64.  
  65. </div> 
  66.  
  67. <p><?php _e( 'Registering for this site is easy. Just fill in the fields below, and we\'ll get a new account set up for you in no time.', 'buddypress' ); ?></p> 
  68.  
  69. <?php 
  70.  
  71. /** 
  72. * Fires before the display of member registration account details fields. 
  73. * 
  74. * @since 1.1.0 
  75. */ 
  76. do_action( 'bp_before_account_details_fields' ); ?> 
  77.  
  78. <div class="register-section" id="basic-details-section"> 
  79.  
  80. <?php /***** Basic Account Details ******/ ?> 
  81.  
  82. <h2><?php _e( 'Account Details', 'buddypress' ); ?></h2> 
  83.  
  84. <label for="signup_username"><?php _e( 'Username', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  85. <?php 
  86.  
  87. /** 
  88. * Fires and displays any member registration username errors. 
  89. * 
  90. * @since 1.1.0 
  91. */ 
  92. do_action( 'bp_signup_username_errors' ); ?> 
  93. <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value(); ?>" <?php bp_form_field_attributes( 'username' ); ?>/> 
  94.  
  95. <label for="signup_email"><?php _e( 'Email Address', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  96. <?php 
  97.  
  98. /** 
  99. * Fires and displays any member registration email errors. 
  100. * 
  101. * @since 1.1.0 
  102. */ 
  103. do_action( 'bp_signup_email_errors' ); ?> 
  104. <input type="email" name="signup_email" id="signup_email" value="<?php bp_signup_email_value(); ?>" <?php bp_form_field_attributes( 'email' ); ?>/> 
  105.  
  106. <label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  107. <?php 
  108.  
  109. /** 
  110. * Fires and displays any member registration password errors. 
  111. * 
  112. * @since 1.1.0 
  113. */ 
  114. do_action( 'bp_signup_password_errors' ); ?> 
  115. <input type="password" name="signup_password" id="signup_password" value="" class="password-entry" <?php bp_form_field_attributes( 'password' ); ?>/> 
  116. <div id="pass-strength-result"></div> 
  117.  
  118. <label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  119. <?php 
  120.  
  121. /** 
  122. * Fires and displays any member registration password confirmation errors. 
  123. * 
  124. * @since 1.1.0 
  125. */ 
  126. do_action( 'bp_signup_password_confirm_errors' ); ?> 
  127. <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" class="password-entry-confirm" <?php bp_form_field_attributes( 'password' ); ?>/> 
  128.  
  129. <?php 
  130.  
  131. /** 
  132. * Fires and displays any extra member registration details fields. 
  133. * 
  134. * @since 1.9.0 
  135. */ 
  136. do_action( 'bp_account_details_fields' ); ?> 
  137.  
  138. </div><!-- #basic-details-section --> 
  139.  
  140. <?php 
  141.  
  142. /** 
  143. * Fires after the display of member registration account details fields. 
  144. * 
  145. * @since 1.1.0 
  146. */ 
  147. do_action( 'bp_after_account_details_fields' ); ?> 
  148.  
  149. <?php /***** Extra Profile Details ******/ ?> 
  150.  
  151. <?php if ( bp_is_active( 'xprofile' ) ) : ?> 
  152.  
  153. <?php 
  154.  
  155. /** 
  156. * Fires before the display of member registration xprofile fields. 
  157. * 
  158. * @since 1.2.4 
  159. */ 
  160. do_action( 'bp_before_signup_profile_fields' ); ?> 
  161.  
  162. <div class="register-section" id="profile-details-section"> 
  163.  
  164. <h2><?php _e( 'Profile Details', 'buddypress' ); ?></h2> 
  165.  
  166. <?php /** Use the profile field loop to render input fields for the 'base' profile field group */ ?> 
  167. <?php if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( array( 'profile_group_id' => 1, 'fetch_field_data' => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?> 
  168.  
  169. <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> 
  170.  
  171. <div<?php bp_field_css_class( 'editfield' ); ?>> 
  172.  
  173. <?php 
  174. $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() ); 
  175. $field_type->edit_field_html(); 
  176.  
  177. /** 
  178. * Fires before the display of the visibility options for xprofile fields. 
  179. * 
  180. * @since 1.7.0 
  181. */ 
  182. do_action( 'bp_custom_profile_edit_fields_pre_visibility' ); 
  183.  
  184. if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?> 
  185. <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> 
  186. <?php 
  187. printf( 
  188. __( 'This field can be seen by: %s', 'buddypress' ),  
  189. '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>' 
  190. ); 
  191. ?> 
  192. <button type="button" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></button> 
  193. </p> 
  194.  
  195. <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>"> 
  196. <fieldset> 
  197. <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend> 
  198.  
  199. <?php bp_profile_visibility_radio_buttons() ?> 
  200.  
  201. </fieldset> 
  202. <button type="button" class="field-visibility-settings-close"><?php _e( 'Close', 'buddypress' ) ?></button> 
  203.  
  204. </div> 
  205. <?php else : ?> 
  206. <p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> 
  207. <?php 
  208. printf( 
  209. __( 'This field can be seen by: %s', 'buddypress' ),  
  210. '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>' 
  211. ); 
  212. ?> 
  213. </p> 
  214. <?php endif ?> 
  215.  
  216. <?php 
  217.  
  218. /** 
  219. * Fires after the display of the visibility options for xprofile fields. 
  220. * 
  221. * @since 1.1.0 
  222. */ 
  223. do_action( 'bp_custom_profile_edit_fields' ); ?> 
  224.  
  225. <p class="description"><?php bp_the_profile_field_description(); ?></p> 
  226.  
  227. </div> 
  228.  
  229. <?php endwhile; ?> 
  230.  
  231. <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_field_ids(); ?>" /> 
  232.  
  233. <?php endwhile; endif; endif; ?> 
  234.  
  235. <?php 
  236.  
  237. /** 
  238. * Fires and displays any extra member registration xprofile fields. 
  239. * 
  240. * @since 1.9.0 
  241. */ 
  242. do_action( 'bp_signup_profile_fields' ); ?> 
  243.  
  244. </div><!-- #profile-details-section --> 
  245.  
  246. <?php 
  247.  
  248. /** 
  249. * Fires after the display of member registration xprofile fields. 
  250. * 
  251. * @since 1.1.0 
  252. */ 
  253. do_action( 'bp_after_signup_profile_fields' ); ?> 
  254.  
  255. <?php endif; ?> 
  256.  
  257. <?php if ( bp_get_blog_signup_allowed() ) : ?> 
  258.  
  259. <?php 
  260.  
  261. /** 
  262. * Fires before the display of member registration blog details fields. 
  263. * 
  264. * @since 1.1.0 
  265. */ 
  266. do_action( 'bp_before_blog_details_fields' ); ?> 
  267.  
  268. <?php /***** Blog Creation Details ******/ ?> 
  269.  
  270. <div class="register-section" id="blog-details-section"> 
  271.  
  272. <h2><?php _e( 'Blog Details', 'buddypress' ); ?></h2> 
  273.  
  274. <p><label for="signup_with_blog"><input type="checkbox" name="signup_with_blog" id="signup_with_blog" value="1"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes, I\'d like to create a new site', 'buddypress' ); ?></label></p> 
  275.  
  276. <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>> 
  277.  
  278. <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  279. <?php 
  280.  
  281. /** 
  282. * Fires and displays any member registration blog URL errors. 
  283. * 
  284. * @since 1.1.0 
  285. */ 
  286. do_action( 'bp_signup_blog_url_errors' ); ?> 
  287.  
  288. <?php if ( is_subdomain_install() ) : ?> 
  289. http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_signup_subdomain_base(); ?> 
  290. <?php else : ?> 
  291. <?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> 
  292. <?php endif; ?> 
  293.  
  294. <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  295. <?php 
  296.  
  297. /** 
  298. * Fires and displays any member registration blog title errors. 
  299. * 
  300. * @since 1.1.0 
  301. */ 
  302. do_action( 'bp_signup_blog_title_errors' ); ?> 
  303. <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value(); ?>" /> 
  304.  
  305. <fieldset class="register-site"> 
  306. <legend class="label"><?php _e( 'Privacy: I would like my site to appear in search engines, and in public listings around this network.', 'buddypress' ); ?></legend> 
  307. <?php 
  308.  
  309. /** 
  310. * Fires and displays any member registration blog privacy errors. 
  311. * 
  312. * @since 1.1.0 
  313. */ 
  314. do_action( 'bp_signup_blog_privacy_errors' ); ?> 
  315.  
  316. <label for="signup_blog_privacy_public"><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_public" value="public"<?php if ( 'public' == bp_get_signup_blog_privacy_value() || !bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes', 'buddypress' ); ?></label> 
  317. <label for="signup_blog_privacy_private"><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_private" value="private"<?php if ( 'private' == bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'No', 'buddypress' ); ?></label> 
  318. </fieldset> 
  319.  
  320. <?php 
  321.  
  322. /** 
  323. * Fires and displays any extra member registration blog details fields. 
  324. * 
  325. * @since 1.9.0 
  326. */ 
  327. do_action( 'bp_blog_details_fields' ); ?> 
  328.  
  329. </div> 
  330.  
  331. </div><!-- #blog-details-section --> 
  332.  
  333. <?php 
  334.  
  335. /** 
  336. * Fires after the display of member registration blog details fields. 
  337. * 
  338. * @since 1.1.0 
  339. */ 
  340. do_action( 'bp_after_blog_details_fields' ); ?> 
  341.  
  342. <?php endif; ?> 
  343.  
  344. <?php 
  345.  
  346. /** 
  347. * Fires before the display of the registration submit buttons. 
  348. * 
  349. * @since 1.1.0 
  350. */ 
  351. do_action( 'bp_before_registration_submit_buttons' ); ?> 
  352.  
  353. <div class="submit"> 
  354. <input type="submit" name="signup_submit" id="signup_submit" value="<?php esc_attr_e( 'Complete Sign Up', 'buddypress' ); ?>" /> 
  355. </div> 
  356.  
  357. <?php 
  358.  
  359. /** 
  360. * Fires after the display of the registration submit buttons. 
  361. * 
  362. * @since 1.1.0 
  363. */ 
  364. do_action( 'bp_after_registration_submit_buttons' ); ?> 
  365.  
  366. <?php wp_nonce_field( 'bp_new_signup' ); ?> 
  367.  
  368. <?php endif; // request-details signup step ?> 
  369.  
  370. <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?> 
  371.  
  372. <div id="template-notices" role="alert" aria-atomic="true"> 
  373. <?php 
  374.  
  375. /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */ 
  376. do_action( 'template_notices' ); ?> 
  377.  
  378. </div> 
  379.  
  380. <?php 
  381.  
  382. /** 
  383. * Fires before the display of the registration confirmed messages. 
  384. * 
  385. * @since 1.5.0 
  386. */ 
  387. do_action( 'bp_before_registration_confirmed' ); ?> 
  388.  
  389. <div id="template-notices" role="alert" aria-atomic="true"> 
  390. <?php if ( bp_registration_needs_activation() ) : ?> 
  391. <p><?php _e( 'You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.', 'buddypress' ); ?></p> 
  392. <?php else : ?> 
  393. <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ); ?></p> 
  394. <?php endif; ?> 
  395. </div> 
  396.  
  397. <?php 
  398.  
  399. /** 
  400. * Fires after the display of the registration confirmed messages. 
  401. * 
  402. * @since 1.5.0 
  403. */ 
  404. do_action( 'bp_after_registration_confirmed' ); ?> 
  405.  
  406. <?php endif; // completed-confirmation signup step ?> 
  407.  
  408. <?php 
  409.  
  410. /** 
  411. * Fires and displays any custom signup steps. 
  412. * 
  413. * @since 1.1.0 
  414. */ 
  415. do_action( 'bp_custom_signup_steps' ); ?> 
  416.  
  417. </form> 
  418.  
  419. </div> 
  420.  
  421. <?php 
  422.  
  423. /** 
  424. * Fires at the bottom of the BuddyPress member registration page template. 
  425. * 
  426. * @since 1.1.0 
  427. */ 
  428. do_action( 'bp_after_register_page' ); ?> 
  429.  
  430. </div><!-- #buddypress --> 
.