-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove site health tests that aren't relevant to pantheon envs
- Loading branch information
1 parent
be5a6d2
commit 582dc00
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
<?php | ||
/** | ||
* Pantheon Site Health Modifications | ||
* | ||
* @package pantheon | ||
*/ | ||
|
||
namespace Pantheon\Site_Health; | ||
|
||
// If on Pantheon... | ||
if ( isset( $_ENV['PANTHEON_ENVIRONMENT'] ) ) { | ||
add_filter( 'site_status_tests', __NAMESPACE__ . '\\site_health_mods' ); | ||
} | ||
|
||
/** | ||
* Modify the Site Health tests. | ||
* | ||
* @param array $tests The Site Health tests. | ||
* @return array | ||
*/ | ||
function site_health_mods( $tests ) { | ||
// Remove checks that aren't relevant to Pantheon environments. | ||
unset( $tests['direct']['update_temp_backup_writable'] ); | ||
unset( $tests['direct']['available_updates_disk_space'] ); | ||
unset( $tests['async']['background_updates'] ); | ||
return $tests; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters