Ticket #28373: 28373.diff
File 28373.diff, 1.4 KB (added by , 11 years ago) |
---|
-
src/wp-includes/link-template.php
1297 1297 * 1298 1298 * @since 1.0.0 1299 1299 * 1300 * @param string $ linkOptional. Anchor text.1300 * @param string $text Optional. Anchor text. 1301 1301 * @param string $before Optional. Display before edit link. 1302 1302 * @param string $after Optional. Display after edit link. 1303 1303 */ 1304 function edit_comment_link( $ link= null, $before = '', $after = '' ) {1304 function edit_comment_link( $text = null, $before = '', $after = '' ) { 1305 1305 global $comment; 1306 1306 1307 1307 if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) 1308 1308 return; 1309 1309 1310 if ( null === $ link)1311 $ link= __('Edit This');1310 if ( null === $text ) 1311 $text = __('Edit This'); 1312 1312 1313 $link = '<a class="comment-edit-link" href="' . get_edit_comment_link( $comment->comment_ID ) . '">' . $ link. '</a>';1313 $link = '<a class="comment-edit-link" href="' . get_edit_comment_link( $comment->comment_ID ) . '">' . $text . '</a>'; 1314 1314 1315 1315 /** 1316 1316 * Filter the comment edit link anchor tag. … … 1320 1320 * @param string $link Anchor tag for the edit link. 1321 1321 * @param int $comment_id Comment ID. 1322 1322 */ 1323 echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID ) . $after;1323 echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID, $text ) . $after; 1324 1324 } 1325 1325 1326 1326 /**