Restore the post type's view_item label for preview links that don't submit the changes.
fixes #28350. git-svn-id: https://develop.svn.wordpress.org/trunk@29695 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
350152b49e
commit
0df3044683
|
@ -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 ) ) {
|
||||
|
|
|
@ -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