Advertisement
PhoTonFlinger

Untitled

Nov 29th, 2018
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 9.62 KB | None | 0 0
  1. <?php get_header( 'buddypress' ); ?>
  2.  
  3. <div id="container">
  4.  
  5.  
  6.     <div id="content">
  7.  
  8.     <div id="buddypress">
  9.  
  10.     <div class="page-title"><?php _e('Create an account', 'onecommunity'); ?></div>
  11.  
  12.         <?php do_action( 'bp_before_register_page' ); ?>
  13.  
  14.     <div class="page" id="register-page">
  15.  
  16.         <form action="" name="signup_form" id="signup_form" class="standard-form" method="post" enctype="multipart/form-data">
  17.  
  18.         <?php if ( 'registration-disabled' == bp_get_current_signup_step() ) : ?>
  19.             <?php do_action( 'template_notices' ); ?>
  20.             <?php do_action( 'bp_before_registration_disabled' ); ?>
  21.  
  22.                 <p><?php _e( 'User registration is currently not allowed.', 'buddypress' ); ?></p>
  23.  
  24.             <?php do_action( 'bp_after_registration_disabled' ); ?>
  25.         <?php endif; // registration-disabled signup setp ?>
  26.  
  27.         <?php if ( 'request-details' == bp_get_current_signup_step() ) : ?>
  28.  
  29.             <?php do_action( 'template_notices' ); ?>
  30.  
  31.             <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>
  32.  
  33.             <?php do_action( 'bp_before_account_details_fields' ); ?>
  34.  
  35.             <div class="register-section" id="basic-details-section">
  36.  
  37.                 <?php /***** Basic Account Details ******/ ?>
  38.  
  39.                 <h4><?php _e( 'Account Details', 'buddypress' ); ?></h4>
  40.  
  41.                 <label for="signup_username"><?php _e( 'Username', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  42.                 <?php do_action( 'bp_signup_username_errors' ); ?>
  43.                 <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value(); ?>" />
  44.  
  45.                 <label for="signup_email"><?php _e( 'Email Address', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  46.                 <?php do_action( 'bp_signup_email_errors' ); ?>
  47.                 <input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value(); ?>" />
  48.  
  49.                 <label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  50.                 <?php do_action( 'bp_signup_password_errors' ); ?>
  51.                 <input type="password" name="signup_password" id="signup_password" value="" class="password-entry" />
  52.                 <div id="pass-strength-result"></div>
  53.  
  54.                 <label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  55.                 <?php do_action( 'bp_signup_password_confirm_errors' ); ?>
  56.                 <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" class="password-entry-confirm" />
  57.  
  58.                 <?php do_action( 'bp_account_details_fields' ); ?>
  59.  
  60.             </div><!-- #basic-details-section -->
  61.  
  62.             <?php do_action( 'bp_after_account_details_fields' ); ?>
  63.  
  64.             <?php /***** Extra Profile Details ******/ ?>
  65.  
  66.             <?php if ( bp_is_active( 'xprofile' ) ) : ?>
  67.  
  68.                 <?php do_action( 'bp_before_signup_profile_fields' ); ?>
  69.  
  70.                 <div class="register-section" id="profile-details-section">
  71.  
  72.                     <h4><?php _e( 'Profile Details', 'buddypress' ); ?></h4>
  73.  
  74.                     <?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
  75.                     <?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(); ?>
  76.  
  77.                     <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
  78.  
  79.                         <div<?php bp_field_css_class( 'editfield' ); ?>>
  80.  
  81.                             <?php
  82.                             $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
  83.                             $field_type->edit_field_html();
  84.  
  85.                             do_action( 'bp_custom_profile_edit_fields_pre_visibility' );
  86.  
  87.                             if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
  88.                                 <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
  89.                                     <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></a>
  90.                                 </p>
  91.  
  92.                                 <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
  93.                                     <fieldset>
  94.                                         <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
  95.  
  96.                                         <?php bp_profile_visibility_radio_buttons() ?>
  97.  
  98.                                     </fieldset>
  99.                                     <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
  100.  
  101.                                 </div>
  102.                             <?php else : ?>
  103.                                 <p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
  104.                                     <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
  105.                                 </p>
  106.                             <?php endif ?>
  107.  
  108.                             <?php do_action( 'bp_custom_profile_edit_fields' ); ?>
  109.  
  110.                             <p class="description"><?php bp_the_profile_field_description(); ?></p>
  111.  
  112.                         </div>
  113.  
  114.                     <?php endwhile; ?>
  115.  
  116.                     <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_field_ids(); ?>" />
  117.  
  118.                     <?php endwhile; endif; endif; ?>
  119.  
  120.                     <?php do_action( 'bp_signup_profile_fields' ); ?>
  121.  
  122.                 </div><!-- #profile-details-section -->
  123.  
  124.                 <?php do_action( 'bp_after_signup_profile_fields' ); ?>
  125.  
  126.             <?php endif; ?>
  127.  
  128.             <?php if ( bp_get_blog_signup_allowed() ) : ?>
  129.  
  130.                 <?php do_action( 'bp_before_blog_details_fields' ); ?>
  131.  
  132.                 <?php /***** Blog Creation Details ******/ ?>
  133.  
  134.                 <div class="register-section" id="blog-details-section">
  135.  
  136.                     <h4><?php _e( 'Blog Details', 'buddypress' ); ?></h4>
  137.  
  138.                     <p><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' ); ?></p>
  139.  
  140.                     <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
  141.  
  142.                         <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  143.                         <?php do_action( 'bp_signup_blog_url_errors' ); ?>
  144.  
  145.                         <?php if ( is_subdomain_install() ) : ?>
  146.                             http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_signup_subdomain_base(); ?>
  147.                         <?php else : ?>
  148.                             <?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
  149.                         <?php endif; ?>
  150.  
  151.                         <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  152.                         <?php do_action( 'bp_signup_blog_title_errors' ); ?>
  153.                         <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value(); ?>" />
  154.  
  155.                         <span class="label"><?php _e( 'I would like my site to appear in search engines, and in public listings around this network.', 'buddypress' ); ?></span>
  156.                         <?php do_action( 'bp_signup_blog_privacy_errors' ); ?>
  157.  
  158.                         <label><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>
  159.                         <label><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>
  160.  
  161.                         <?php do_action( 'bp_blog_details_fields' ); ?>
  162.  
  163.                     </div>
  164.  
  165.                 </div><!-- #blog-details-section -->
  166.  
  167.                 <?php do_action( 'bp_after_blog_details_fields' ); ?>
  168.  
  169.             <?php endif; ?>
  170.  
  171.             <?php do_action( 'bp_before_registration_submit_buttons' ); ?>
  172.  
  173.                 <div class="submit">
  174.                 <?php
  175.                 $registration_disable = get_theme_mod( 'DD_registration_disable', false );
  176.                 if ( $registration_disable == true ) { ?>
  177.                 <div id="signup_submit"><?php echo get_theme_mod( 'DD_registration_disable_title', 'Registration Disabled' ); ?></div>
  178.                 <?php } else { ?>
  179.                 <input type="submit" name="signup_submit" id="signup_submit" value="<?php _e( 'Complete Sign Up', 'buddypress' ); ?>" />
  180.                 <?php } ?>
  181.                 </div>
  182.  
  183.             <?php do_action( 'bp_after_registration_submit_buttons' ); ?>
  184.  
  185.             <?php wp_nonce_field( 'bp_new_signup' ); ?>
  186.  
  187.         <?php endif; // request-details signup step ?>
  188.  
  189.         <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
  190.  
  191.             <?php do_action( 'template_notices' ); ?>
  192.             <?php do_action( 'bp_before_registration_confirmed' ); ?>
  193.  
  194.             <?php if ( bp_registration_needs_activation() ) : ?>
  195.                 <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>
  196.             <?php else : ?>
  197.                 <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ); ?></p>
  198.             <?php endif; ?>
  199.  
  200.             <?php do_action( 'bp_after_registration_confirmed' ); ?>
  201.  
  202.         <?php endif; // completed-confirmation signup step ?>
  203.  
  204.         <?php do_action( 'bp_custom_signup_steps' ); ?>
  205.  
  206.         </form>
  207.  
  208.     </div>
  209.  
  210.     <?php do_action( 'bp_after_register_page' ); ?>
  211.  
  212. </div><!-- #buddypress -->
  213.  
  214. </div><!-- #content -->
  215.  
  216. </div> <!-- #container -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement