WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 18 months ago

#36336 closed defect (bug) (fixed)

Update docblock for get_header_textcolor() and header_textcolor()

Reported by: theMikeD Owned by: DrewAPicture
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-patch
Focuses: docs Cc:

Description

These two functions return the colour in HEX but that is not indicated in the docblock. Since we are pulling the docs from code, this should be added.

Attachments (3)

36336.diff (695 bytes) - added by theMikeD 2 years ago.
36336.2.diff (722 bytes) - added by DrewAPicture 2 years ago.
36336.2.2.diff (735 bytes) - added by theMikeD 2 years ago.

Download all attachments as: .zip

Change History (13)

@theMikeD
2 years ago

#1 @DrewAPicture
2 years ago

  • Component changed from General to Themes
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Owner set to DrewAPicture
  • Status changed from new to reviewing

@DrewAPicture
2 years ago

#2 @DrewAPicture
2 years ago

  • Keywords commit added
  • Milestone changed from Future Release to 4.5
  • Type changed from enhancement to defect (bug)

@azaozz Can you please review the changes in 36336.2.diff?

#3 @azaozz
2 years ago

Sure, docs look good :)

#4 @DrewAPicture
2 years ago

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

In 37083:

Docs: Improve the DocBlocks for get_header_textcolor() and header_textcolor() to mention that they both retrieve color values in the HEX format.

Props theMikeD.
Fixes #36336.

#5 follow-up: @swissspidy
2 years ago

I don't really like HEX format (why uppercase anyway?). 6-digit hexadecimal form sounds much better. See twentyfifteen_hex2rgb() for an example.

#6 in reply to: ↑ 5 @DrewAPicture
2 years ago

  • Keywords commit removed
  • Milestone changed from 4.5 to Future Release
  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to swissspidy:

I don't really like HEX format (why uppercase anyway?). 6-digit hexadecimal form sounds much better. See twentyfifteen_hex2rgb() for an example.

I can get on board with "hexadecimal form" or similar. Do hex colors always save as 6 digits? I seem to recall a case where a default could be supplied as 3-digits and return as such, might've been fixed.

#7 @theMikeD
2 years ago

Are letters considered digits in hex format?

3 vs 6: I thinks it good to specify that it returns 6 since 3 is valid in other contexts.

Last edited 2 years ago by theMikeD (previous) (diff)

@theMikeD
2 years ago

#8 @DrewAPicture
2 years ago

  • Version trunk deleted

#9 @SergeyBiryukov
18 months ago

  • Milestone changed from Future Release to 4.8

#10 @SergeyBiryukov
18 months ago

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

In 39888:

Docs: After [37083], change "HEX format" to "3- or 6-digit hexadecimal form" for clarity.

Props swissspidy, theMikeD.
Fixes #36336.

Note: See TracTickets for help on using tickets.