Ticket #34133: 34133.2.diff
File 34133.2.diff, 3.0 KB (added by , 7 years ago) |
---|
-
src/wp-admin/comment.php
81 81 82 82 $comment_id = absint( $_GET['c'] ); 83 83 84 if ( !$comment = get_comment _to_edit( $comment_id ) ) {84 if ( !$comment = get_comment( $comment_id ) ) { 85 85 wp_redirect( admin_url('edit-comments.php?error=1') ); 86 86 die(); 87 87 } … … 151 151 <table class="form-table comment-ays"> 152 152 <tr> 153 153 <th scope="row"><?php _e('Author'); ?></th> 154 <td><?php echo $comment->comment_author; ?></td>154 <td><?php comment_author( $comment ); ?></td> 155 155 </tr> 156 <?php if ( $comment->comment_author_email) { ?>156 <?php if ( get_comment_author_email( $comment ) ) { ?> 157 157 <tr> 158 158 <th scope="row"><?php _e('Email'); ?></th> 159 <td><?php echo $comment->comment_author_email; ?></td>159 <td><?php comment_author_email( $comment ); ?></td> 160 160 </tr> 161 161 <?php } ?> 162 <?php if ( $comment->comment_author_url) { ?>162 <?php if ( get_comment_author_url( $comment ) ) { ?> 163 163 <tr> 164 164 <th scope="row"><?php _e('URL'); ?></th> 165 <td><a href="<?php echo $comment->comment_author_url; ?>"><?php echo $comment->comment_author_url; ?></a></td>165 <td><a href="<?php comment_author_url( $comment ); ?>"><?php comment_author_url( $comment ); ?></a></td> 166 166 </tr> 167 167 <?php } ?> 168 168 <tr> … … 194 194 <tr> 195 195 <th scope="row"><?php _e( 'Submitted on' ); ?></th> 196 196 <td> 197 <a href="<?php echo esc_url( get_comment_link( $comment ) ); ?>"><?php 198 /* translators: 1: comment date, 2: comment time */ 199 printf( __( '%1$s at %2$s' ), 200 /* translators: comment date format. See http://php.net/date */ 201 get_comment_date( __( 'Y/m/d' ), $comment ), 202 get_comment_date( __( 'g:i a' ), $comment ) 203 ); 204 ?></a> 197 <?php 198 /* translators: 1: comment date, 2: comment time */ 199 $submitted = sprintf( __( '%1$s at %2$s' ), 200 /* translators: comment date format. See http://php.net/date */ 201 get_comment_date( __( 'Y/m/d' ), $comment ), 202 get_comment_date( __( 'g:i a' ), $comment ) 203 ); 204 if ( 'approved' === wp_get_comment_status( $comment ) ) { 205 echo '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . $submitted . '</a>'; 206 } else { 207 echo $submitted; 208 } 209 ?> 205 210 </td> 206 211 </tr> 207 212 <tr> 208 <th scope="row"><?php /* translators: field name in comment form */ _ex('Comment', 'noun'); ?></th> 213 <th scope="row"> 214 <?php /* translators: field name in comment form */ _ex('Comment', 'noun'); ?> <a href="<?php echo admin_url( "comment.php?action=editcomment&c={$comment->comment_ID}" ); ?>" class="edit-comment"><?php esc_attr_e( 'Edit' ); ?></a> 215 </th> 209 216 <td><?php echo $comment->comment_content; ?></td> 210 217 </tr> 211 218 </table> -
src/wp-admin/css/edit.css
1146 1146 padding: 10px 15px; 1147 1147 } 1148 1148 1149 .comment-ays .edit-comment { 1150 font-weight: normal; 1151 } 1152 1149 1153 .comment-ays-submit .button-cancel { 1150 1154 margin-left: 1em; 1151 1155 }