[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)




/wp-admin/includes/ -> image-edit.php (summary)

WordPress Image Editor

File Size: 982 lines (35 kb)
Included or required: 3 times
Referenced: 0 times
Includes or requires: 0 files

Defines 11 functions


Functions that are not part of a class:

wp_image_editor( $post_id, $msg = false )   X-Ref
Loads the WP image-editing interface.

param: int         $post_id Post ID.
param: bool|object $msg     Optional. Message to display for image editor updates or errors.

wp_stream_image( $image, $mime_type, $attachment_id )   X-Ref
Streams image in WP_Image_Editor to browser.

param: WP_Image_Editor $image         The image editor instance.
param: string          $mime_type     The mime type of the image.
param: int             $attachment_id The image's attachment post ID.
return: bool True on success, false on failure.

wp_save_image_file( $filename, $image, $mime_type, $post_id )   X-Ref
Saves image to file.

param: string $filename
param: WP_Image_Editor $image
param: string $mime_type
param: int $post_id
return: bool

_image_get_preview_ratio( $w, $h )   X-Ref
Image preview ratio. Internal use only.

param: int $w Image width in pixels.
param: int $h Image height in pixels.
return: float|int Image preview ratio.

_rotate_image_resource( $img, $angle )   X-Ref
Returns an image resource. Internal use only.

param: resource  $img   Image resource.
param: float|int $angle Image rotation angle, in degrees.
return: resource|false GD image resource, false otherwise.

_flip_image_resource( $img, $horz, $vert )   X-Ref
Flips an image resource. Internal use only.

param: resource $img  Image resource.
param: bool     $horz Whether to flip horizontally.
param: bool     $vert Whether to flip vertically.
return: resource (maybe) flipped image resource.

_crop_image_resource( $img, $x, $y, $w, $h )   X-Ref
Crops an image resource. Internal use only.

param: resource $img Image resource.
param: float    $x   Source point x-coordinate.
param: float    $y   Source point y-cooredinate.
param: float    $w   Source width.
param: float    $h   Source height.
return: resource (maybe) cropped image resource.

image_edit_apply_changes( $image, $changes )   X-Ref
Performs group of changes on Editor specified.

param: WP_Image_Editor $image   WP_Image_Editor instance.
param: array           $changes Array of change operations.
return: WP_Image_Editor WP_Image_Editor instance with changes applied.

stream_preview_image( $post_id )   X-Ref
Streams image in post to browser, along with enqueued changes
in $_REQUEST['history']

param: int $post_id
return: bool

wp_restore_image( $post_id )   X-Ref
Restores the metadata for a given attachment.

param: int $post_id Attachment post ID.
return: stdClass Image restoration message object.

wp_save_image( $post_id )   X-Ref
Saves image to post along with enqueued changes
in $_REQUEST['history']

param: int $post_id
return: \stdClass

Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7