From 13a399b1127698fd73a8cad8d482aef5b109f109 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 31 May 2011 19:52:38 +0000 Subject: [PATCH] Use array_combine() to avoid a hard-coded copy of the post format slugs. Props mfields. fixes #17576 git-svn-id: https://develop.svn.wordpress.org/trunk@18083 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 13751b0503..3c53624b28 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -5089,20 +5089,8 @@ function get_post_format_strings() { * @return array The array of post format slugs. */ function get_post_format_slugs() { - // 3.2-early: use array_combine() and array_keys( get_post_format_strings() ) - $slugs = array( - 'standard' => 'standard', // Special case. any value that evals to false will be considered standard - 'aside' => 'aside', - 'chat' => 'chat', - 'gallery' => 'gallery', - 'link' => 'link', - 'image' => 'image', - 'quote' => 'quote', - 'status' => 'status', - 'video' => 'video', - 'audio' => 'audio', - ); - return $slugs; + $slugs = array_keys( get_post_format_strings() ); + return array_combine( $slugs, $slugs ); } /**