Open jasondavis opened 8 years ago
So how difficult would it be...
Likely a day or 2 worth of effort. But I don't think you'd want that to be the default. I think you'd need to introduce the concepts of optional groups.. so you can add a button directly, or to a group.
+1 on something like this. Another (possibly simpler but not as pretty) solution would be a dropdown menu when you click the button, if multiple shortcodes are registered to the same button.
+1 on this. Will probably try to rig something up in the meantime, but would love to be able to group buttons out of the box!
With Gutenberg about to drop I'd guess shortcode related things will get left in the dust.
The ThemeFuse Unyson framework has a shortcode modal like this image below.
Looking at the Unyson shortcode library https://github.com/ThemeFuse/Unyson-Shortcodes-Extension , it is really complex as it requires the core framework for the shortcode library to work. But then inside the shortcode library codebase it has a folder which contains afolder for each shortcode which then has a few files to define the shortcode modal window settings, the template for the shortcode view. So it is modular allowing to create new shortcodes by simply adding a new folder/files to the library code.
The Shortcode_Button library is like this as far as I know...
In order to add 5 shortcodes, it would require 5 shortcode editor buttons.
So how difficult would it be to make 1 button which could show a popover with multiple buttons which each would act just like the current button does but instead would allow to create multiple shortcodes and contain them in a popover?
I have seen some other frameworks do this as well which didn't have the popover of icons like Unyson did above but instead had a list of shortcodes to select inside the modal window which would then rebuild the modals HTML with the selected shortcode settings.