Ticket #6806 (closed defect: fixed)

Opened 3 months ago

Last modified 5 days ago

image_send_to_editor is called twice for every image

Reported by: AaronCampbell Assigned to: anonymous
Priority: high Milestone: 2.9
Component: General Version:
Severity: major Keywords: has-patch needs-testing
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

6806.001.diff (0.7 kB) - added by AaronCampbell on 04/22/08 17:48:04.

Change History

04/22/08 17:48:04 changed by AaronCampbell

  • attachment 6806.001.diff added.

04/25/08 17:58:39 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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

04/25/08 17:59:13 changed by ryan

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

07/15/08 16:24:07 changed by ryan

  • milestone changed from 2.5.2 to 2.9.

Milestone 2.5.2 deleted