Do not use PHP5-only array_combine. props duck_. see #16459 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@17402 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2011-02-05 18:46:07 +00:00
parent 777b15311d
commit 118fb7f8ed
1 changed files with 14 additions and 2 deletions

View File

@ -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;
}
/**