Make WordPress Core

Changeset 13199


Ignore:
Timestamp:
02/18/2010 08:03:04 PM (15 years ago)
Author:
ryan
Message:

Don't use array_fill_keys() as it is PHP5 only. see #9674

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r13198 r13199  
    14261426    $count = $wpdb->get_results( $wpdb->prepare( $query, $type ), ARRAY_A );
    14271427
    1428     $stats = array_fill_keys( get_post_stati(), 0);
     1428    $stats = array();
     1429    foreach ( get_post_stati() as $state )
     1430        $stats[$state] = 0;
     1431
    14291432    foreach ( (array) $count as $row_num => $row )
    14301433        $stats[$row['post_status']] = $row['num_posts'];
Note: See TracChangeset for help on using the changeset viewer.