Make WordPress Core

Opened 9 years ago

Closed 5 months ago

Last modified 5 months ago

#40642 closed enhancement (wontfix)

Add new filter to populate_options

Reported by: spacedmonkey's profile spacedmonkey 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)

40642.diff (11.8 KB) - added by spacedmonkey 9 years ago.

Download all attachments as: .zip

Change History (4)

@spacedmonkey
9 years ago

#1 @spacedmonkey
9 years ago

  • Keywords has-patch dev-feedback added

#2 @callumbw95
5 months ago

  • Resolution set to wontfix
  • Status changed from new to closed

Hi all,

Thank you for the proposal to add a pre_populate_options filter. After careful review and discussion, it's evident that the populate_options() function, where this filter would be located, is executed very infrequently—primarily only during a fresh WordPress installation or if the alloptions cache 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 as add_option( 'your_option_name', 'default_value', '', 'yes' ) or utilizing the default_option_{$option} filter offer more effective and widely applicable solutions. As of such I am going to close this ticket as wontfix, but if you have anything more to add to the discussion please feel free to reopen this ticket.

#3 @peterwilsoncc
5 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.