site_status_test_php_modules хук-фильтрWP 5.2.0

Filters the array representing all the modules we wish to test for.

Использование

add_filter( 'site_status_test_php_modules', 'wp_kama_site_status_test_php_modules_filter' );

/**
 * Function for `site_status_test_php_modules` filter-hook.
 * 
 * @param array $modules An associative array of modules to test for.
 *
 * @return array
 */
function wp_kama_site_status_test_php_modules_filter( $modules ){

	// filter...
	return $modules;
}
$modules(массив)

An associative array of modules to test for.

  • ...$0(массив)
    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(строка)
      Optional. A function name to test for the existence of.

    • extension(строка)
      Optional. An extension to check if is loaded in PHP.

    • constant(строка)
      Optional. A constant name to check for to verify an extension exists.

    • class(строка)
      Optional. A class name to check for to verify an extension exists.

    • required(true|false)
      Is this a required feature or not.

    • fallback_for(строка)
      Optional. The module this module replaces as a fallback.

Список изменений

С версии 5.2.0 Введена.
С версии 5.3.0 The $constant and $class parameters were added.

Где вызывается хук

WP_Site_Health::get_test_php_extensions()
site_status_test_php_modules
wp-admin/includes/class-wp-site-health.php 1024
$modules = apply_filters( 'site_status_test_php_modules', $modules );

Где используется хук в WordPress

Использование не найдено.