-
Notifications
You must be signed in to change notification settings - Fork 18
Deleting theme doesn't remove auto-update preference #30
Comments
Thinking that not removing the autoupdate setting on deleting a theme or plugin is the proper way here. Themes and plugins may be deleted as part of trying to fix some issue, then they are immediately reinstalled. Removing/resetting the autoupdate option wouldn't be a good idea in these cases. IMHO it would be better to "reset/clean up" the autoupdate array each time a theme or plugin is added or removed. |
That's a good point; although I can see the site option getting very big without it.
That's already done in a number of places, I'll double check that it's done everywhere it should be. |
Not necessarily. Example: site with 50 plugins; deleting 10 plugins will leave the autoupdates array as-is, lets say 30 elements. Installing 5 new plugins will not update the array, still 30. Then the first time the autoupdate setting is changed, the array will be reset. It will never go over the max number of installed plugins.
Yeah, this already happens as far as I see. |
Cleaning the array when a setting is changed seems to be the best. A test should ensure the settings array only contains installed plugins after a change. This will then work (preserve the setting), as long av user does not change any such setting between deleting and reinstallling a (set of) theme/plugin(s). |
This is the same as in audrasjb/wp-autoupdates#29, but with themes on single site. We need the hook from https://core.trac.wordpress.org/ticket/14955 before we can do this.
The text was updated successfully, but these errors were encountered: