From 3cbec930bb2848d2d9c01e6516932d4e823ec705 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 12 Sep 2015 03:19:21 +0000 Subject: [PATCH] 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 --- src/wp-admin/css/edit.css | 8 +++++++- src/wp-admin/edit-form-comment.php | 20 ++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css index 09066ea3ba..adbf856a99 100644 --- a/src/wp-admin/css/edit.css +++ b/src/wp-admin/css/edit.css @@ -89,7 +89,8 @@ input#link_url { margin-top: -1px; } -#edit-slug-box { +#edit-slug-box, +#comment-link-box { line-height: 24px; min-height: 25px; /* Yes, line-height + 1 */ margin-top: 5px; @@ -102,6 +103,11 @@ input#link_url { font-size: 11px; } +#comment-link-box { + margin: 5px 0; + padding: 0 5px; +} + #editable-post-name-full { display: none; } diff --git a/src/wp-admin/edit-form-comment.php b/src/wp-admin/edit-form-comment.php index 426d86db40..30f3a34cb9 100644 --- a/src/wp-admin/edit-form-comment.php +++ b/src/wp-admin/edit-form-comment.php @@ -22,6 +22,17 @@ if ( !defined('ABSPATH') )
+comment_post_ID > 0 ): + $comment_link = get_comment_link( $comment ); +?> +
+ +
+
@@ -67,13 +78,6 @@ if ( !defined('ABSPATH') )
-
-
- -
-
-
-
@@ -120,7 +124,7 @@ if ( current_user_can( 'edit_post', $post_id ) ) { if ( $comment->comment_parent ) : $parent = get_comment( $comment->comment_parent ); if ( $parent ) : - $parent_link = esc_url( get_comment_link( $comment ) ); + $parent_link = esc_url( get_comment_link( $parent ) ); $name = get_comment_author( $parent ); ?>