WordPress.org

Make WordPress Core

Opened 13 months ago

Closed 9 months ago

#44893 closed enhancement (fixed)

Add support for an optional `$options` parameter to `populate_options()`

Reported by: flixos90 Owned by: flixos90
Milestone: 5.1 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch has-unit-tests
Focuses: multisite Cc:

Description

It should be possible to provide custom options to populate_options() when populating a new site with their options. This came up during work on #41333.

Attachments (1)

44893.diff (5.6 KB) - added by flixos90 13 months ago.

Download all attachments as: .zip

Change History (7)

#1 @flixos90
13 months ago

  • Focuses multisite added

@flixos90
13 months ago

#2 @flixos90
13 months ago

  • Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed

#3 @flixos90
13 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 43627:

Upgrade/Install: Add support for an optional $options parameter to populate_options().

Fixes #44893. See #41333.

#4 @johnbillion
13 months ago

Minor issue: The options merging can use array_merge() instead of wp_parse_args() as we're only dealing with arrays. The argument order needs to be reversed though.

#5 @flixos90
12 months ago

  • Milestone changed from 5.0 to 5.1
  • Resolution fixed deleted
  • Status changed from closed to reopened

Version numbers need to be adjusted to 5.1.0.

#6 @pento
9 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 44448:

Docs: Update @since for the optional $options parameter to populate_options().

Fixes #44893.

Note: See TracTickets for help on using tickets.