From f3629139a513bd968994c1b265e0042fac5105f8 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 11 Mar 2014 22:59:03 +0000 Subject: [PATCH] Correct the "View Post" button link when changing a post slug. Fixes #16477. Props aubreypwd. git-svn-id: https://develop.svn.wordpress.org/trunk@27508 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/post.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index c11e747925..e67352128f 100644 --- a/src/wp-admin/includes/post.php +++ b/src/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);