[ 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( bp_xprofile_signup_args() ) ) : 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              if ( bp_get_membership_requests_required() ) {
 357                  $button_text = __( 'Submit Request', 'buddypress' );
 358              } else {
 359                  $button_text = __( 'Complete Sign Up', 'buddypress' );
 360              }
 361              ?>
 362  
 363              <div class="submit">
 364                  <input type="submit" name="signup_submit" id="signup_submit" value="<?php echo esc_attr( $button_text ); ?>" />
 365              </div>
 366  
 367              <?php
 368  
 369              /**
 370               * Fires after the display of the registration submit buttons.
 371               *
 372               * @since 1.1.0
 373               */
 374              do_action( 'bp_after_registration_submit_buttons' ); ?>
 375  
 376              <?php wp_nonce_field( 'bp_new_signup' ); ?>
 377  
 378          <?php endif; // request-details signup step ?>
 379  
 380          <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
 381  
 382              <div id="template-notices" role="alert" aria-atomic="true">
 383                  <?php
 384  
 385                  /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
 386                  do_action( 'template_notices' ); ?>
 387  
 388              </div>
 389  
 390              <?php
 391  
 392              /**
 393               * Fires before the display of the registration confirmed messages.
 394               *
 395               * @since 1.5.0
 396               */
 397              do_action( 'bp_before_registration_confirmed' ); ?>
 398  
 399              <div id="template-notices" role="alert" aria-atomic="true">
 400                  <?php if ( bp_get_membership_requests_required() ) : ?>
 401                      <p><?php _e( 'You have successfully submitted your membership request! Our site moderators will review your submission and send you an activation email if your request is approved.', 'buddypress' ); ?></p>
 402                  <?php elseif ( bp_registration_needs_activation() ) : ?>
 403                      <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>
 404                  <?php else : ?>
 405                      <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ); ?></p>
 406                  <?php endif; ?>
 407              </div>
 408  
 409              <?php
 410  
 411              /**
 412               * Fires after the display of the registration confirmed messages.
 413               *
 414               * @since 1.5.0
 415               */
 416              do_action( 'bp_after_registration_confirmed' ); ?>
 417  
 418          <?php endif; // completed-confirmation signup step ?>
 419  
 420          <?php
 421  
 422          /**
 423           * Fires and displays any custom signup steps.
 424           *
 425           * @since 1.1.0
 426           */
 427          do_action( 'bp_custom_signup_steps' ); ?>
 428  
 429          </form>
 430  
 431      </div>
 432  
 433      <?php
 434  
 435      /**
 436       * Fires at the bottom of the BuddyPress member registration page template.
 437       *
 438       * @since 1.1.0
 439       */
 440      do_action( 'bp_after_register_page' ); ?>
 441  
 442  </div><!-- #buddypress -->


Generated: Thu Apr 25 01:01:12 2024 Cross-referenced by PHPXref 0.7.1