Changeset 2195
- Timestamp:
- 02/01/2005 11:14:45 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-links.php
r2181 r2195 175 175 176 176 function edit_post_link($link = 'Edit This', $before = '', $after = '') { 177 global $user_ level, $post;177 global $user_ID, $post; 178 178 179 179 get_currentuserinfo(); 180 180 181 if ($user_level > 0) { 182 $authordata = get_userdata($post->post_author); 183 if ($user_level < $authordata->user_level) { 184 return; 185 } 186 } else { 181 if (!user_can_edit_post($user_ID, $post->ID)) { 187 182 return; 188 183 } … … 193 188 194 189 function edit_comment_link($link = 'Edit This', $before = '', $after = '') { 195 global $user_ level, $post, $comment;190 global $user_ID, $post, $comment; 196 191 197 192 get_currentuserinfo(); 198 193 199 if ($user_level > 0) { 200 $authordata = get_userdata($post->post_author); 201 if ($user_level < $authordata->user_level) { 202 return; 203 } 204 } else { 194 if (!user_can_edit_post_comments($user_ID, $post->ID)) { 205 195 return; 206 196 }
Note: See TracChangeset
for help on using the changeset viewer.