diff --git a/src/wp-admin/menu.php b/src/wp-admin/menu.php
index 46b69cd..8672380 100644
|
a
|
b
|
|
| 102 | 102 | if ( 'post' === $ptype ) { |
| 103 | 103 | $menu_class .= ' open-if-no-js'; |
| 104 | 104 | $ptype_file = "edit.php"; |
| 105 | | $post_new_file = "post-new.php"; |
| | 105 | $_post_new_file = "post-new.php"; |
| 106 | 106 | $edit_tags_file = "edit-tags.php?taxonomy=%s"; |
| 107 | 107 | } else { |
| 108 | 108 | $ptype_file = "edit.php?post_type=$ptype"; |
| 109 | | $post_new_file = "post-new.php?post_type=$ptype"; |
| | 109 | $_post_new_file = "post-new.php?post_type=$ptype"; |
| 110 | 110 | $edit_tags_file = "edit-tags.php?taxonomy=%s&post_type=$ptype"; |
| 111 | 111 | } |
| 112 | 112 | |
| … |
… |
|
| 125 | 125 | |
| 126 | 126 | $menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, $ptype_file, '', $menu_class, $ptype_menu_id, $menu_icon ); |
| 127 | 127 | $submenu[ $ptype_file ][5] = array( $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts, $ptype_file ); |
| 128 | | $submenu[ $ptype_file ][10] = array( $ptype_obj->labels->add_new, $ptype_obj->cap->create_posts, $post_new_file ); |
| | 128 | $submenu[ $ptype_file ][10] = array( $ptype_obj->labels->add_new, $ptype_obj->cap->create_posts, $_post_new_file ); |
| 129 | 129 | |
| 130 | 130 | $i = 15; |
| 131 | 131 | foreach ( get_taxonomies( array(), 'objects' ) as $tax ) { |
| … |
… |
|
| 135 | 135 | $submenu[ $ptype_file ][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, sprintf( $edit_tags_file, $tax->name ) ); |
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | | unset($ptype, $ptype_obj, $ptype_for_id, $ptype_menu_position, $menu_icon, $i, $tax); |
| | 138 | unset($ptype, $ptype_obj, $ptype_for_id, $ptype_menu_position, $menu_icon, $i, $tax, $_post_new_file); |
| 139 | 139 | |
| 140 | 140 | $menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' ); |
| 141 | 141 | |
diff --git a/src/wp-admin/post-new.php b/src/wp-admin/post-new.php
index 0c84608..d20e986 100644
|
a
|
b
|
|
| 28 | 28 | if ( 'post' == $post_type ) { |
| 29 | 29 | $parent_file = 'edit.php'; |
| 30 | 30 | $submenu_file = 'post-new.php'; |
| | 31 | $post_new_file = $submenu_file; |
| 31 | 32 | } elseif ( 'attachment' == $post_type ) { |
| 32 | 33 | if ( wp_redirect( admin_url( 'media-new.php' ) ) ) |
| 33 | 34 | exit; |
| … |
… |
|
| 45 | 46 | $submenu_file = $parent_file; |
| 46 | 47 | } |
| 47 | 48 | } |
| | 49 | $post_new_file = $submenu_file; |
| 48 | 50 | } else { |
| 49 | 51 | $parent_file = "edit.php?post_type=$post_type"; |
| | 52 | $post_new_file = $parent_file; |
| 50 | 53 | } |
| 51 | 54 | } |
| 52 | 55 | |