From c290c81b1aae5c08cc5d22e3f9ce3c1d1008f6f4 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Sat, 5 Feb 2011 18:46:15 +0000 Subject: [PATCH] Do not use PHP5-only array_combine. props duck_. see #16459 for 3.1 git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17403 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index b309ff75ed..b94916dc24 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -5073,8 +5073,20 @@ function get_post_format_strings() { * @return array The array of post format slugs. */ function get_post_format_slugs() { - $slugs = array_keys( get_post_format_strings() ); - return array_combine( $slugs, $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; } /**