/bp-templates/bp-legacy/buddypress/members/single/profile/edit.php

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