Hi @alexwpec,
That’s interesting, but unfortunately I can’t think of a way to do that with Block Lab.
I successfully combined Block Lab with Global site variable plugin. Possibly if it is something as a wrapper that return just ready html?
Hi @sirius123,
Ah, interesting. What’s the ‘Global site variable plugin’?
I mean https://wordpress.org/plugins/custom-global-variables/
If content of the block lab block is presented in the editor dynamically, this content to be transferred to the shortcode, in which first parameter is the name of the block, and next parameters to be names of the block.
or function that return/fill given global variable from the plugin from above with the result of the HTML generated by function that take as parameter array with block name and respective fields names and it values.
Sample:
If we have in the editor
<!– wp:block-lab/mysection {“header”:”Do you want shortcode?”, “text”:”\u003cp\u003e some formated text here\u003c/p\u003e”} /–>
to have similar API as wpBlockLabCallBack(“mysection”,….. ); which to be called in the relative shortcode function
This is just a hints.
-
This reply was modified 2 months ago by
sirius123.
-
This reply was modified 2 months ago by
sirius123.
Ah, that’s interesting.
Like you mentioned:
to have similar API as wpBlockLabCallBack(“mysection”,….. ); which to be called in the relative shortcode function
That could be a useful way to use blocks outside of only content areas.
Unfortunately, we have a lot on our plate now 🙂 But that could be a useful feature.