admin管理员组文章数量:1391975
I developed plugin where user can choose custom og:image.
I expect this to be part of response when I request data from REST API.
"meta": {
"_title": "Custom Hello world Title!",
"_description": "This is your first post. Edit or delete it, then start writing!",
"_og_title": "Custom OG Hello world Title!",
"_og_description": "Take a look at our first post. Edit or delete it, then start writing!",
"_og_image": "http:\/\/localhost:8069\/wp-content\/uploads\/2019\/11\/maxresdefault-1024x576.jpg"
},
Since I save selected img url as post meta "_og_image", I achieved it.
BUT! For correct displaying data in Gutenberg I need also somewhere to save the image Id. Then It will allow me to do not load large version of selected image but choose the small one. Also when I have the Id I can pre-select currently used image in media libray.
So to where am I supposed to save the Id? I find stupid to create another meta for this purpose.
本文标签: block editorWhere to save Gutenberg plugin data
版权声明:本文标题:block editor - Where to save Gutenberg plugin data? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744744986a2622821.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论