[wp-trac] [WordPress Trac] #18912: No "insert into post" from Media Library

WordPress Trac wp-trac at lists.automattic.com
Fri Oct 14 03:07:31 UTC 2011

#18912: No "insert into post" from Media Library
 Reporter:  anmari                               |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Media                                |  Review
 Severity:  normal                               |     Version:  3.3
 Keywords:  reporter-feedback dev-feedback has-  |  Resolution:
  patch                                          |
Changes (by SergeyBiryukov):

 * keywords:  reporter-feedback => reporter-feedback dev-feedback has-patch


 Replying to [comment:3 SergeyBiryukov]:
 > The button only appears if the attachment parent post supports editor

 Correction: the button also appears for unattached images, due to `true`
 at the end of the expression.

 If the parent post was moved to Trash, the button is still displayed. If
 the parent post was deleted permanently, the image becomes unattached, and
 the button is also still displayed.

 So the only condition for the button not to appear is when the image is
 attached to a post, and that post type doesn't support editor (or
 something makes WP think so).

 That said, it doesn't make much sense to me. If we're going to insert the
 image into *current* post, I guess we should check if *that* post type
 supports editor, not the  *original* attachment parent post.

 The patch seems to revert [14146], so needs feedback. Not sure if
 [comment:ticket:12792:10 dd32's comment] about missing `$_GET['post_id']`
 is still relevant.

 Related: #12792, #14133

Ticket URL: <http://core.trac.wordpress.org/ticket/18912#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list