[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/members/ -> register.php (source)

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


Generated: Tue Dec 10 01:01:39 2019 Cross-referenced by PHPXref 0.7.1