/bp-themes/bp-default/members/single/settings/delete-account.php

  1. <?php 
  2.  
  3. /** 
  4. * BuddyPress Delete Account 
  5. * 
  6. * @package BuddyPress 
  7. * @subpackage bp-default 
  8. */ 
  9. ?> 
  10.  
  11. <?php get_header( 'buddypress' ); ?> 
  12.  
  13. <div id="content"> 
  14. <div class="padder"> 
  15.  
  16. <?php do_action( 'bp_before_member_settings_template' ); ?> 
  17.  
  18. <div id="item-header"> 
  19.  
  20. <?php locate_template( array( 'members/single/member-header.php' ), true ); ?> 
  21.  
  22. </div><!-- #item-header --> 
  23.  
  24. <div id="item-nav"> 
  25. <div class="item-list-tabs no-ajax" id="object-nav" role="navigation"> 
  26. <ul> 
  27.  
  28. <?php bp_get_displayed_user_nav(); ?> 
  29.  
  30. <?php do_action( 'bp_member_options_nav' ); ?> 
  31.  
  32. </ul> 
  33. </div> 
  34. </div><!-- #item-nav --> 
  35.  
  36. <div id="item-body" role="main"> 
  37.  
  38. <?php do_action( 'bp_before_member_body' ); ?> 
  39.  
  40. <div class="item-list-tabs no-ajax" id="subnav"> 
  41. <ul> 
  42.  
  43. <?php bp_get_options_nav(); ?> 
  44.  
  45. <?php do_action( 'bp_member_plugin_options_nav' ); ?> 
  46.  
  47. </ul> 
  48. </div><!-- .item-list-tabs --> 
  49.  
  50. <h3><?php _e( 'Delete Account', 'buddypress' ); ?></h3> 
  51.  
  52. <div id="message" class="info"> 
  53.  
  54. <?php if ( bp_is_my_profile() ) : ?> 
  55.  
  56. <p><?php _e( 'Deleting your account will delete all of the content you have created. It will be completely irrecoverable.', 'buddypress' ); ?></p> 
  57.  
  58. <?php else : ?> 
  59.  
  60. <p><?php _e( 'Deleting this account will delete all of the content it has created. It will be completely irrecoverable.', 'buddypress' ); ?></p> 
  61.  
  62. <?php endif; ?> 
  63.  
  64. </div> 
  65.  
  66. <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/delete-account'; ?>" name="account-delete-form" id="account-delete-form" class="standard-form" method="post"> 
  67.  
  68. <?php do_action( 'bp_members_delete_account_before_submit' ); ?> 
  69.  
  70. <label> 
  71. <input type="checkbox" name="delete-account-understand" id="delete-account-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-account-button').disabled = ''; } else { document.getElementById('delete-account-button').disabled = 'disabled'; }" /> 
  72. <?php _e( 'I understand the consequences.', 'buddypress' ); ?> 
  73. </label> 
  74.  
  75. <div class="submit"> 
  76. <input type="submit" disabled="disabled" value="<?php esc_attr_e( 'Delete Account', 'buddypress' ); ?>" id="delete-account-button" name="delete-account-button" /> 
  77. </div> 
  78.  
  79. <?php do_action( 'bp_members_delete_account_after_submit' ); ?> 
  80.  
  81. <?php wp_nonce_field( 'delete-account' ); ?> 
  82.  
  83. </form> 
  84.  
  85. <?php do_action( 'bp_after_member_body' ); ?> 
  86.  
  87. </div><!-- #item-body --> 
  88.  
  89. <?php do_action( 'bp_after_member_settings_template' ); ?> 
  90.  
  91. </div><!-- .padder --> 
  92. </div><!-- #content --> 
  93.  
  94. <?php get_sidebar( 'buddypress' ); ?> 
  95.  
  96. <?php get_footer( 'buddypress' ); ?> 
.