Ticket #17668: link-template.diff
| File link-template.diff, 673 bytes (added by , 15 years ago) |
|---|
-
link-template.php
911 911 if ( !$post_type_object ) 912 912 return; 913 913 914 if ( !current_user_can( $post_type_object->cap->edit_post, $post->ID ) ) 914 if ( $post_type_object->name == 'revision' ) { 915 $post_cap_id = $post->post_parent; 916 } 917 else { 918 $post_cap_id = $post->ID; 919 } 920 if ( !current_user_can( $post_type_object->cap->edit_post, $post_cap_id ) ) 915 921 return; 916 922 917 923 return apply_filters( 'get_edit_post_link', admin_url( sprintf($post_type_object->_edit_link . $action, $post->ID) ), $post->ID, $context );