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

How to integrate plugins into block editor

programmeradmin0浏览0评论

I have implemented some plugins, that are all based on adding shortcodes. At the end, the plugin renders directly HTML code, including needed JavaScript.

I would like to add now the possibility to include that plugin usage as a customized block. So instead of writing [pgnv id=id1 theme=theme1 ...]...[/pgnv], I would like to add a block named pgnv that allows the user to enter all necessary attributes into a form. This would be much easier to use, and I could provide some hints like default values, drop-downs for selections, ...

What is the right way to do that based on the following goals:

  • I would like to bundle that to the plugin, so that a wordpress admint that install the plugin has the old way (html code) and new way to use it.
  • I would like to invest as less as possible.
  • If possible it should be implemented without the dependency to additional plugins.
发布评论

评论列表(0)

  1. 暂无评论