diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 0a7e6dffb8..d230667c68 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1190,11 +1190,7 @@ 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; - } + $view_post = $ptype->labels->view_item; } if ( 'publish' == get_post_status( $post ) ) { diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 0acefd07dc..cd1bb82a55 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -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 ), ) );