[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:50:56 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: has-patch commit | Focuses:
------------------------------+---------------------
Changes (by helen):
* keywords: has-patch => has-patch commit
Comment:
Yeah I think it makes sense to just do it the same as
`get_compat_media_markup` given the context. More broadly I kind of feel
like it should actually be filtered in closer to usage time since it's
just a string and not super useful without more futzing outside of the
specific admin usage but that's probably too much to be messing with for
not a ton of benefit.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51791#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list