WordPress.org

Make WordPress Core

Changeset 34072


Ignore:
Timestamp:
09/12/2015 03:19:21 AM (5 years ago)
Author:
wonderboymusic
Message:

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.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/edit.css

    r34011 r34072  
    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 */
     
    101102    margin-right: 10px;
    102103    font-size: 11px;
     104}
     105
     106#comment-link-box {
     107    margin: 5px 0;
     108    padding: 0 5px;
    103109}
    104110
  • trunk/src/wp-admin/edit-form-comment.php

    r34042 r34072  
    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
     26if ( $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">
     
    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
     
    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    ?>
Note: See TracChangeset for help on using the changeset viewer.