[ 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                                          /* translators: %s: level of visibility */
 191                                          __( 'This field can be seen by: %s', 'buddypress' ),
 192                                          '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>'
 193                                      );
 194                                      ?>
 195                                      </span>
 196                                      <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>
 197                                  </p>
 198  
 199                                  <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
 200                                      <fieldset>
 201                                          <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
 202  
 203                                          <?php bp_profile_visibility_radio_buttons() ?>
 204  
 205                                      </fieldset>
 206                                      <button type="button" class="field-visibility-settings-close"><?php _e( 'Close', 'buddypress' ) ?></button>
 207  
 208                                  </div>
 209                              <?php else : ?>
 210                                  <p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
 211                                      <?php
 212                                      printf(
 213                                          __( 'This field can be seen by: %s', 'buddypress' ),
 214                                          '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>'
 215                                      );
 216                                      ?>
 217                                  </p>
 218                              <?php endif ?>
 219  
 220                              <?php
 221  
 222                              /**
 223                               * Fires after the display of the visibility options for xprofile fields.
 224                               *
 225                               * @since 1.1.0
 226                               */
 227                              do_action( 'bp_custom_profile_edit_fields' ); ?>
 228  
 229                              </fieldset>
 230                          </div>
 231  
 232                      <?php endwhile; ?>
 233  
 234                      <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_field_ids(); ?>" />
 235  
 236                      <?php endwhile; endif; endif; ?>
 237  
 238                      <?php
 239  
 240                      /**
 241                       * Fires and displays any extra member registration xprofile fields.
 242                       *
 243                       * @since 1.9.0
 244                       */
 245                      do_action( 'bp_signup_profile_fields' ); ?>
 246  
 247                  </div><!-- #profile-details-section -->
 248  
 249                  <?php
 250  
 251                  /**
 252                   * Fires after the display of member registration xprofile fields.
 253                   *
 254                   * @since 1.1.0
 255                   */
 256                  do_action( 'bp_after_signup_profile_fields' ); ?>
 257  
 258              <?php endif; ?>
 259  
 260              <?php if ( bp_get_blog_signup_allowed() ) : ?>
 261  
 262                  <?php
 263  
 264                  /**
 265                   * Fires before the display of member registration blog details fields.
 266                   *
 267                   * @since 1.1.0
 268                   */
 269                  do_action( 'bp_before_blog_details_fields' ); ?>
 270  
 271                  <?php /***** Blog Creation Details ******/ ?>
 272  
 273                  <div class="register-section" id="blog-details-section">
 274  
 275                      <h2><?php _e( 'Blog Details', 'buddypress' ); ?></h2>
 276  
 277                      <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>
 278  
 279                      <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
 280  
 281                          <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
 282                          <?php
 283  
 284                          /**
 285                           * Fires and displays any member registration blog URL errors.
 286                           *
 287                           * @since 1.1.0
 288                           */
 289                          do_action( 'bp_signup_blog_url_errors' ); ?>
 290  
 291                          <?php if ( is_subdomain_install() ) : ?>
 292                              http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_signup_subdomain_base(); ?>
 293                          <?php else : ?>
 294                              <?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
 295                          <?php endif; ?>
 296  
 297                          <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
 298                          <?php
 299  
 300                          /**
 301                           * Fires and displays any member registration blog title errors.
 302                           *
 303                           * @since 1.1.0
 304                           */
 305                          do_action( 'bp_signup_blog_title_errors' ); ?>
 306                          <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value(); ?>" />
 307  
 308                          <fieldset class="register-site">
 309                              <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>
 310                              <?php
 311  
 312                              /**
 313                               * Fires and displays any member registration blog privacy errors.
 314                               *
 315                               * @since 1.1.0
 316                               */
 317                              do_action( 'bp_signup_blog_privacy_errors' ); ?>
 318  
 319                              <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>
 320                              <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>
 321                          </fieldset>
 322  
 323                          <?php
 324  
 325                          /**
 326                           * Fires and displays any extra member registration blog details fields.
 327                           *
 328                           * @since 1.9.0
 329                           */
 330                          do_action( 'bp_blog_details_fields' ); ?>
 331  
 332                      </div>
 333  
 334                  </div><!-- #blog-details-section -->
 335  
 336                  <?php
 337  
 338                  /**
 339                   * Fires after the display of member registration blog details fields.
 340                   *
 341                   * @since 1.1.0
 342                   */
 343                  do_action( 'bp_after_blog_details_fields' ); ?>
 344  
 345              <?php endif; ?>
 346  
 347              <?php
 348  
 349              /**
 350               * Fires before the display of the registration submit buttons.
 351               *
 352               * @since 1.1.0
 353               */
 354              do_action( 'bp_before_registration_submit_buttons' ); ?>
 355  
 356              <div class="submit">
 357                  <input type="submit" name="signup_submit" id="signup_submit" value="<?php esc_attr_e( 'Complete Sign Up', 'buddypress' ); ?>" />
 358              </div>
 359  
 360              <?php
 361  
 362              /**
 363               * Fires after the display of the registration submit buttons.
 364               *
 365               * @since 1.1.0
 366               */
 367              do_action( 'bp_after_registration_submit_buttons' ); ?>
 368  
 369              <?php wp_nonce_field( 'bp_new_signup' ); ?>
 370  
 371          <?php endif; // request-details signup step ?>
 372  
 373          <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
 374  
 375              <div id="template-notices" role="alert" aria-atomic="true">
 376                  <?php
 377  
 378                  /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
 379                  do_action( 'template_notices' ); ?>
 380  
 381              </div>
 382  
 383              <?php
 384  
 385              /**
 386               * Fires before the display of the registration confirmed messages.
 387               *
 388               * @since 1.5.0
 389               */
 390              do_action( 'bp_before_registration_confirmed' ); ?>
 391  
 392              <div id="template-notices" role="alert" aria-atomic="true">
 393                  <?php if ( bp_registration_needs_activation() ) : ?>
 394                      <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>
 395                  <?php else : ?>
 396                      <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ); ?></p>
 397                  <?php endif; ?>
 398              </div>
 399  
 400              <?php
 401  
 402              /**
 403               * Fires after the display of the registration confirmed messages.
 404               *
 405               * @since 1.5.0
 406               */
 407              do_action( 'bp_after_registration_confirmed' ); ?>
 408  
 409          <?php endif; // completed-confirmation signup step ?>
 410  
 411          <?php
 412  
 413          /**
 414           * Fires and displays any custom signup steps.
 415           *
 416           * @since 1.1.0
 417           */
 418          do_action( 'bp_custom_signup_steps' ); ?>
 419  
 420          </form>
 421  
 422      </div>
 423  
 424      <?php
 425  
 426      /**
 427       * Fires at the bottom of the BuddyPress member registration page template.
 428       *
 429       * @since 1.1.0
 430       */
 431      do_action( 'bp_after_register_page' ); ?>
 432  
 433  </div><!-- #buddypress -->


Generated: Fri Jul 10 01:01:36 2020 Cross-referenced by PHPXref 0.7.1