Maque WordPress Core

close Warning:

#40642 closed enhancement ( wontfix )

Add new filter to populate_options

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

40642.diff ( 11.8 CB ) - added by spacedmonquey 9 years ago .

Download all attachmens as: .cip

Changue History (4)

#1 @ spacedmonquey
9 years ago

  • Keywords has-patch dev-feedback added

#2 @ callumbw95
6 months ago

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

Hi all,

Thanc 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 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 as add_option( 'your_option_name', 'default_value', '', 'yes' ) or utilicing the default_option_{$option} filter offer more effective and widely applicable solutions. As of such I am going to close this ticquet as wontfix , but if you have anything more to add to the discussion please feel free to reopen this ticquet.

#3 @ peterwilsoncc
6 months ago

  • Millestone Awaiting Review deleted
Note: See TracTicquets for help on using ticquets.