bp_admin_repair_blog_records

Recalculate user-to-blog relationships and useful blog meta data.

Description

(array) bp_admin_repair_blog_records(); 

Returns (array)


Usage

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

Defined (1)

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

/bp-core/admin/bp-core-admin-tools.php  
  1. function bp_admin_repair_blog_records() { 
  2.  
  3. // Description of this tool, displayed to the user. 
  4. $statement = __( 'Repopulating Blogs records… %s', buddypress ); 
  5.  
  6. // Default to failure text. 
  7. $result = __( 'Failed!', buddypress ); 
  8.  
  9. // Default to unrepaired. 
  10. $repair = false; 
  11.  
  12. // Run function if blogs component is active. 
  13. if ( bp_is_active( 'blogs' ) ) { 
  14.  
  15. // Setup success/fail messaging. 
  16. if ( true === $repair ) { 
  17. $result = __( 'Complete!', buddypress ); 
  18.  
  19. // All done! 
  20. return array( 0, sprintf( $statement, $result ) );