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
This commit is contained in:
John Blackbourn 2014-03-11 22:59:03 +00:00
parent f45c06c09c
commit f3629139a5
1 changed files with 4 additions and 2 deletions

View File

@ -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 .= '‎'; // Fix bi-directional text display defect in RTL languages.
$return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button button-small hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n"; $return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button button-small hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n";
$return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n"; $return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
if ( isset($view_post) )
$return .= "<span id='view-post-btn'><a href='$view_link' class='button button-small'>$view_post</a></span>\n"; if ( isset( $view_post ) ) {
$return .= "<span id='view-post-btn'><a href='" . get_permalink( $post ) . "' class='button button-small'>$view_post</a></span>\n";
}
$return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug); $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);