Add a tables_to_repair filter. fixes #11707
git-svn-id: https://develop.svn.wordpress.org/trunk@13523 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8ee771f548
commit
e736145a98
@ -31,8 +31,9 @@ if ( !defined('WP_ALLOW_REPAIR') ) {
|
|||||||
|
|
||||||
$okay = true;
|
$okay = true;
|
||||||
|
|
||||||
$tables = $wpdb->tables( 'all' );
|
$tables = $wpdb->tables();
|
||||||
// Loop over the WP tables, checking and repairing as needed.
|
$tables = array_merge( $tables, (array) apply_filters( 'tables_to_repair', array() ) ); // Return tables with table prefixes.
|
||||||
|
// Loop over the tables, checking and repairing as needed.
|
||||||
foreach ( $tables as $table ) {
|
foreach ( $tables as $table ) {
|
||||||
$check = $wpdb->get_row("CHECK TABLE $table");
|
$check = $wpdb->get_row("CHECK TABLE $table");
|
||||||
if ( 'OK' == $check->Msg_text ) {
|
if ( 'OK' == $check->Msg_text ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user