Home/Hooks/admin_memory_limit
FILTER

admin_memory_limit

Filters the maximum memory limit available for administration screens. This only applies to administrators, who may require more memory for tasks like updates. Memory limits when processing images (uploaded or edited by users of any role) are handled separately. The `WP_MAX_MEMORY_LIMIT` constant specifically defines the maximum memory limit available when in the administration back end. The default is 256M (256 megabytes of memory) or the original `memory_limit` php.ini value if this is higher. (bytes), or a shorthand string notation, such as '256M'.

wp-includes/functions.php
Line 7859
1 Parameter
View Source

Usage

add_filter( 'admin_memory_limit', 'your_callback_function', 10, 1 );

Filter Callback:

function your_callback_function( $filtered_limit ) {
    // Your code here
    return $filtered_limit;
}

Parameters

$filtered_limit

Parameter 1

🔄 Filter Hook

Filter hooks allow you to modify data before it is saved to the database or displayed on the screen. Filters must return a value.