v1.2.0
This commit is contained in:
parent
6708bbb67f
commit
650e69349f
21 changed files with 2919 additions and 268 deletions
|
|
@ -57,6 +57,23 @@ class Database {
|
|||
$wpdb->query( "DROP TABLE IF EXISTS `{$wpdb->prefix}mra_media_index`" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
||||
}
|
||||
|
||||
/**
|
||||
* Truncates all plugin tables, removing all data while preserving the table structure.
|
||||
*
|
||||
* Used by the Tools page "Reset all data" operation.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function truncate_all(): void {
|
||||
global $wpdb;
|
||||
|
||||
// phpcs:disable WordPress.DB.DirectDatabaseQuery
|
||||
$wpdb->query( "TRUNCATE TABLE `{$wpdb->prefix}mra_external_results`" );
|
||||
$wpdb->query( "TRUNCATE TABLE `{$wpdb->prefix}mra_media_usage`" );
|
||||
$wpdb->query( "TRUNCATE TABLE `{$wpdb->prefix}mra_media_index`" );
|
||||
// phpcs:enable WordPress.DB.DirectDatabaseQuery
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Migrations
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue