WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 5 weeks ago

Last modified 5 weeks ago

#48343 closed defect (bug) (fixed)

$args documentation for WP_Customize_Control::__construct() and WP_Customize_Manager::add_control() don't match

Reported by: marekdedic Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: minor Version: 5.3
Component: Customize Keywords: good-first-bug has-patch 2nd-opinion
Focuses: docs Cc:

Description

I believe the $args parameter should be the same for both methods, given how add_control() just calls the constructor.

https://developer.wordpress.org/reference/classes/wp_customize_control/__construct/

https://developer.wordpress.org/reference/classes/wp_customize_manager/add_control/

Attachments (1)

48343.diff (4.7 KB) - added by hAmpzter 5 months ago.
Updated WP_Customize_Manager::add_control args-documentation to be equal to WP_Customize_Control::construct

Download all attachments as: .zip

Change History (6)

#1 @desrosj
6 months ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to 5.4

This ticket was mentioned in Slack in #core by sergey. View the logs.


5 months ago

@hAmpzter
5 months ago

Updated WP_Customize_Manager::add_control args-documentation to be equal to WP_Customize_Control::construct

#3 @hAmpzter
5 months ago

  • Keywords has-patch 2nd-opinion added; needs-patch removed

#4 @SergeyBiryukov
5 weeks ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 47364:

Docs: Add a reference to WP_Customize_Control::__construct() for information on accepted arguments in WP_Customize_Manager::add_control().

Synchronize the documentation between two places, use WP_Customize_Control::__construct() as the canonical source.

Props hAmpzter, marekdedic, SergeyBiryukov.
Fixes #48343.

#5 @SergeyBiryukov
5 weeks ago

In 47382:

Docs: Add a @see reference to WP_Customize_Control::__construct() in child class constructors.

Follow-up to [47363], [47364].

See #48343, #48348.

Note: See TracTickets for help on using tickets.