Make WordPress Core

Opened 13 months ago

Closed 5 months ago

Last modified 5 months ago

#58049 closed defect (bug) (fixed)

Add default value to the @param tag for the constructor in /wp-admin/includes/class-custom-image-header.php

Reported by: faisalahammad's profile faisalahammad Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.5 Priority: normal
Severity: normal Version: 6.3
Component: General Keywords: has-patch changes-requested
Focuses: coding-standards Cc:

Description

WordPress coding standard recommends adding default values to the @param tag for functions that have default values for parameters. In the /wp-admin/includes/class-custom-image-header.php file, the constructor function has a parameter named $admin_image_div_callback, but there is no default value mentioned in the @param tag.

Change History (7)

This ticket was mentioned in PR #4283 on WordPress/wordpress-develop by @faisalahammad.


13 months ago
#1

  • Keywords has-patch added; needs-patch removed

I added "Default false" to the @param tag for the $admin_image_div_callback parameter, so that it is clear to developers that this parameter is optional and its default value is false.

Trac ticket: 58049

#2 @cadic
13 months ago

@faisalahammad I've added a review to the PR, looks like we need to change $admin_image_div_callback parameter, but another parameter was updated in the code.

#3 @cadic
13 months ago

  • Keywords changes-requested added

#4 @faisalahammad
13 months ago

Thank you @cadic
I've made changes and sent another PR.

Could you please check and let me know how that goes?

#5 @SergeyBiryukov
5 months ago

  • Milestone changed from Awaiting Review to 6.5

#6 @SergeyBiryukov
5 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 57169:

Docs: Improve documentation for Custom_Image_Header and Custom_Background constructors.

Follow-up to [4673], [8656], [12890], [13041].

Props faisalahammad, cadic.
Fixes #58049.

@SergeyBiryukov commented on PR #4283:


5 months ago
#7

Thanks for the PR! Merged in r57169.

Note: See TracTickets for help on using tickets.