Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#48348 closed defect (bug) (fixed)

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

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
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 5 years ago.
adding documentation
48348.1.patch (6.1 KB) - added by Marcio Zebedeu 5 years ago.
adding documentation

Download all attachments as: .zip

Change History (11)

#1 @marekdedic
5 years 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
5 years ago

  • Keywords needs-patch good-first-bug added

#3 @desrosj
5 years ago

  • Milestone changed from Awaiting Review to 5.4

@Marcio Zebedeu
5 years ago

adding documentation

@Marcio Zebedeu
5 years ago

adding documentation

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


5 years ago

#5 @SergeyBiryukov
5 years ago

  • Keywords has-patch added; needs-patch removed

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


5 years ago

#7 @SergeyBiryukov
5 years ago

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

#8 @SergeyBiryukov
5 years 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
5 years 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.