Add cache_enabler_settings_before_validation as a new filter to allow settings to be filtered before validation. The system settings, such as version and use_trailing_slashes, cannot be overwritten. This will allow any user setting to be forced, providing the ability to overwrite the plugin settings. This partially adds support for what was requested in PR #173, which provides a couple examples for when this will be useful, and then later discussed in #286 (thanks @ouun). Here is an example of how this can be used:
This also updates Cache_Enabler::upgrade_settings() to remove incl_attributes when upgrading from a version that contained this setting before version 1.4. This somehow was never noticed until adding this filter. This does not change any behavior because it would have been dropped and never saved due to the settings validation. We remove it beforehand when upgrading the settings to more or less keep record of what has changed.
Add
cache_enabler_settings_before_validation
as a new filter to allow settings to be filtered before validation. The system settings, such asversion
anduse_trailing_slashes
, cannot be overwritten. This will allow any user setting to be forced, providing the ability to overwrite the plugin settings. This partially adds support for what was requested in PR #173, which provides a couple examples for when this will be useful, and then later discussed in #286 (thanks @ouun). Here is an example of how this can be used:This also updates
Cache_Enabler::upgrade_settings()
to removeincl_attributes
when upgrading from a version that contained this setting before version 1.4. This somehow was never noticed until adding this filter. This does not change any behavior because it would have been dropped and never saved due to the settings validation. We remove it beforehand when upgrading the settings to more or less keep record of what has changed.