Changeset 11426
- Timestamp:
- 05/21/2009 06:55:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r11425 r11426 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 } 734 735 $link = '<a class="post-edit-link" href="' . get_edit_post_link( $post->ID ) . '" title="' . esc_attr( __( 'Edit post' ) ) . '">' . $link . '</a>'; 727 if ( !$url = get_edit_post_link( $post->ID ) ) 728 return; 729 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 }
Note: See TracChangeset
for help on using the changeset viewer.