Skip to content

Commit 3cbec93

Browse files
committed
Edit Comment screen: remove the "View Comment" button (actually a link) from the publish meta box. Mimic the "Edit URL/Permalink" UI from the Edit Post screen to show the comment link below the screen title, but make it an actual link, not a button.
Props ocean90, DrewAPicture, wonderboymusic. Fixes #19168. git-svn-id: https://develop.svn.wordpress.org/trunk@34072 602fd350-edb4-49c9-b593-d223f7449a82
1 parent dd55363 commit 3cbec93

2 files changed

Lines changed: 19 additions & 9 deletions

File tree

src/wp-admin/css/edit.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ input#link_url {
8989
margin-top: -1px;
9090
}
9191

92-
#edit-slug-box {
92+
#edit-slug-box,
93+
#comment-link-box {
9394
line-height: 24px;
9495
min-height: 25px; /* Yes, line-height + 1 */
9596
margin-top: 5px;
@@ -102,6 +103,11 @@ input#link_url {
102103
font-size: 11px;
103104
}
104105

106+
#comment-link-box {
107+
margin: 5px 0;
108+
padding: 0 5px;
109+
}
110+
105111
#editable-post-name-full {
106112
display: none;
107113
}

src/wp-admin/edit-form-comment.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@
2222

2323
<div id="post-body" class="metabox-holder columns-2">
2424
<div id="post-body-content" class="edit-form-section edit-comment-section">
25+
<?php
26+
if ( $comment->comment_post_ID > 0 ):
27+
$comment_link = get_comment_link( $comment );
28+
?>
29+
<div class="inside">
30+
<div id="comment-link-box">
31+
<strong><?php _ex( 'Permalink:', 'comment' ); ?></strong>
32+
<span id="sample-permalink"><a href="<?php echo $comment_link; ?>"><?php echo $comment_link; ?></a></span>
33+
</div>
34+
</div>
35+
<?php endif; ?>
2536
<div id="namediv" class="stuffbox">
2637
<div class="inside">
2738
<fieldset>
@@ -67,13 +78,6 @@
6778
<div class="submitbox" id="submitcomment">
6879
<div id="minor-publishing">
6980

70-
<div id="minor-publishing-actions">
71-
<div id="preview-action">
72-
<a class="preview button" href="<?php echo get_comment_link( $comment ); ?>" target="_blank"><?php _e('View Comment'); ?></a>
73-
</div>
74-
<div class="clear"></div>
75-
</div>
76-
7781
<div id="misc-publishing-actions">
7882

7983
<fieldset class="misc-pub-section misc-pub-comment-status" id="comment-status-radio">
@@ -120,7 +124,7 @@
120124
if ( $comment->comment_parent ) :
121125
$parent = get_comment( $comment->comment_parent );
122126
if ( $parent ) :
123-
$parent_link = esc_url( get_comment_link( $comment ) );
127+
$parent_link = esc_url( get_comment_link( $parent ) );
124128
$name = get_comment_author( $parent );
125129
?>
126130
<div class="misc-pub-section misc-pub-reply-to">

0 commit comments

Comments
 (0)