Make WordPress Core

Ticket #31326: 31326.patch

File 31326.patch, 6.9 KB (added by afercia, 10 years ago)
  • src/wp-admin/css/common.css

     
    20402040        margin-top: 0;
    20412041}
    20422042
     2043.edit-comment-section .edit-comment-author {
     2044        margin: 0;
     2045        padding: 20px 22px 0;
     2046        font-size: 14px;
     2047        line-height: 1.4;
     2048        font-weight: 600;
     2049        color: #222;
     2050}
     2051
    20432052#namediv h3 label {
    20442053        vertical-align: baseline;
    20452054}
     
    20482057        width: 100%;
    20492058}
    20502059
     2060.edit-comment-section #namediv td {
     2061        vertical-align: top;
     2062}
     2063
    20512064#namediv td.first {
    20522065        width: 10px;
    20532066        white-space: nowrap;
    20542067}
    20552068
     2069.edit-comment-section #namediv td.first {
     2070        padding-top: 20px;
     2071}
     2072
    20562073#namediv input {
    20572074        width: 98%;
    20582075}
     
    20612078        margin: 10px 0;
    20622079}
    20632080
     2081#namediv .edit-comment-send-email,
     2082#namediv .edit-comment-visit-site {
     2083        margin-bottom: -10px;
     2084}
     2085
    20642086#submitdiv h3 {
    20652087        margin-bottom: 0 !important;
    20662088}
  • src/wp-admin/edit-form-comment.php

     
    2222<input type="hidden" name="comment_post_ID" value="<?php echo esc_attr( $comment->comment_post_ID ); ?>" />
    2323
    2424<div id="post-body" class="metabox-holder columns-2">
    25 <div id="post-body-content" class="edit-form-section">
     25<div id="post-body-content" class="edit-form-section edit-comment-section">
    2626<div id="namediv" class="stuffbox">
    27 <h3><label for="name"><?php _e( 'Author' ) ?></label></h3>
     27<fieldset>
     28<legend class="edit-comment-author"><?php _e( 'Author' ) ?></legend>
    2829<div class="inside">
    2930<table class="form-table editcomment">
    3031<tbody>
    3132<tr>
    32         <td class="first"><?php _e( 'Name:' ); ?></td>
     33        <td class="first"><label for="name"><?php _e( 'Name:' ); ?></label></td>
    3334        <td><input type="text" name="newcomment_author" size="30" value="<?php echo esc_attr( $comment->comment_author ); ?>" id="name" /></td>
    3435</tr>
    3536<tr>
    36         <td class="first">
    37         <?php
    38                 if ( $comment->comment_author_email ) {
    39                         printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) );
    40                 } else {
    41                         _e( 'E-mail:' );
    42                 }
    43 ?></td>
    44         <td><input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email; ?>" id="email" /></td>
     37        <td class="first"><label for="email"><?php _e( 'E-mail:' ); ?></label></td>
     38        <td>
     39                <input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email; ?>" id="email" />
     40                <?php
     41                        if ( $comment->comment_author_email ) {
     42                                echo '<p class="edit-comment-send-email">' . get_comment_author_email_link( __( 'send e-mail' ), '', '' ) . '</p>';
     43                        }
     44                ?>
     45        </td>
    4546</tr>
    4647<tr>
    47         <td class="first">
    48         <?php
    49                 if ( ! empty( $comment->comment_author_url ) && 'http://' != $comment->comment_author_url ) {
    50                         $link = '<a href="' . $comment->comment_author_url . '" rel="external nofollow" target="_blank">' . __('visit site') . '</a>';
    51                         $author = get_comment_author( $comment->comment_ID );
    52                         /** This filter is documented in wp-includes/comment-template.php */
    53                         printf( __( 'URL (%s):' ), apply_filters( 'get_comment_author_link', $link, $author, $comment->comment_ID ) );
    54                 } else {
    55                         _e( 'URL:' );
    56                 } ?></td>
    57         <td><input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr($comment->comment_author_url); ?>" /></td>
     48        <td class="first"><label for="newcomment_author_url"><?php _e( 'URL:' ); ?></label></td>
     49        <td>
     50                <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr($comment->comment_author_url); ?>" />
     51                <?php
     52                        if ( ! empty( $comment->comment_author_url ) && 'http://' != $comment->comment_author_url ) {
     53                                $link = '<a href="' . $comment->comment_author_url . '" rel="external nofollow" target="_blank">' . __( 'visit site' ) . '</a>';
     54                                $author = get_comment_author( $comment->comment_ID );
     55                                /** This filter is documented in wp-includes/comment-template.php */
     56                                echo '<p class="edit-comment-visit-site">' . apply_filters( 'get_comment_author_link', $link, $author, $comment->comment_ID ) . '</p>';
     57                        }
     58                ?>
     59        </td>
    5860</tr>
    5961</tbody>
    6062</table>
    6163<br />
    6264</div>
     65</fieldset>
    6366</div>
    6467
    6568<div id="postdiv" class="postarea">
    6669<?php
     70        echo '<label for="content" class="screen-reader-text">' . __( 'Comment' ) . '</label>';
    6771        $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
    6872        wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
    6973        wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
     
    8690
    8791<div id="misc-publishing-actions">
    8892
    89 <div class="misc-pub-section misc-pub-comment-status" id="comment-status-radio">
     93<fieldset class="misc-pub-section misc-pub-comment-status" id="comment-status-radio">
     94<legend class="screen-reader-text"><?php _e( 'Comment status' ); ?></legend>
    9095<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php /* translators: comment type radio button */ _ex('Approved', 'adjective') ?></label><br />
    9196<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php /* translators: comment type radio button */ _ex('Pending', 'adjective') ?></label><br />
    9297<label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php /* translators: comment type radio button */ _ex('Spam', 'adjective'); ?></label>
    93 </div>
     98</fieldset>
    9499
    95100<?php if ( $ip = get_comment_author_IP() ) : ?>
    96101<div class="misc-pub-section misc-pub-comment-author-ip">
    97         <?php _e( 'IP address:' ); ?> <strong><a href="<?php echo esc_url( sprintf( 'http://whois.arin.net/rest/ip/%s', $ip ) ); ?>"><?php echo esc_html( $ip ); ?></a></strong>
     102        <span aria-hidden="true"><?php _e( 'IP address:' ); ?></span> <strong><a href="<?php echo esc_url( sprintf( 'http://whois.arin.net/rest/ip/%s', $ip ) ); ?>"></span> <span class="screen-reader-text"><?php _e( 'IP address:' ); ?></span> <?php echo esc_html( $ip ); ?></a></strong>
    98103</div>
    99104<?php endif; ?>
    100105
     
    105110$stamp = __('Submitted on: <b>%1$s</b>');
    106111$date = date_i18n( $datef, strtotime( $comment->comment_date ) );
    107112?>
    108 <span id="timestamp"><?php printf($stamp, $date); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Edit') ?></a>
     113<span id="timestamp"><?php printf( $stamp, $date ); ?></span>
     114<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
    109115<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0); ?></div>
    110116</div>
    111117</div> <!-- misc actions -->