[wp-trac] [WordPress Trac] #51791: When wp_prepare_attachment_for_js() is called too early, a fatal occurs "Call to undefined function get_media_states()"

WordPress Trac noreply at wordpress.org
Mon Nov 16 18:41:43 UTC 2020


#51791: When wp_prepare_attachment_for_js() is called too early, a fatal occurs
"Call to undefined function get_media_states()"
--------------------------+---------------------
 Reporter:  rebasaurus    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.6
Component:  Media         |     Version:  trunk
 Severity:  major         |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------
Changes (by rebasaurus):

 * Attachment "51792.patch" added.

 Since I see that we check for the existence of get_compat_media_markup
 above, I think we can do the same behavior here?

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


More information about the wp-trac mailing list