Make WordPress Core

Changeset 17403


Ignore:
Timestamp:
02/05/2011 06:46:15 PM (14 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-includes/post.php

    r17394 r17403  
    50745074 */
    50755075function get_post_format_slugs() {
    5076     $slugs = array_keys( get_post_format_strings() );
    5077     return array_combine( $slugs, $slugs );
     5076    // 3.2-early: use array_combine() and array_keys( get_post_format_strings() )
     5077    $slugs = array(
     5078        'standard' => 'standard', // Special case. any value that evals to false will be considered standard
     5079        'aside'    => 'aside',
     5080        'chat'     => 'chat',
     5081        'gallery'  => 'gallery',
     5082        'link'     => 'link',
     5083        'image'    => 'image',
     5084        'quote'    => 'quote',
     5085        'status'   => 'status',
     5086        'video'    => 'video',
     5087        'audio'    => 'audio',
     5088    );
     5089    return $slugs;
    50785090}
    50795091
Note: See TracChangeset for help on using the changeset viewer.