WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#38611 closed enhancement (fixed)

Clarify why get_post_format_slugs() calls array_combine()

Reported by: danielbachhuber Owned by: DrewAPicture
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: Post Formats Keywords: has-patch
Focuses: docs Cc:

Description

Discovered from #38610

Attachments (1)

38611.1.diff (488 bytes) - added by danielbachhuber 5 years ago.

Download all attachments as: .zip

Change History (6)

#1 @danielbachhuber
5 years ago

  • Focuses docs added
  • Keywords has-patch added; needs-patch removed
  • Type changed from defect (bug) to enhancement

Actually, maybe not unnecessarily:

I don't think I wrote this but I did review it. Gives you an array of slugs with the slugs as keys. Helpful! (at the time)

#2 @danielbachhuber
5 years ago

  • Summary changed from get_post_format_slugs() unnecessarily calls array_combine() to Clarify why get_post_format_slugs() calls array_combine()

#3 @betzster
5 years ago

Related: #17576

#4 @DrewAPicture
4 years ago

  • Milestone changed from Awaiting Review to 4.9

#5 @DrewAPicture
4 years ago

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

In 41284:

Docs: Improve the return description for get_post_format_slugs() to note that the array contains slugs as both keys and values.

Props danielbachhuber.
Fixes #38611.

Note: See TracTickets for help on using tickets.