WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6806 closed defect (bug) (fixed)

image_send_to_editor is called twice for every image

Reported by: AaronCampbell Owned by:
Milestone: 2.6 Priority: high
Severity: major Version:
Component: General Keywords: has-patch needs-testing
Focuses: Cc:

Description

Inside the get_image_send_to_editor function in wp-admin/includes/media.php, first get_image_tag is called, which applies the filter image_send_to_editor, then later in that same function the image_send_to_editor filter is applied again. I'm adding image captioning, so I need to modify the image code sent to the editor, but not the image tag. We should change the call inside get_image_tag to be "get_image_tag" rather than "image_send_to_editor"

Patch Attached.

Attachments (1)

6806.001.diff (674 bytes) - added by AaronCampbell 7 years ago.

Download all attachments as: .zip

Change History (5)

@AaronCampbell7 years ago

comment:1 @ryan7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7838]) Don't reuse image_send_to_editor filter in get_image_tag(). Props AaronCampbell. fixes #6806 for trunk

comment:2 @ryan7 years ago

(In [7839]) Don't reuse image_send_to_editor filter in get_image_tag(). Props AaronCampbell. fixes #6806 for 2.5

comment:3 @ryan7 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

comment:4 @westi7 years ago

  • Milestone changed from 2.9 to 2.6
Note: See TracTickets for help on using tickets.