Closed azaozz closed 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 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.
@azaozz this is now ready to review
Looks good.
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.