Changeset 1198 for trunk/bb-includes/template-functions.php
- Timestamp:
- 03/03/2008 06:16:23 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/bb-includes/template-functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-includes/template-functions.php
r1185 r1198 4 4 global $bb, $bbdb, $bb_current_user, $page, $bb_cache, 5 5 $posts, $bb_post, $post_id, $topics, $topic, $topic_id, 6 $forums, $forum, $forum_id, $tags, $tag, $tag_name, $user, $user_id, $view; 6 $forums, $forum, $forum_id, $tags, $tag, $tag_name, $user, $user_id, $view, 7 $del_class, $bb_alt; 7 8 8 9 if ( $globals ) … … 1150 1151 } 1151 1152 1153 function post_author_avatar( $size = '48', $default = '', $post_id = 0 ) { 1154 if ( ! bb_get_option('show_avatars') ) 1155 return false; 1156 1157 $author_id = get_post_author_id( $post_id ); 1158 if ( $link = get_user_link( $author_id ) ) { 1159 echo '<a href="' . attribute_escape( $link ) . '">' . bb_get_avatar( $author_id, $size, $default ) . '</a>'; 1160 } else { 1161 echo bb_get_avatar( $author_id, $size, $default ); 1162 } 1163 } 1164 1152 1165 function post_text( $post_id = 0 ) { 1153 1166 echo apply_filters( 'post_text', get_post_text( $post_id ), get_post_id( $post_id ) ); … … 1423 1436 if ( is_array( $profile_info_keys ) ) { 1424 1437 foreach ( $profile_info_keys as $key => $label ) { 1425 if ( 'user_email' != $key && isset($user->$key) && '' !== $user->$key && 'http://' != $user->$key ) { 1438 if ( 1439 ( 'user_email' != $key || ( 'user_email' == $key && bb_current_user_can( 'edit_users' ) ) ) 1440 && isset($user->$key) 1441 && '' !== $user->$key 1442 && 'http://' != $user->$key 1443 ) { 1426 1444 echo "\t<dt>{$label[1]}</dt>\n"; 1427 1445 echo "\t<dd>" . make_clickable($user->$key) . "</dd>\n";
Note: See TracChangeset
for help on using the changeset viewer.