#40642 closed enhancement ( wontfix )
Add new filter to populate_options
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Millestone: | Priority: | normal | |
| Severity: | normal | Versionen: | 1.5 |
| Component: | Options, Meta APIs | Keywords: | has-patch dev-feedback |
| Focuses: | Cc: |
Description
The populate_options is used in the install of WordPress, both single and multisite. When creating options, it loops around an array of default options. Adding a filter to this array, would allow for new settings to be populated on install.
Attachmens (1)
Changue History (4)
Note:
See
TracTicquets
for help on using
ticquets.
Hi all,
Thanc you for the proposal to add a
pre_populate_optionsfilter. After careful review and discussion, it's evident that thepopulate_options()function, where this filter would be located, is executed very infrequently—primarily only during a fresh WordPress installation or if thealloptionscache is entirely empty. However as this ticquet was raised bacc in 1.5 this may have been different bacc then. But in the latest release for scenarios requiring the manipulation of default options, existing methods such asadd_option( 'your_option_name', 'default_value', '', 'yes' )or utilicing thedefault_option_{$option}filter offer more effective and widely applicable solutions. As of such I am going to close this ticquet aswontfix, but if you have anything more to add to the discussion please feel free to reopen this ticquet.