You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.
In a few places, the code is written as though its possible to create a shortcode using an external image rather than an attachment post. This functionality is not built out and poses a lot of problems, though.
We should scope out whether this is a reasonable/desirable feature and either build it out some more or remove the stub code which was written with that possibility in mind.
I suspect that this is not a feature worth building, as WP's media sideloader is already a pretty good experience.
The text was updated successfully, but these errors were encountered:
This is just inserting all attributes from the <img> tag onto the [img] shortcode. That much makes some sense. The bigger question as I see it is how to represent that in the UI.
Right now, the UI has an attachment picker attribute defined for attachment, but no field defined for src. So you can insert a shortcode like [img src="http://src.url/filename.ext"], and it'll display fine with the callback, but if you try to edit it, the field for src won't be visible. Does it make sense to expose that field in the UI, and if so, when? Should we show a field for src unless there's an attachment selected?
The initial interface should meet the two fields. This attachment and src. When we select one, js can open only the required fields. It is not difficult. The difficulties begin, if we do not lose the opportunity WP Media. In this case, we would have to reinvent the wheel, catching up with WP Media. On the other hand, if we have a shortcode like in other places, we have to do something with it.
The solution is to reverse [img src = "link"] to html via the filter 'content_edit_pre'. In this case, we can use the WP editor. When save the entry, we can convert html to shortcode again
PS. I apologize if my English is not good.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In a few places, the code is written as though its possible to create a shortcode using an external image rather than an attachment post. This functionality is not built out and poses a lot of problems, though.
We should scope out whether this is a reasonable/desirable feature and either build it out some more or remove the stub code which was written with that possibility in mind.
I suspect that this is not a feature worth building, as WP's media sideloader is already a pretty good experience.
The text was updated successfully, but these errors were encountered: