[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/members/single/profile/ -> edit.php (source)

   1  <?php
   2  /**
   3   * BuddyPress - Members Single Profile Edit
   4   *
   5   * @package BuddyPress
   6   * @subpackage bp-legacy
   7   * @version 3.0.0
   8   */
   9  
  10  /**
  11   * Fires after the display of member profile edit content.
  12   *
  13   * @since 1.1.0
  14   */
  15  do_action( 'bp_before_profile_edit_content' );
  16  
  17  if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) :
  18      while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
  19  
  20  <form action="<?php bp_the_profile_group_edit_form_action(); ?>" method="post" id="profile-edit-form" class="standard-form <?php bp_the_profile_group_slug(); ?>">
  21  
  22      <?php
  23  
  24          /** This action is documented in bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php */
  25          do_action( 'bp_before_profile_field_content' ); ?>
  26  
  27          <h2><?php printf( __( "Editing '%s' Profile Group", 'buddypress' ), bp_get_the_profile_group_name() ); ?></h2>
  28  
  29          <?php if ( bp_profile_has_multiple_groups() ) : ?>
  30              <ul class="button-nav" aria-label="<?php esc_attr_e( 'Profile field groups', 'buddypress' ); ?>" role="navigation">
  31  
  32                  <?php bp_profile_group_tabs(); ?>
  33  
  34              </ul>
  35          <?php endif ;?>
  36  
  37          <div class="clear"></div>
  38  
  39          <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
  40  
  41              <div<?php bp_field_css_class( 'editfield' ); ?>>
  42                  <fieldset>
  43  
  44                  <?php
  45                  $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
  46                  $field_type->edit_field_html();
  47  
  48                  /**
  49                   * Fires before the display of visibility options for the field.
  50                   *
  51                   * @since 1.7.0
  52                   */
  53                  do_action( 'bp_custom_profile_edit_fields_pre_visibility' );
  54                  ?>
  55  
  56                  <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
  57                      <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">
  58                          <?php
  59                          printf(
  60                              __( 'This field can be seen by: %s', 'buddypress' ),
  61                              '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>'
  62                          );
  63                          ?>
  64                          </span>
  65                          <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>
  66                      </p>
  67  
  68                      <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
  69                          <fieldset>
  70                              <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
  71  
  72                              <?php bp_profile_visibility_radio_buttons() ?>
  73  
  74                          </fieldset>
  75                          <button type="button" class="field-visibility-settings-close"><?php _e( 'Close', 'buddypress' ) ?></button>
  76                      </div>
  77                  <?php else : ?>
  78                      <div class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
  79                          <?php
  80                          printf(
  81                              __( 'This field can be seen by: %s', 'buddypress' ),
  82                              '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>'
  83                          );
  84                          ?>
  85                      </div>
  86                  <?php endif ?>
  87  
  88                  <?php
  89  
  90                  /**
  91                   * Fires after the visibility options for a field.
  92                   *
  93                   * @since 1.1.0
  94                   */
  95                  do_action( 'bp_custom_profile_edit_fields' ); ?>
  96  
  97                  </fieldset>
  98              </div>
  99  
 100          <?php endwhile; ?>
 101  
 102      <?php
 103  
 104      /** This action is documented in bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php */
 105      do_action( 'bp_after_profile_field_content' ); ?>
 106  
 107      <div class="submit">
 108          <input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?> " />
 109      </div>
 110  
 111      <input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_field_ids(); ?>" />
 112  
 113      <?php wp_nonce_field( 'bp_xprofile_edit' ); ?>
 114  
 115  </form>
 116  
 117  <?php endwhile; endif; ?>
 118  
 119  <?php
 120  
 121  /**
 122   * Fires after the display of member profile edit content.
 123   *
 124   * @since 1.1.0
 125   */
 126  do_action( 'bp_after_profile_edit_content' );


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