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


Generated: Fri Apr 19 01:01:08 2024 Cross-referenced by PHPXref 0.7.1