Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#36336 closed defect (bug) (fixed)

Update docblock for get_header_textcolor() and header_textcolor()

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

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 11 years ago.
36336.2.diff​ (722 bytes ) - added by DrewAPicture 11 years ago.
36336.2.2.diff​ (735 bytes ) - added by theMikeD 11 years ago.

Download all attachments as: .zip

Change History (13)

@theMikeD
11 years ago

#1 @DrewAPicture
11 years ago

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

#2 @DrewAPicture
11 years ago

  • Keywords commit added
  • Milestone Future Release → 4.5
  • Type enhancement → defect (bug)

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

#3 @azaozz
11 years ago

Sure, docs look good :)

#4 @DrewAPicture
11 years ago

  • Resolution → fixed
  • Status reviewing → 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
11 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
11 years ago

  • Keywords commit removed
  • Milestone 4.5 → Future Release
  • Resolution fixed
  • Status closed → 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
11 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 11 years ago by theMikeD (previous) (diff)

@theMikeD
11 years ago

#8 @DrewAPicture
11 years ago

  • Version trunk

#9 @SergeyBiryukov
10 years ago

  • Milestone Future Release → 4.8

#10 @SergeyBiryukov
10 years ago

  • Resolution → fixed
  • Status reopened → 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.