[wp-trac] [WordPress Trac] #42033: Allow automatic installation and updates for drop-in plugins

WordPress Trac noreply at wordpress.org
Fri Sep 29 12:29:17 UTC 2017


#42033: Allow automatic installation and updates for drop-in plugins
-------------------------+-----------------------------
 Reporter:  johnbillion  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Plugins      |    Version:
 Severity:  normal       |   Keywords:  2nd-opinion
  Focuses:               |
-------------------------+-----------------------------
 Plugins which provide drop-in functionality for advanced caching and
 database drivers (eg. `wp-content/advanced-cache.php`, `wp-
 content/db.php`) always require a manual step from the user during
 installation to move the corresponding file into the root of the `wp-
 content` directory.

 Such plugins also cannot take advantage of automatic updates, as the user
 is still required to perform this manual step after the update.

 It should be possible for such a plugin to specify a header which tells
 WordPress this file is a drop-in plugin. During installation or an update,
 the presence of such a header would cause WordPress to automatically copy
 the file into the `wp-content` directory according to some rules:

 * During installation, copy the file over if a file of the same name does
 not already exist.
 * During an update, copy the file over only if a file of the same name and
 with the same plugin name already exists.
 * Only allow the header to be present on files supported by
 `_get_dropins()`.

 The header could look like this:

 {{{
 /*
 Plugin Name: My Database Class
 Drop-in: true
 */
 }}}

 This syntax resembles the `Network: true` syntax for plugins which can
 only be network-activated when Multisite is in use.

 Some plugins (eg. W3 Total Cache) contain multiple drop-ins which are only
 put into place when the corresponding module is enabled. Such plugins
 would continue to operate as they currently do, without specifying the
 `Drop-in: true` header.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42033>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list