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.