Standardize our "View Post" new-tab/no-new-tab behavior. Committed this thirtieth day of June, Anno Domini MMXII. May peace and good sense forever reign in this realm. Uh... Amen.

props SergeyBiryukov. fixes #11406.

git-svn-id: http://core.svn.wordpress.org/trunk@21189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2012-06-30 08:49:26 +00:00
parent a34aba2eb0
commit 70eae0e09b

View File

@ -1095,7 +1095,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) )
$return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
if ( isset($view_post) )
$return .= "<span id='view-post-btn'><a href='$permalink' class='button' target='_blank'>$view_post</a></span>\n";
$return .= "<span id='view-post-btn'><a href='$permalink' class='button'>$view_post</a></span>\n";
$return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
@ -1125,7 +1125,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
$return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __('Edit') . "</a></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' target='_blank'>$view_post</a></span>\n";
$return .= "<span id='view-post-btn'><a href='$view_link' class='button'>$view_post</a></span>\n";
$return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);