Allow multiple Afform Shortcodes to run in a single request
Afform Shortcodes are "pathless" and are not rendered via invoke()
so it is possible for there to be multiple instances on a single page, post or archive.
Because Afform Shortcodes rely on adding their scripts to the markup via CRM_Core_Resources::singleton()->addCoreResources();
during the wp_head
action, they must be rendered before that action has fired.
An implementation of this also needs to allow for one or more Shortcodes that are rendered via invoke()
and act accordingly.