~canonical-sysadmins/wordpress/4.2.4

« back to all changes in this revision

Viewing changes to wp-admin/includes/image-edit.php

  • Committer: Nick Moffitt
  • Date: 2015-01-15 11:05:37 UTC
  • mfrom: (1.1.1 wp4-upstream)
  • Revision ID: nick.moffitt@canonical.com-20150115110537-8bp1y42eyg0jsa7c
Tags: 4.1
MergeĀ upstreamĀ versionĀ 4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * @subpackage Administration
7
7
 */
8
8
 
 
9
/**
 
10
 * @param int $post_id
 
11
 * @param bool|object $msg
 
12
 */
9
13
function wp_image_editor($post_id, $msg = false) {
10
14
        $nonce = wp_create_nonce("image_editor-$post_id");
11
15
        $meta = wp_get_attachment_metadata($post_id);
399
403
/**
400
404
 * Performs group of changes on Editor specified.
401
405
 *
402
 
 * @param WP_Image_Editor $image
403
 
 * @param type $changes
404
 
 * @return WP_Image_Editor
 
406
 * @since 2.9.0
 
407
 *
 
408
 * @param WP_Image_Editor $image   {@see WP_Image_Editor} instance.
 
409
 * @param array           $changes Array of change operations.
 
410
 * @return WP_Image_Editor {@see WP_Image_Editor} instance with changes applied.
405
411
 */
406
412
function image_edit_apply_changes( $image, $changes ) {
407
413
        if ( is_resource( $image ) )
554
560
        return wp_stream_image( $img, $post->post_mime_type, $post_id );
555
561
}
556
562
 
 
563
/**
 
564
 * @param int $post_id
 
565
 * @return stdClass
 
566
 */
557
567
function wp_restore_image($post_id) {
558
568
        $meta = wp_get_attachment_metadata($post_id);
559
569
        $file = get_attached_file($post_id);