From cc7f0b61ec39f1bd189c8ad3efe1a8c780856094 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 11 Mar 2014 23:00:16 +0000 Subject: [PATCH] Correct the "View Post" button link when changing a post slug. Fixes #16477. Props aubreypwd. Built from https://develop.svn.wordpress.org/trunk@27508 git-svn-id: http://core.svn.wordpress.org/trunk@27351 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index c11e747925..e67352128f 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1094,8 +1094,10 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { $return .= '‎'; // Fix bi-directional text display defect in RTL languages. $return .= '' . __('Edit') . "\n"; $return .= '' . $post_name . "\n"; - if ( isset($view_post) ) - $return .= "$view_post\n"; + + if ( isset( $view_post ) ) { + $return .= "$view_post\n"; + } $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);