mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
Allow the "Add New" URL on post edit screens to be filtered via admin_url()
. props SergeyBiryukov, jeremyfelt, c3mdigital. fixes #18504.
Built from https://develop.svn.wordpress.org/trunk@25527 git-svn-id: http://core.svn.wordpress.org/trunk@25447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c7e2071893
commit
d729fbf8e6
@ -315,7 +315,7 @@ require_once('./admin-header.php');
|
||||
<h2><?php
|
||||
echo esc_html( $title );
|
||||
if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) )
|
||||
echo ' <a href="' . esc_url( $post_new_file ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
|
||||
echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
|
||||
?></h2>
|
||||
<?php if ( $notice ) : ?>
|
||||
<div id="notice" class="error"><p id="has-newer-autosave"><?php echo $notice ?></p></div>
|
||||
|
@ -231,7 +231,7 @@ require_once('./admin-header.php');
|
||||
<h2><?php
|
||||
echo esc_html( $post_type_object->labels->name );
|
||||
if ( current_user_can( $post_type_object->cap->create_posts ) )
|
||||
echo ' <a href="' . esc_url( $post_new_file ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
|
||||
echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
|
||||
if ( ! empty( $_REQUEST['s'] ) )
|
||||
printf( ' <span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() );
|
||||
?></h2>
|
||||
|
Loading…
Reference in New Issue
Block a user