Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#17576 closed defect (bug) (fixed)

Use get_post_format_strings() to generate get_post_format_slugs()

Reported by: mfields's profile mfields Owned by: ryan's profile ryan
Milestone: 3.2 Priority: normal
Severity: normal Version: 3.2
Component: Taxonomy Keywords: has-patch dev-feedback
Focuses: Cc:

Description

Dynamically generate the array returned by get_post_format_slugs() as suggested by inline documentation in /wp-includes/post.php "3.2-early: use array_combine() and array_keys( get_post_format_strings() )".

Attachments (1)

17576.dynamic-get-post-format-slugs.diff (964 bytes) - added by mfields 14 years ago.

Download all attachments as: .zip

Change History (4)

#1 @mfields
14 years ago

  • Cc michael@… added

#2 @ocean90
14 years ago

  • Milestone changed from Awaiting Review to 3.2

This was for PHP4 compat, see r17403.

#3 @ryan
14 years ago

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

In [18083]:

Use array_combine() to avoid a hard-coded copy of the post format slugs. Props mfields. fixes #17576

Note: See TracTickets for help on using tickets.