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 |
---|---|
552 | * in $_REQUEST['history'] |
553 | * |
554 | * @param int $post_id |
555 | * @return bool |
556 | */ |
557 | function stream_preview_image( $post_id ) { |
558 | $post = get_post( $post_id ); |
559 |
|
560 | /** This filter is documented in wp-admin/admin.php */ |
561 | @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) ); |
562 |
|
563 | $img = wp_get_image_editor( _load_image_to_edit_path( $post_id ) ); |
564 |
|
565 | if ( is_wp_error( $img ) ) |
566 | return false; |
567 |
|
568 | $changes = !empty($_REQUEST['history']) ? json_decode( wp_unslash($_REQUEST['history']) ) : null; |
569 | if ( $changes ) |
570 | $img = image_edit_apply_changes( $img, $changes ); |