[wp-trac] [WordPress Trac] #39741: Hook of 'media_send_to_editor' filter causes no output.

WordPress Trac noreply at wordpress.org
Mon Jan 30 22:06:02 UTC 2017


#39741: Hook of 'media_send_to_editor' filter causes no output.
--------------------------+-----------------------------
 Reporter:  slancio       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  4.7.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I have a site there I'm trying to make modifications to the HTML returned
 when uploading images in a post via the Add Media button.

 Just the act of hooking that filter seems to cause the Add Media button to
 output no HTML whatsoever .  I am passing $html, $send_id, and $attachment
 to my hook function and returning $html.

 Interestingly enough, the body of the function seems to not run.  I've
 tried setting debugger lines within the function, vardump the input
 variables, even exit().  Nothing seems to happen within the function body,
 xdebug doesn't kick off within the function body and no output is returned
 either.  Once I remove the hook, everything seems to work fine again.

 This happens on a fresh install of 4.7.2  I also tried this on 3 other
 WordPress site installs that I have in production versions 4.5 and later
 and experience the same behavior.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39741>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list