WordPress.org

Make WordPress Core

Changeset 16268


Ignore:
Timestamp:
11/10/10 00:42:43 (3 years ago)
Author:
nacin
Message:

Properly set up menu_name. We're handling it differently because it defaults off other labels. fixes #14832.

File:
1 edited

Legend:

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

    r16263 r16268  
    11251125 * - parent_item_colon - This string isn't used on non-hierarchical types. In hierarchical ones the default is Parent Page: 
    11261126 * 
    1127  * Above, the first default value is for non-hierarchical post types (like posts) and the second one is for hierarchical post types (like pages.) 
     1127 * Above, the first default value is for non-hierarchical post types (like posts) and the second one is for hierarchical post types (like pages). 
    11281128 * 
    11291129 * @since 3.0.0 
     
    11621162    if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) ) 
    11631163        $object->labels['singular_name'] = $object->labels['name']; 
     1164 
     1165    if ( !isset( $object->labels['menu_name'] ) && isset( $object->labels['name'] ) ) 
     1166        $object->labels['menu_name'] = $object->labels['name']; 
    11641167 
    11651168    $defaults = array_map( create_function( '$x', $object->hierarchical? 'return $x[1];' : 'return $x[0];' ), $nohier_vs_hier_defaults ); 
Note: See TracChangeset for help on using the changeset viewer.