Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#48344 closed defect (bug) (fixed)

WP_Customize_Panel::__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: needs-patch good-first-bug
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_panel():

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.

Attachments (2) (724 bytes) - added by iaaxpage 4 years ago.
Patch with the arguments for the constructor
48344.diff (1.3 KB) - added by iaaxpage 4 years ago.
Arguments for the constructor

Download all attachments as: .zip

Change History (10)

#1 @marekdedic
4 years ago

Also, I believe the type of theme_supports should be string|string[] instead of just string|array ;)

#2 @marekdedic
4 years ago

  • Summary changed from WP_Customize_Panel::__construct() is missing $args documentation to WP_Customize_Panel::__construct() is missing `$args` documentation

Also, as per, I believe in WP_Customize_Manager::add_panel(), the arguments shouldn't be explicitly documented, just with a @see...

#3 @desrosj
4 years ago

  • Milestone changed from Awaiting Review to 5.4

#4 @desrosj
4 years ago

  • Keywords needs-patch good-first-bug added

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

4 years ago

4 years ago

Patch with the arguments for the constructor

4 years ago

Arguments for the constructor

#7 @SergeyBiryukov
4 years ago

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

#8 @SergeyBiryukov
3 years ago

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

In 47387:

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

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

Props iaaxpage, marekdedic.
Fixes #48344.

Note: See TracTickets for help on using tickets.