#27372 closed defect (bug) (duplicate)
Add Media Button of wp_editor() is no more working on front-end since r27445
Reported by: | imath | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
Hi,
First, i'd like to congratulate you for the great features introduced in the Media Editor in 3.9 next release.
I've noticed #21811 makes it possible to edit image directly in the Media Editor, which is great :)
Unfortunately, there seems to be an annoying side effect when the wp_editor()
is used on front-end or if a plugin uses wp_enqueue_media()
on front-end which is my case...
Clicking on the "Add Media" button no more opens the Media Editor since [27445].
I've seen @tomauger in his comment suggested a patch to fix it. It brings back the Media Editor but clicking on the "Edit image" link of the Media details side box loads the Image Edit view without the toolbar. So it's not usable. The problem seems to be that this part needs a css file that is included in the wp-admin
one.
I guess it's one good reason to have the is_admin() check before enqueueing image-edit
.
On my local dev, i've built an alternative patch which seems to solve the side effect. So i thought you might be interested by it. I hope i didn't do wrong by creating a new ticket instead of carrying on the discussion in the original ticket. If i did, i apologize.
Since this issue is first mentioned in #21811 and the patch here is based on patches there, I think it's better to continue the discussion in the original ticket. I'll copy your ticket as a comment there.