Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#44893 closed enhancement (fixed)

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

Reported by: flixos90's profile flixos90 Owned by: flixos90's profile 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 6 years ago.

Download all attachments as: .zip

Change History (7)

#1 @flixos90
6 years ago

  • Focuses multisite added

@flixos90
6 years ago

#2 @flixos90
6 years ago

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

#3 @flixos90
6 years 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
6 years 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
6 years 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
6 years 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.