WP HOOKS
filtrdynamicznyod 4.6.0

{$context}_memory_limit

Args 1Plik wp-includes/functions.php

Opis — z kodu źródłowego

Filters the memory limit allocated for an arbitrary context.

The dynamic portion of the hook name, $context, refers to an arbitrary context passed on calling the function. This allows for plugins to define their own contexts for raising the memory limit.

Parametry

ParametrTypOpis
$filtered_limitint | stringMaximum memory limit to allocate for this context. Default WP_MAX_MEMORY_LIMIT<code>or the original php.ini</code>memory_limit`, whichever is higher. Accepts an integer (bytes), or a shorthand string notation, such as '256M'.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( '{$context}_memory_limit', 'twoja_funkcja' );

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

Popularne w tej kategorii