Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#48346 closed defect (bug) (fixed)

WP_Customize_Section::__construct() is missing `$args` documentation

Reported by: marekdedic's profile marekdedic Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: minor Version: 5.2
Component: Customize Keywords: good-first-bug has-patch needs-refresh
Focuses: docs Cc:


Documentation for the fields of the $args argument is missing:

I believe a good starting point would be the documentation of WP_Customize_Manager::add_section():

Although I am not sure about the correctness of what's in there. But from the implementation of add_panel, I'd say they should match.

As per, there should only be a @see comment in add_section and the documentation should be in the constructor I believe.

Attachments (2)

48346.patch (3.6 KB) - added by amolv 4 years ago.
48346.1.patch (3.6 KB) - added by amolv 4 years ago.

Download all attachments as: .zip

Change History (11)

#1 @marekdedic
4 years ago

Also, I believe the type of theme_supports could be narrowed from string|array to string|string[] ;)

#2 @johnbillion
4 years ago

  • Keywords needs-patch good-first-bug added

#3 @desrosj
4 years ago

  • Milestone changed from Awaiting Review to 5.4

4 years ago

4 years ago

#4 @amolv
4 years ago

  • Keywords has-patch added; needs-patch removed

48346.1.patch to add documetation to WP_Customize_Section::__construct() and reference to WP_Customize_Manager::add_section.

Last edited 4 years ago by SergeyBiryukov (previous) (diff)

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

4 years ago

#6 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

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

4 years ago

#8 @kirasong
4 years ago

  • Keywords needs-refresh added

We took a look at this in triage, and it looks like the patch no longer applies, so marking it as needs-refresh.

#9 @SergeyBiryukov
4 years ago

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

In 47386:

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

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

Props amolv, marekdedic.
Fixes #48346.

Note: See TracTickets for help on using tickets.