Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: admin_memory_limit

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
444 /**
445  * Streams image in post to browser, along with enqueued changes
446  * in $_REQUEST['history']
447  *
448  * @param int $post_id
449  * @return boolean
450  */
451 function stream_preview_image( $post_id ) {
452      $post = get_post( $post_id );
453      @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
454
455      $img = wp_get_image_editor( _load_image_to_edit_path( $post_id ) );
456
457     if ( is_wp_error( $img ) )
458         return false;
459
460      $changes = !empty($_REQUEST['history']) ? json_decode( wp_unslash($_REQUEST['history']) ) : null;
461      if ( $changes )
462           $img = image_edit_apply_changes( $img, $changes );