Opened 2 years ago
Closed 23 months ago
#3575 closed Enhancement (duplicate)
default values for plugin settings
| Reported by: | bencc | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Needs Review |
| Component: | Core | Version: | 1.8 Beta |
| Severity: | minor | Keywords: | plugin, settings |
| Cc: | brett@… | Difficulty: |
Description
It will be useful to be able to define default values for plugin settings in a text file, maybe the manifest.xml.
It will also be good to be able to optionally define a default value when looking for a plugin setting:
get_plugin_setting($name, $plugin, $defaultValue)
Change History (2)
comment:1 Changed 2 years ago by cash
comment:2 Changed 23 months ago by cash
- Resolution set to duplicate
- Status changed from new to closed
duplicate of #3000
Note: See
TracTickets for help on using
tickets.

I really like the default value idea in get_plugin_setting() since it works like other Elgg functions.
In 1.8, we added the ability to define a function that is run when the plugin is enabled. That's the best place to initialize plugin settings.