From cda528ac7e6b8c247a46c5313949ed041962c872 Mon Sep 17 00:00:00 2001 From: Ari Stathopoulos Date: Tue, 31 Jan 2023 09:32:33 +0200 Subject: [PATCH] fixes #6 --- health-check.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/health-check.php b/health-check.php index 24e5a526..fd7a59cf 100644 --- a/health-check.php +++ b/health-check.php @@ -60,3 +60,22 @@ function sqlite_plugin_filter_debug_data( $info ) { return $info; } add_filter( 'debug_information', 'sqlite_plugin_filter_debug_data' ); // Filter debug data in site-health screen. + +/** + * Filter site_status tests in site-health screen. + * + * When the plugin gets merged in wp-core, these should be merged in src/wp-admin/includes/class-wp-site-health.php + * + * @param array $tests The tests. + * @return array + */ +function sqlite_plugin_filter_site_status_tests( $tests ) { + $database_type = defined( 'DATABASE_TYPE' ) && 'sqlite' === DATABASE_TYPE ? 'sqlite' : 'mysql'; + + if ( 'sqlite' === $database_type ) { + unset( $tests['direct']['utf8mb4_support'] ); + } + + return $tests; +} +add_filter( 'site_status_tests', 'sqlite_plugin_filter_site_status_tests' );