WordPress.org

Make WordPress Core

Opened 8 weeks ago

Last modified 7 weeks ago

#48346 reviewing defect (bug)

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

Reported by: marekdedic Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: minor Version: 5.2
Component: Customize Keywords: good-first-bug has-patch
Focuses: docs Cc:
PR Number:

Description

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

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

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

https://developer.wordpress.org/reference/classes/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 https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#1-1-parameters-that-are-arrays, 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 8 weeks ago.
48346.1.patch (3.6 KB) - added by amolv 8 weeks ago.

Download all attachments as: .zip

Change History (8)

#1 @marekdedic
8 weeks ago

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

#2 @johnbillion
8 weeks ago

  • Keywords needs-patch good-first-bug added

#3 @desrosj
8 weeks ago

  • Milestone changed from Awaiting Review to 5.4

@amolv
8 weeks ago

@amolv
8 weeks ago

#4 @amolv
8 weeks 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 7 weeks ago by SergeyBiryukov (previous) (diff)

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


7 weeks ago

#6 @SergeyBiryukov
7 weeks ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.