bbp_admin_repair_handler

Handle the processing and feedback of the admin tools page.

Description

bbp_admin_repair_handler(); 

Usage

  1. if ( !function_exists( 'bbp_admin_repair_handler' ) ) { 
  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_handler(); 
  7.  

Defined (1)

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

/includes/admin/tools.php  
  1. function bbp_admin_repair_handler() { 
  2.  
  3. if ( ! bbp_is_post_request() ) 
  4. return; 
  5.  
  6. check_admin_referer( 'bbpress-do-counts' ); 
  7.  
  8. // Stores messages 
  9. $messages = array(); 
  10.  
  11. wp_cache_flush(); 
  12.  
  13. foreach ( (array) bbp_admin_repair_list() as $item ) { 
  14. if ( isset( $item[2] ) && isset( $_POST[$item[0]] ) && 1 === absint( $_POST[$item[0]] ) && is_callable( $item[2] ) ) { 
  15. $messages[] = call_user_func( $item[2] ); 
  16.  
  17. if ( count( $messages ) ) { 
  18. foreach ( $messages as $message ) { 
  19. bbp_admin_tools_feedback( $message[1] );