最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

images - Open the attachment details modal

programmeradmin1浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 1

Unfortunately 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/

发布评论

评论列表(0)

  1. 暂无评论