[wp-trac] [WordPress Trac] #28694: Provide a clean way for Plugins to run update scripts for MultiSite
WordPress Trac
noreply at wordpress.org
Mon Jun 30 18:54:34 UTC 2014
#28694: Provide a clean way for Plugins to run update scripts for MultiSite
--------------------------------+-----------------------------
Reporter: MadtownLems | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: 3.9.1
Severity: normal | Keywords:
Focuses: multisite |
--------------------------------+-----------------------------
It's commonly accepted that, if a plugin needs to run a script after
updating (such as to modify the database or its settings stored within),
that it should do so hooking into admin_init, checking its version number
against a database-stored version number, and making adjustments if
needed. This works relatively well for single site, only temporarily
failing when the plugin is updated through SVN /ftp, and immediately being
addressed as soon as any dashboard page is visited.
However, this can often be a much larger issue in MultiSite.
In many MultiSite instances, there will be sites who won't have their
dashboards logged into for extended periods of time (sometimes even
years), meaning that using admin_init to check for running such an update
is impractical.
While hooking onto admin_init AND init would likely solve the issue, it
feels like an excessive amount of additional processing (by EVERY plugin
on EVERY page load).
I believe that this is an issue that MultiSite needs to address, as
currently, plugin authors who use the suggested admin_init method to
maybe_update are at risk of major failings in sites using their plugins as
part of a network.
(The closest related ticket I found was
https://core.trac.wordpress.org/ticket/14912, and it's 4 years old and has
no mention of the more serious MultiSite implications.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28694>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list