Configuring plugin options via INI file #10
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
We have a need to seed the plugin with configuration options prior to the plugin actually being installed. One way to do that is to run a bunch of database queries to insert the relevant key/value pairs into the options table. However, this PR provides an alternative by allowing site admins to configure the plugin options in
options.ini
ahead of time. When the plugin is installed, those options are picked up and override the existing defaults.As its name implies, the
options.ini
file is completely optional, so if the file does not exist, the default options will be generated by the plugin as per usual and existing plugin clients will not be impacted by the change.Any thoughts @dicksonlaw583? We intend to use this functionality in our ansible playbooks to pre-seed the options on a per-site basis since we have a bunch of sites we're managing that will use this plugin.
P.S. This is a fantastic plugin, so thank you for all your work on this!