Feature Proposal: Add a lateInitPlugin() handler for plugins
Motivation
Plugins are initialized in two steps, first calling
earlyInitPlugin()
, then
initPlugin()
but we are missing a
lateInitPlugin()
. This is required for plugins
that have to wait until all other plugins have been initialized and then will require some final initialization steps.
The most prominent implementation will be a
lateInitPlugin()
in
JQueryPlugin. It will iterate over all loaded jQuery modules and combine some of their assets into one (separate proposal).
As most plugins either use
LocalSite.cfg
or
initPlugin()
to register their additional jQuery modules, will some of them not be registered yet in
JQueryPlugin's
initPlugin()
.
Description and Documentation
This will dispatch all
lateInitPlugin
handlers when plugins have been fully initialized. This change touches the files Foswiki::Plugin(s).pm.
We will have to increment the API version from 2.4 to 2.5 in distro and master branch. Master branch had its api already incremented to 2.5 for other reasons.
This will then make room for 2.5 by moving its number from 2.5 to 2.6 (Foswiki::Request subtypes)
Impact
Implementation
--
Contributors: MichaelDaum - 24 Oct 2023
Discussion