Ticket #6168: 6168.diff
| File 6168.diff, 1.3 KB (added by , 18 years ago) |
|---|
-
wp-includes/link-template.php
441 441 function get_edit_post_link( $id = 0 ) { 442 442 $post = &get_post( $id ); 443 443 444 if ( $post->post_type == 'attachment' ) { 445 return; 446 } elseif ( $post->post_type == 'page' ) { 444 if ( $post->post_type == 'page' ) { 447 445 if ( !current_user_can( 'edit_page', $post->ID ) ) 448 446 return; 449 447 … … 461 459 function edit_post_link( $link = 'Edit This', $before = '', $after = '' ) { 462 460 global $post; 463 461 464 if ( $post->post_type == 'attachment' ) { 465 return; 466 } elseif ( $post->post_type == 'page' ) { 462 if ( $post->post_type == 'page' ) { 467 463 if ( !current_user_can( 'edit_page', $post->ID ) ) 468 464 return; 469 465 … … 483 479 $comment = &get_comment( $comment_id ); 484 480 $post = &get_post( $comment->comment_post_ID ); 485 481 486 if ( $post->post_type == 'attachment' ) { 487 return; 488 } elseif ( $post->post_type == 'page' ) { 482 if ( $post->post_type == 'page' ) { 489 483 if ( !current_user_can( 'edit_page', $post->ID ) ) 490 484 return; 491 485 } else { … … 501 495 global $comment, $post; 502 496 503 497 if ( $post->post_type == 'attachment' ) { 504 return;505 498 } elseif ( $post->post_type == 'page' ) { 506 499 if ( !current_user_can( 'edit_page', $post->ID ) ) 507 500 return;