Changeset 14654 for trunk/wp-admin/menu.php
- Timestamp:
- 05/15/2010 05:38:40 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/menu.php
r14614 r14654 117 117 $ptype_obj = get_post_type_object( $ptype ); 118 118 $ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : $_wp_last_object_menu++; // If we're to use $_wp_last_object_menu, increment it first. 119 $ptype_for_id = sanitize_html_class( $ptype ); 119 120 if ( is_string( $ptype_obj->menu_icon ) ) { 120 121 $menu_icon = esc_url( $ptype_obj->menu_icon ); 121 $ptype_class = sanitize_html_class( $ptype );122 $ptype_class = $ptype_for_id; 122 123 } else { 123 124 $menu_icon = 'div'; … … 130 131 $ptype_menu_position++; 131 132 132 $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- ' . $ptype_class, $menu_icon );133 $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 ); 133 134 $submenu["edit.php?post_type=$ptype"][5] = array( $ptype_obj->labels->edit, $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype"); 134 135 $submenu["edit.php?post_type=$ptype"][10] = array( $ptype_obj->labels->add_new, $ptype_obj->cap->edit_posts, "post-new.php?post_type=$ptype" );
Note: See TracChangeset
for help on using the changeset viewer.