#48347 closed defect (bug) (fixed)
WP_Customize_Setting::__construct() is missing `$args` documentation
| Reported by: | marekdedic | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.4 |
| Component: | Customize | Version: | 5.2 |
| Severity: | minor | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: | docs |
Description
Documentation for the fields of the $args argument is missing:
https://developer.wordpress.org/reference/classes/wp_customize_setting/__construct/
I believe a good starting point would be the documentation of WP_Customize_Manager::add_setting():
https://developer.wordpress.org/reference/classes/wp_customize_manager/add_setting/
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_setting and the documentation should be in the constructor I believe.
Attachments (1)
Change History (10)
This ticket was mentioned in Slack in #core by sergey. View the logs.
7 years ago
#5
@
7 years ago
- Keywords has-patch added; needs-patch removed
Hello, I'm a first time contributor so please review and let me know if anything else needs to be done.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Also, I believe the type of theme_supports could be narrowed from
string|arraytostring|string[];)