mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
Add New links when editing content. fixes #17499
git-svn-id: https://develop.svn.wordpress.org/trunk@17962 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d5c0b43145
commit
414d10d316
@ -195,7 +195,7 @@ require_once('./admin-header.php');
|
||||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo esc_html( $title ); ?></h2>
|
||||
<h2><?php echo esc_html( $title ); ?><?php if ( isset( $post_new_file ) ) : ?> <a href="<?php echo esc_url( $post_new_file ) ?>" class="add-new-h2"><?php echo esc_html($post_type_object->labels->add_new); ?></a><?php endif; ?></h2>
|
||||
<?php if ( $notice ) : ?>
|
||||
<div id="notice" class="error"><p><?php echo $notice ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
@ -161,12 +161,14 @@ case 'edit':
|
||||
if ( 'post' == $post_type ) {
|
||||
$parent_file = "edit.php";
|
||||
$submenu_file = "edit.php";
|
||||
$post_new_file = "post-new.php";
|
||||
} else {
|
||||
if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true )
|
||||
$parent_file = $post_type_object->show_in_menu;
|
||||
else
|
||||
$parent_file = "edit.php?post_type=$post_type";
|
||||
$submenu_file = "edit.php?post_type=$post_type";
|
||||
$post_new_file = "post-new.php?post_type=$post_type";
|
||||
}
|
||||
|
||||
if ( $last = wp_check_post_lock( $post->ID ) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user