#40642 closed enhancement (wontfix)
Add new filter to populate_options
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 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.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Hi all,
Thank 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 ticket was raised back in 1.5 this may have been different back 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 utilizing thedefault_option_{$option}filter offer more effective and widely applicable solutions. As of such I am going to close this ticket aswontfix, but if you have anything more to add to the discussion please feel free to reopen this ticket.