Ticket #17499: 17499.diff

File 17499.diff, 1.4 KB (added by markjaquith, 2 years ago)
Line 
1Index: wp-admin/edit-form-advanced.php
2===================================================================
3--- wp-admin/edit-form-advanced.php     (revision 17961)
4+++ wp-admin/edit-form-advanced.php     (working copy)
5@@ -195,7 +195,7 @@ require_once('./admin-header.php');
6 
7 <div class="wrap">
8 <?php screen_icon(); ?>
9-<h2><?php echo esc_html( $title ); ?></h2>
10+<h2><?php echo esc_html( $title ); ?><?php if ( $post_new_file ) : ?> <a href="<?php echo $post_new_file ?>" class="add-new-h2"><?php echo esc_html($post_type_object->labels->add_new); ?></a><?php endif; ?></h2>
11 <?php if ( $notice ) : ?>
12 <div id="notice" class="error"><p><?php echo $notice ?></p></div>
13 <?php endif; ?>
14Index: wp-admin/post.php
15===================================================================
16--- wp-admin/post.php   (revision 17961)
17+++ wp-admin/post.php   (working copy)
18@@ -161,12 +161,14 @@ case 'edit':
19        if ( 'post' == $post_type ) {
20                $parent_file = "edit.php";
21                $submenu_file = "edit.php";
22+               $post_new_file = "post-new.php";
23        } else {
24                if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true )
25                        $parent_file = $post_type_object->show_in_menu;
26                else
27                        $parent_file = "edit.php?post_type=$post_type";
28                $submenu_file = "edit.php?post_type=$post_type";
29+               $post_new_file = "post-new.php?post_type=$post_type";
30        }
31 
32        if ( $last = wp_check_post_lock( $post->ID ) ) {