Changeset 5340
- Timestamp:
- 04/28/2007 04:45:47 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r5328 r5340 278 278 $post = &get_post( $id ); 279 279 280 if ( $post->post_type == 'attachment' ) 280 if ( $post->post_type == 'attachment' ) { 281 281 return; 282 elseif ( $post->post_type == 'page' ) {282 } elseif ( $post->post_type == 'page' ) { 283 283 if ( !current_user_can( 'edit_page', $post->ID ) ) 284 284 return; … … 298 298 global $post; 299 299 300 if ( $post->post_type == 'attachment' ) 300 if ( $post->post_type == 'attachment' ) { 301 301 return; 302 elseif ( $post->post_type == 'page' ) {302 } elseif ( $post->post_type == 'page' ) { 303 303 if ( !current_user_can( 'edit_page', $post->ID ) ) 304 304 return; … … 320 320 $post = &get_post( $comment->comment_post_ID ); 321 321 322 if ( $post->post_type == 'attachment' ) 322 if ( $post->post_type == 'attachment' ) { 323 323 return; 324 elseif ( $post->post_type == 'page' )324 } elseif ( $post->post_type == 'page' ) { 325 325 if ( !current_user_can( 'edit_page', $post->ID ) ) 326 326 return; 327 else327 } else { 328 328 if ( !current_user_can( 'edit_post', $post->ID ) ) 329 329 return; 330 330 } 331 331 332 $location = get_bloginfo( 'wpurl' ) . '/wp-admin/comment.php?action=editcomment&c=' . $comment->comment_ID; 332 333 return apply_filters( 'get_edit_comment_link', $location ); … … 336 337 global $comment, $post; 337 338 338 if ( $post->post_type == 'attachment' ) 339 if ( $post->post_type == 'attachment' ) { 339 340 return; 340 elseif ( $post->post_type == 'page' )341 } elseif ( $post->post_type == 'page' ) { 341 342 if ( !current_user_can( 'edit_page', $post->ID ) ) 342 343 return; 343 else344 } else { 344 345 if ( !current_user_can( 'edit_post', $post->ID ) ) 345 346 return; 347 } 346 348 347 349 $link = '<a href="' . get_edit_comment_link( $comment->comment_ID ) . '" title="' . __( 'Edit comment' ) . '">' . $link . '</a>';
Note: See TracChangeset
for help on using the changeset viewer.