[wp-trac] [WordPress Trac] #40642: Add new filter to populate_options

WordPress Trac noreply at wordpress.org
Fri Jul 4 13:20:36 UTC 2025


#40642: Add new filter to populate_options
------------------------------------+------------------------------
 Reporter:  spacedmonkey            |       Owner:  (none)
     Type:  enhancement             |      Status:  closed
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Options, Meta APIs      |     Version:  1.5
 Severity:  normal                  |  Resolution:  wontfix
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------
Changes (by callumbw95):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/40642#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list