-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin/theme auto-update improvements #97
Conversation
Because the `true` and `default` conditions are the same, we can omit the one for `true` and allow the `default` to handle the scenario.
…options. The plugin includes an option to blanket enable or disable auto-updates for plugins and/or themes. When either option is disabled, the user is able to manage auto-update settings on an individual basis using the default interface in WordPress Core introduced in version 5.5. This works great when the plugin is active, but if the plugin is deactivated or removed, plugin/theme auto-updates are also wholesale turned off and the corresponding settings in Bluerock have no affect (they currently update the option key specific to this plugin and not the default WordPress Core option). This updates the logic in the plugin to update the default WordPress Core auto-update settings for plugins and themes any time: - a plugin or theme is installed, deleted, or updated. - the plugin or theme auto-update setting is toggled. When either of those two settings are toggled off, the Core option is not updated. This ensures all plugins and themes continue to receive auto-updates unless the user explicitly disables them on the plugin or theme page. Bluerock and the installer scripts will soon be updated to also sync the default WordPress Core options to ensure auto-updates are appropriately applied even when the Bluehost plugin is disabled or removed.
I added a comment to one of the functions I wanted to collect thoughts so it can get discussed in context. Another thing that is still missing from this is an upgrade routine for when the next version of the plugin is released. I have not tested it, but it's possible that the plugin list will get updated automatically. The plugin would be installed with a plugin update, so it may fire the Regardless, the theme list would not be updated. If we want both options to be updated when the new plugin version is installed, there are two options:
|
Returning to this after the weekend, it seems to make the most sense to just update the options on update. There are only 2, and it's not an intensive update, so making sure the Core and plugin options are in sync is best. I added an update routing assuming we would release this in a version |
Proposed changes
The plugin includes an option to blanket enable or disable auto-updates for plugins and/or themes. When either option is disabled, the user is able to manage auto-update settings on an individual basis using the default interface in WordPress Core introduced in version 5.5.
This works great when the plugin is active, but if the plugin is deactivated or removed, plugin/theme auto-updates are also wholesale turned off and the corresponding settings in Bluerock have no affect (they currently update the option key specific to this plugin and not the default WordPress Core option).
This updates the logic in the plugin to update the default WordPress Core auto-update settings for plugins and themes any time:
When either of those two settings are toggled off, the Core option is not updated. This ensures all plugins and themes continue to receive auto-updates unless the user explicitly disables them on the plugin or theme page.
Bluerock and the installer scripts will soon be updated to also sync the default WordPress Core options to ensure auto-updates are appropriately applied even when the Bluehost plugin is disabled or removed.
Type of Change
Checklist