WordPress / wp-autoupdates

Feature plugin building a UI for opting-in to plugin, theme, and core auto-updates.
https://wordpress.org/plugins/wp-autoupdates/
GNU General Public License v2.0
57 stars 18 forks source link

Self-deactivate the plugin after the functionality has been merged to core #123

Closed azaozz closed 4 years ago

azaozz commented 4 years ago

This will depend on where the functions are added in core.

If they are in wp-admin/includes/*, they are loaded after plugins are loaded, so the plugin cannot check if they exist before loading. In this case the function names from the plugin cannot be reused for core (results in fatal error). Adding the two or three functions to wp-admin/includes/update.php seems to make sense. The current code in this PR is for this case.

If they are in wp-includes/* the existing method would work. The check whether plugins and themes auto-updating is (globally) enabled may be in wp-includes/update.php.

In both of the above cases some updates to the code in wp-autoupdates.php would be needed.

azaozz commented 4 years ago

Just a note that this is not ready for merging. The changes will need update and review after the core patch is ready (the new core function's places and names are known).

pbiron commented 4 years ago

Just a note that this is not ready for merging. The changes will need update and review after the core patch is ready (the new core function's places and names are known).

Just marked this as Draft just to be safe.

pbiron commented 4 years ago

@azaozz this is now ready to review

azaozz commented 4 years ago

Looks good.