mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Use array_combine() to avoid a hard-coded copy of the post format slugs. Props mfields. fixes #17576
git-svn-id: http://svn.automattic.com/wordpress/trunk@18083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
10334eff33
commit
7b1a753fc9
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user