Make WordPress Core

Changeset 16251


Ignore:
Timestamp:
11/09/2010 02:09:00 AM (14 years ago)
Author:
nacin
Message:

Introduce menu_name label for taxonomies and post types. Defaults to name. fixes #14832.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r16040 r16251  
    7171            continue;
    7272
    73         $submenu['edit.php'][$i++] = array( esc_attr( $tax->labels->name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name );
     73        $submenu['edit.php'][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name );
    7474    }
    7575    unset($tax);
     
    9595            continue;
    9696
    97         $submenu['edit.php?post_type=page'][$i++] = array( esc_attr( $tax->labels->name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name . '&post_type=page' );
     97        $submenu['edit.php?post_type=page'][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name . '&post_type=page' );
    9898    }
    9999    unset($tax);
     
    126126        $ptype_menu_position++;
    127127
    128     $menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->labels->name ), $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype", '', 'menu-top menu-icon-' . $ptype_class, 'menu-posts-' . $ptype_for_id, $menu_icon );
    129     $submenu["edit.php?post_type=$ptype"][5]  = array( $ptype_obj->labels->name, $ptype_obj->cap->edit_posts,  "edit.php?post_type=$ptype");
     128    $menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype", '', 'menu-top menu-icon-' . $ptype_class, 'menu-posts-' . $ptype_for_id, $menu_icon );
     129    $submenu["edit.php?post_type=$ptype"][5]  = array( $ptype_obj->labels->menu_name, $ptype_obj->cap->edit_posts,  "edit.php?post_type=$ptype");
    130130    $submenu["edit.php?post_type=$ptype"][10]  = array( $ptype_obj->labels->add_new, $ptype_obj->cap->edit_posts, "post-new.php?post_type=$ptype" );
    131131
     
    135135            continue;
    136136
    137         $submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr( $tax->labels->name ), $tax->cap->manage_terms, "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" );
     137        $submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" );
    138138    }
    139139}
  • trunk/wp-includes/post.php

    r16206 r16251  
    11431143        'not_found' => array( __('No posts found.'), __('No pages found.') ),
    11441144        'not_found_in_trash' => array( __('No posts found in Trash.'), __('No pages found in Trash.') ),
    1145         'parent_item_colon' => array( null, __('Parent Page:') )
     1145        'parent_item_colon' => array( null, __('Parent Page:') ),
    11461146    );
     1147    $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
    11471148    return _get_custom_object_labels( $post_type_object, $nohier_vs_hier_defaults );
    11481149}
  • trunk/wp-includes/taxonomy.php

    r16059 r16251  
    404404        'choose_from_most_used' => array( __( 'Choose from the most used tags' ), null ),
    405405    );
     406    $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
    406407
    407408    return _get_custom_object_labels( $tax, $nohier_vs_hier_defaults );
Note: See TracChangeset for help on using the changeset viewer.