Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#17576 closed defect (bug) (fixed)

Use get_post_format_strings() to generate get_post_format_slugs()

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

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 15 years ago.

Download all attachments as: .zip

Change History (4)

#1 @mfields
15 years ago

  • Cc michael@… added

#2 @ocean90
15 years ago

  • Milestone Awaiting Review3.2

This was for PHP4 compat, see r17403.

#3 @ryan
15 years ago

  • Owner set to ryan
  • Resolutionfixed
  • Status newclosed

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.