cron_memory_limit хук-фильтрWP 6.3.0

Filters the memory limit allocated for WP-Cron event processing.

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

add_filter( 'cron_memory_limit', 'wp_kama_cron_memory_limit_filter' );

/**
 * Function for `cron_memory_limit` filter-hook.
 * 
 * @param int|string $filtered_limit Maximum memory limit to allocate for WP-Cron.ini `memory_limit`, whichever is higher. Accepts an integer (bytes), or a shorthand string notation, such as '256M'.
 *
 * @return int|string
 */
function wp_kama_cron_memory_limit_filter( $filtered_limit ){

	// filter...
	return $filtered_limit;
}
$filtered_limit(int|строка)
Maximum memory limit to allocate for WP-Cron.ini memory_limit, whichever is higher. Accepts an integer (bytes), or a shorthand string notation, such as '256M'.
По умолчанию: WP_MAX_MEMORY_LIMIT or the original php

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

С версии 6.3.0 Введена.

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

wp_raise_memory_limit()
cron_memory_limit
wp-includes/functions.php 7859
$filtered_limit = apply_filters( 'cron_memory_limit', $filtered_limit );

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

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