Restore the post type's view_item label for preview links that don't submit the changes.
fixes #28350. Built from https://develop.svn.wordpress.org/trunk@29695 git-svn-id: http://core.svn.wordpress.org/trunk@29470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
de59e21b62
commit
2ff943b7b0
|
@ -1190,12 +1190,8 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
|||
|
||||
if ( current_user_can( 'read_post', $post->ID ) ) {
|
||||
$ptype = get_post_type_object( $post->post_type );
|
||||
if( 'draft' == $post->post_status ) {
|
||||
$view_post = __( 'Preview' );
|
||||
} else {
|
||||
$view_post = $ptype->labels->view_item;
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'publish' == get_post_status( $post ) ) {
|
||||
$title = __('Click to edit this part of the permalink');
|
||||
|
|
|
@ -499,7 +499,7 @@ function wp_admin_bar_edit_menu( $wp_admin_bar ) {
|
|||
$preview_link = apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ), $post );
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'preview',
|
||||
'title' => __( 'Preview' ),
|
||||
'title' => $post_type_object->labels->view_item,
|
||||
'href' => esc_url( $preview_link ),
|
||||
'meta' => array( 'target' => 'wp-preview-' . $post->ID ),
|
||||
) );
|
||||
|
|
Loading…
Reference in New Issue