-
Notifications
You must be signed in to change notification settings - Fork 18
Self-deactivate the plugin after the functionality has been merged to core #123
Conversation
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 |
@azaozz this is now ready to review |
Looks good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pbiron you removed wp_auto_update_uninstall
function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
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 towp-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 inwp-includes/update.php
.In both of the above cases some updates to the code in
wp-autoupdates.php
would be needed.