# site_status_test_php_modules

URL: https://chugunov.pro/api-wordpress/filters/site_status_test_php_modules/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: хук-фильтр.
Появился в версии: 5.2.0.

## Сигнатура

```php
apply_filters( 'site_status_test_php_modules', array $modules )
```

## Описание

Фильтрует массив, представляющий все модули, наличие которых мы хотим проверить.

## Параметры

- `$modules` `array` — обязательный. An associative array of modules to test for.
  
  - `...$0` array An associative array of module properties used during testing.
  
  One of either `$function` or `$extension` must be provided, or they will fail by default.
  
  - `function` string Optional. A function name to test for the existence of.
  
  - `extension` string Optional. An extension to check if is loaded in PHP.
  
  - `constant` string Optional. A constant name to check for to verify an extension exists.
  
  - `class` string Optional. A class name to check for to verify an extension exists.
  
  - `required` bool Is this a required feature or not.
  
  - `fallback_for` string Optional. The module this module replaces as a fallback.
  
  [Source](#source)
  
  ```
  $modules = apply_filters( 'site_status_test_php_modules', $modules );
  ```
  
  [View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-site-health.php/) [View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/class-wp-site-health.php#L1051) [View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/class-wp-site-health.php#L1051-L1051)
  
  [Related](#related) Used by | Description |
  [WP_Site_Health::get_test_php_extensions()](https://developer.wordpress.org/reference/classes/wp_site_health/get_test_php_extensions/)`wp-admin/includes/class-wp-site-health.php` | Tests if required PHP modules are installed on the host.
  |
  
  [Changelog](#changelog) Version | Description |
  [5.3.0](https://developer.wordpress.org/reference/since/5.3.0/) | The `$constant` and `$class` parameters were added. |
  [5.2.0](https://developer.wordpress.org/reference/since/5.2.0/) | Introduced. |

## Фильтруемое значение

An associative array of modules to test for.

- `...$0` array An associative array of module properties used during testing.

One of either `$function` or `$extension` must be provided, or they will fail by default.

- `function` string Optional. A function name to test for the existence of.

- `extension` string Optional. An extension to check if is loaded in PHP.

- `constant` string Optional. A constant name to check for to verify an extension exists.

- `class` string Optional. A class name to check for to verify an extension exists.

- `required` bool Is this a required feature or not.

- `fallback_for` string Optional. The module this module replaces as a fallback.

[Source](#source)

```
$modules = apply_filters( 'site_status_test_php_modules', $modules );
```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-site-health.php/) [View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/class-wp-site-health.php#L1051) [View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/class-wp-site-health.php#L1051-L1051)

[Related](#related) Used by | Description |
[WP_Site_Health::get_test_php_extensions()](https://developer.wordpress.org/reference/classes/wp_site_health/get_test_php_extensions/)`wp-admin/includes/class-wp-site-health.php` | Tests if required PHP modules are installed on the host.
|

[Changelog](#changelog) Version | Description |
[5.3.0](https://developer.wordpress.org/reference/since/5.3.0/) | The `$constant` and `$class` parameters were added. |
[5.2.0](https://developer.wordpress.org/reference/since/5.2.0/) | Introduced. |

## Исходный код

Файл: `wp-admin/includes/class-wp-site-health.php:1051`

```php
$modules = apply_filters( 'site_status_test_php_modules', $modules );
```

## История изменений

- 5.3.0 — The $constant and $class parameters were added.
- 5.2.0 — Introduced.

## Связанные

Используется в: `WP_Site_Health::get_test_php_extensions`.

Оригинал в официальной документации: https://developer.wordpress.org/reference/hooks/site_status_test_php_modules/
