Skip to content

Commit cda528a

Browse files
committed
fixes #6
1 parent 7d36440 commit cda528a

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

health-check.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,22 @@ function sqlite_plugin_filter_debug_data( $info ) {
6060
return $info;
6161
}
6262
add_filter( 'debug_information', 'sqlite_plugin_filter_debug_data' ); // Filter debug data in site-health screen.
63+
64+
/**
65+
* Filter site_status tests in site-health screen.
66+
*
67+
* When the plugin gets merged in wp-core, these should be merged in src/wp-admin/includes/class-wp-site-health.php
68+
*
69+
* @param array $tests The tests.
70+
* @return array
71+
*/
72+
function sqlite_plugin_filter_site_status_tests( $tests ) {
73+
$database_type = defined( 'DATABASE_TYPE' ) && 'sqlite' === DATABASE_TYPE ? 'sqlite' : 'mysql';
74+
75+
if ( 'sqlite' === $database_type ) {
76+
unset( $tests['direct']['utf8mb4_support'] );
77+
}
78+
79+
return $tests;
80+
}
81+
add_filter( 'site_status_tests', 'sqlite_plugin_filter_site_status_tests' );

0 commit comments

Comments
 (0)