WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 6572 | * their own contexts for raising the memory limit. |
| 6573 | * |
| 6574 | * @since 4.6.0 |
| 6575 | * |
| 6576 | * @param int|string $filtered_limit Maximum memory limit to allocate for images. |
| 6577 | * Default '256M' or the original php.ini `memory_limit`, |
| 6578 | * whichever is higher. Accepts an integer (bytes), or a |
| 6579 | * shorthand string notation, such as '256M'. |
| 6580 | */ |
| 6581 | $filtered_limit = apply_filters( "{$context}_memory_limit", $filtered_limit ); |
| 6582 | break; |
| 6583 | } |
| 6584 | |
| 6585 | $filtered_limit_int = wp_convert_hr_to_bytes( $filtered_limit ); |
| 6586 | |
| 6587 | if ( -1 === $filtered_limit_int || ( $filtered_limit_int > $wp_max_limit_int && $filtered_limit_int > $current_limit_int ) ) { |
| 6588 | if ( false !== ini_set( 'memory_limit', $filtered_limit ) ) { |
| 6589 | return $filtered_limit; |
| 6590 | } else { |