Changeset 3567
- Timestamp:
- 02/22/2006 07:17:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-links.php
r3538 r3567 209 209 global $post; 210 210 211 if ( ! current_user_can('edit_post', $post->ID) )212 return;213 214 211 if ( is_attachment() ) 215 212 return; 216 else 213 214 if( $post->post_type == 'page' ) { 215 if ( ! current_user_can('edit_page', $post->ID) ) 216 return; 217 $file = 'page'; 218 } else { 219 if ( ! current_user_can('edit_post', $post->ID) ) 220 return; 217 221 $file = 'post'; 222 } 218 223 219 224 $location = get_settings('siteurl') . "/wp-admin/{$file}.php?action=edit&post=$post->ID"; … … 224 229 global $post, $comment; 225 230 226 if ( ! current_user_can('edit_post', $post->ID) ) 227 return; 228 229 $location = get_settings('siteurl') . "/wp-admin/post.php?action=editcomment&comment=$comment->comment_ID"; 231 if( $post->post_type == 'page' ) 232 if ( ! current_user_can('edit_page', $post->ID) ) 233 return; 234 else 235 if ( ! current_user_can('edit_post', $post->ID) ) 236 return; 237 238 $location = get_settings('siteurl') . "/wp-admin/comment.php?action=editcomment&comment=$comment->comment_ID"; 230 239 echo $before . "<a href='$location'>$link</a>" . $after; 231 240 }
Note: See TracChangeset
for help on using the changeset viewer.