admin管理员组文章数量:1315246
The newer versions of WordPress, and possibly older ones, open an attachment details modal window when an image is selected in the media library. Is there a way that I can open this modal on a different admin page if I know the attachment's ID? Specifically, can I click a button and have the modal window open?
The newer versions of WordPress, and possibly older ones, open an attachment details modal window when an image is selected in the media library. Is there a way that I can open this modal on a different admin page if I know the attachment's ID? Specifically, can I click a button and have the modal window open?
Share Improve this question asked May 28, 2015 at 16:40 syntacularsyntacular 112 bronze badges1 Answer
Reset to default 1Unfortunately the logic of the attachment details isn't made to be used standalone - it requires the grid that opens it. You can however use the get_media_item( attachment_id ) method to receive the HTML of the form for modifying images: https://developer.wordpress/reference/functions/get_media_item/
本文标签: imagesOpen the attachment details modal
版权声明:本文标题:images - Open the attachment details modal 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741981693a2408435.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论