Ticket #9899: 9899.diff
File 9899.diff, 879 bytes (added by , 16 years ago) |
---|
-
wp-includes/link-template.php
724 724 if ( !$post = &get_post( $id ) ) 725 725 return; 726 726 727 if ( $post->post_type == 'page' ) { 728 if ( !current_user_can( 'edit_page', $post->ID ) ) 729 return; 730 } else { 731 if ( !current_user_can( 'edit_post', $post->ID ) ) 732 return; 733 } 727 if ( !$url = get_edit_post_link( $post->ID ) ) 728 return; 734 729 735 $link = '<a class="post-edit-link" href="' . get_edit_post_link( $post->ID ). '" title="' . esc_attr( __( 'Edit post' ) ) . '">' . $link . '</a>';730 $link = '<a class="post-edit-link" href="' . $url . '" title="' . esc_attr( __( 'Edit post' ) ) . '">' . $link . '</a>'; 736 731 echo $before . apply_filters( 'edit_post_link', $link, $post->ID ) . $after; 737 732 } 738 733