apply_filters( 'site_status_test_php_modules', array $modules )
- Since
- 5.2.0, 5.3.0
Filters the array representing all the modules we wish to test for.
Compatibility
- WordPress
- since 5.3.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$modulesarray- { An associative array of modules to test for.
@type array ...$0 { An associative array of module properties used during testing.
One of either$functionor$extensionmust be provided, or they will fail by default.
@type string $function Optional. A function name to test for the existence of.
@type string $extension Optional. An extension to check if is loaded in PHP.
@type string $constant Optional. A constant name to check for to verify an extension exists.
@type string $class Optional. A class name to check for to verify an extension exists.
@type bool $required Is this a required feature or not.
@type string $fallback_for Optional. The module this module replaces as a fallback.
} }...$0arrayAn associative array of module properties used during testing. One of either$functionor$extensionmust be provided, or they will fail by default.$functionstringOptional. A function name to test for the existence of.$extensionstringOptional. An extension to check if is loaded in PHP.$constantstringOptional. A constant name to check for to verify an extension exists.$classstringOptional. A class name to check for to verify an extension exists.$requiredboolIs this a required feature or not.$fallback_forstringOptional. The module this module replaces as a fallback.
Where this hook fires · 1
wp-admin/includes/class-wp-site-health.php:1026WP_Site_Health::get_test_php_extensions()
Source code
* @type string $class Optional. A class name to check for to verify an extension exists. * @type bool $required Is this a required feature or not. * @type string $fallback_for Optional. The module this module replaces as a fallback. * } * } */ $modules = apply_filters( 'site_status_test_php_modules', $modules ); $failures = array(); foreach ( $modules as $library => $module ) { $extension_name = ( isset( $module['extension'] ) ? $module['extension'] : null ); $function_name = ( isset( $module['function'] ) ? $module['function'] : null );Changelog
Introduced in 5.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
5.3.0
The
$constant and $class parameters were added.from the docblock5.2.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.