WordPress.org

Make WordPress Core

#51450 closed defect (bug) (fixed)

Incorrect @since value for add_allowed_options()

Reported by: coffee2code Owned by: SergeyBiryukov
Milestone: 5.6 Priority: low
Severity: trivial Version: 5.5
Component: Options, Meta APIs Keywords: has-patch
Focuses: docs Cc:

Description

In [48121] for WP 5.5, add_option_whitelist() was deprecated and renamed to add_allowed_options(). However, the @since documentation value for the new function was not updated to "5.5.0". The pre-existing value of "2.7.0" only properly applies to add_option_whitelist() and gives the mistaken impression that add_allowed_options() was available for use prior to 5.5.

This looks to just be an oversight as the similar remove_option_allowed_list() (which replaced remove_option_whitelist() in the same commit) has its @since value updated.

Patch attached.

Attachments (1)

51450.diff (383 bytes) - added by coffee2code 14 months ago.
Patch mentioned in ticket.

Download all attachments as: .zip

Change History (3)

@coffee2code
14 months ago

Patch mentioned in ticket.

#1 @SergeyBiryukov
14 months ago

  • Milestone changed from Awaiting Review to 5.6
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#2 @SergeyBiryukov
14 months ago

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

In 49096:

Docs: Correct @since version for add_allowed_options().

Follow-up to [48121].

Props coffee2code.
Fixes #51450.

Note: See TracTickets for help on using tickets.