bp_core_admin_tools

Render the BuddyPress Tools page.

Description

bp_core_admin_tools(); 

Usage

  1. if ( !function_exists( 'bp_core_admin_tools' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/admin/bp-core-admin-tools.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_core_admin_tools(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/admin/bp-core-admin-tools.php  
  1. function bp_core_admin_tools() { 
  2. ?> 
  3. <div class="wrap"> 
  4.  
  5. <h1><?php esc_html_e( 'BuddyPress Tools', buddypress ) ?></h1> 
  6.  
  7. <p><?php esc_html_e( 'BuddyPress keeps track of various relationships between members, groups, and activity items. Occasionally these relationships become out of sync, most often after an import, update, or migration.', buddypress ); ?></p> 
  8. <p><?php esc_html_e( 'Use the tools below to manually recalculate these relationships.', buddypress ); ?> 
  9. </p> 
  10. <p class="description"><?php esc_html_e( 'Some of these tools create substantial database overhead. Avoid running more than one repair job at a time.', buddypress ); ?></p> 
  11.  
  12. <form class="settings" method="post" action=""> 
  13.  
  14. <fieldset> 
  15. <legend><?php esc_html_e( 'Repair tools', buddypress ) ?></legend> 
  16.  
  17. <div class="checkbox"> 
  18. <?php foreach ( bp_admin_repair_list() as $item ) : ?> 
  19. <label for="<?php echo esc_attr( str_replace( '_', '-', $item[0] ) ); ?>"><input type="checkbox" class="checkbox" name="<?php echo esc_attr( $item[0] ) . '" id="' . esc_attr( str_replace( '_', '-', $item[0] ) ); ?>" value="1" /> <?php echo esc_html( $item[1] ); ?></label> 
  20. <?php endforeach; ?> 
  21. </div> 
  22.  
  23. <p class="submit"> 
  24. <input class="button-primary" type="submit" name="bp-tools-submit" value="<?php esc_attr_e( 'Repair Items', buddypress ); ?>" /> 
  25. <?php wp_nonce_field( 'bp-do-counts' ); ?> 
  26. </p> 
  27.  
  28. </fieldset> 
  29.  
  30. </form> 
  31.  
  32. </div> 
  33.  
  34. <?php