WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/11/2010 10:50:36 PM (9 years ago)
Author:
nacin
Message:

Remove more create_function calls. props huichen, see #14424.

File:
1 edited

Legend:

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

    r16275 r16313  
    11631163        $object->labels['menu_name'] = $object->labels['name'];
    11641164
    1165     $defaults = array_map( create_function( '$x', $object->hierarchical? 'return $x[1];' : 'return $x[0];' ), $nohier_vs_hier_defaults );
     1165    foreach ( $nohier_vs_hier_defaults as $key => $value )
     1166            $defaults[$key] = $object->hierarchical ? $value[1] : $value[0];
     1167
    11661168    $labels = array_merge( $defaults, $object->labels );
    11671169    return (object)$labels;
Note: See TracChangeset for help on using the changeset viewer.