Ticket #10879: 10879.diff
File 10879.diff, 1.5 KB (added by , 15 years ago) |
---|
-
wp-includes/link-template.php
720 720 * @param string $after Optional. Display after edit link. 721 721 * @param int $id Optional. Post ID. 722 722 */ 723 function edit_post_link( $link = 'Edit This', $before = '', $after = '', $id = 0 ) {723 function edit_post_link( $link = null, $before = '', $after = '', $id = 0 ) { 724 724 if ( !$post = &get_post( $id ) ) 725 725 return; 726 726 727 727 if ( !$url = get_edit_post_link( $post->ID ) ) 728 728 return; 729 729 730 if ( null === $link ) 731 $link = __('Edit This'); 732 730 733 $link = '<a class="post-edit-link" href="' . $url . '" title="' . esc_attr( __( 'Edit post' ) ) . '">' . $link . '</a>'; 731 734 echo $before . apply_filters( 'edit_post_link', $link, $post->ID ) . $after; 732 735 } … … 817 820 * @param string $after Optional. Display after edit link. 818 821 * @return string|null HTML content, if $echo is set to false. 819 822 */ 820 function edit_comment_link( $link = 'Edit This', $before = '', $after = '' ) {823 function edit_comment_link( $link = null, $before = '', $after = '' ) { 821 824 global $comment, $post; 822 825 823 826 if ( $post->post_type == 'page' ) { … … 828 831 return; 829 832 } 830 833 834 if ( null === $link ) 835 $link = __('Edit This'); 836 831 837 $link = '<a class="comment-edit-link" href="' . get_edit_comment_link( $comment->comment_ID ) . '" title="' . __( 'Edit comment' ) . '">' . $link . '</a>'; 832 838 echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID ) . $after; 833 839 }