WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 6 weeks ago

Last modified 6 weeks ago

#48348 closed defect (bug) (fixed)

WP_Customize_Color_Control::__construct should link to parent constructor for $args

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:

Description

Currently, the fields of the $args argument are undocumented in WP_Customize_Color_Control::__construct(). I believe there should be a @see to the parent Ctor as per the handbook.

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

https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#1-1-parameters-that-are-arrays

Attachments (2)

48348.patch (5.9 KB) - added by Marcio Zebedeu 6 months ago.
adding documentation
48348.1.patch (6.1 KB) - added by Marcio Zebedeu 6 months ago.
adding documentation

Download all attachments as: .zip

Change History (11)

#1 @marekdedic
6 months ago

From what I can tell, this also hold for other controls, such as WP_Customize_Image_Control, WP_Customize_Media_Control, or WP_Customize_Upload_Control...

#2 @johnbillion
6 months ago

  • Keywords needs-patch good-first-bug added

#3 @desrosj
6 months ago

  • Milestone changed from Awaiting Review to 5.4

@Marcio Zebedeu
6 months ago

adding documentation

@Marcio Zebedeu
6 months ago

adding documentation

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


6 months ago

#5 @SergeyBiryukov
6 months ago

  • Keywords has-patch added; needs-patch removed

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


6 weeks ago

#7 @SergeyBiryukov
6 weeks ago

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

#8 @SergeyBiryukov
6 weeks ago

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

In 47363:

Docs: Add a reference to WP_Customize_Control::__construct() for information on accepted arguments to override class property defaults in child classes.

Props marcio-zebedeu, marekdedic.
Fixes #48348.

#9 @SergeyBiryukov
6 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.