bbp_admin_repair

Admin repair page.

Description

bbp_admin_repair(); 

Usage

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

Defined (1)

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

/includes/admin/tools.php  
  1. function bbp_admin_repair() { 
  2. ?> 
  3.  
  4. <div class="wrap"> 
  5.  
  6. <?php screen_icon( 'tools' ); ?> 
  7.  
  8. <h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( __( 'Repair Forums', bbpress ) ); ?></h2> 
  9.  
  10. <p><?php esc_html_e( 'bbPress keeps track of relationships between forums, topics, replies, and topic tags, and users. Occasionally these relationships become out of sync, most often after an import or migration. Use the tools below to manually recalculate these relationships.', bbpress ); ?></p> 
  11. <p class="description"><?php esc_html_e( 'Some of these tools create substantial database overhead. Avoid running more than 1 repair job at a time.', bbpress ); ?></p> 
  12.  
  13. <form class="settings" method="post" action=""> 
  14. <table class="form-table"> 
  15. <tbody> 
  16. <tr valign="top"> 
  17. <th scope="row"><?php esc_html_e( 'Relationships to Repair:', bbpress ) ?></th> 
  18. <td> 
  19. <fieldset> 
  20. <legend class="screen-reader-text"><span><?php esc_html_e( 'Repair', bbpress ) ?></span></legend> 
  21.  
  22. <?php foreach ( bbp_admin_repair_list() as $item ) : ?> 
  23.  
  24. <label><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><br /> 
  25.  
  26. <?php endforeach; ?> 
  27.  
  28. </fieldset> 
  29. </td> 
  30. </tr> 
  31. </tbody> 
  32. </table> 
  33.  
  34. <fieldset class="submit"> 
  35. <input class="button-primary" type="submit" name="submit" value="<?php esc_attr_e( 'Repair Items', bbpress ); ?>" /> 
  36. <?php wp_nonce_field( 'bbpress-do-counts' ); ?> 
  37. </fieldset> 
  38. </form> 
  39. </div> 
  40.  
  41. <?php