WP HOOKS
filtrod 5.1.1

wp_is_php_version_acceptable

Args 2Plik wp-admin/includes/misc.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters whether the active PHP version is considered acceptable by WordPress.

Returning false will trigger a PHP version warning to show up in the admin dashboard to administrators. This filter is only run if the wordpress.org Serve Happy API considers the PHP version acceptable, ensuring that this filter can only make this check stricter, but not loosen it.

Parametry

ParametrTypOpis
$is_acceptableboolWhether the PHP version is considered acceptable. Default true.
$versionstringPHP version checked.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_is_php_version_acceptable', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii