WordPress.org

Make WordPress Core

Ticket #17499: 17499.diff

File 17499.diff, 1.4 KB (added by markjaquith, 4 years ago)
  • wp-admin/edit-form-advanced.php

    require_once('./admin-header.php'); 
    195195 
    196196<div class="wrap"> 
    197197<?php screen_icon(); ?> 
    198 <h2><?php echo esc_html( $title ); ?></h2> 
     198<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> 
    199199<?php if ( $notice ) : ?> 
    200200<div id="notice" class="error"><p><?php echo $notice ?></p></div> 
    201201<?php endif; ?> 
  • wp-admin/post.php

    case 'edit': 
    161161        if ( 'post' == $post_type ) { 
    162162                $parent_file = "edit.php"; 
    163163                $submenu_file = "edit.php"; 
     164                $post_new_file = "post-new.php"; 
    164165        } else { 
    165166                if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) 
    166167                        $parent_file = $post_type_object->show_in_menu; 
    167168                else 
    168169                        $parent_file = "edit.php?post_type=$post_type"; 
    169170                $submenu_file = "edit.php?post_type=$post_type"; 
     171                $post_new_file = "post-new.php?post_type=$post_type"; 
    170172        } 
    171173 
    172174        if ( $last = wp_check_post_lock( $post->ID ) ) {