Changeset 2255 for trunk/bp-blogs/bp-blogs-templatetags.php
- Timestamp:
- 01/04/2010 10:29:26 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-blogs/bp-blogs-templatetags.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-templatetags.php
r2199 r2255 187 187 } 188 188 189 function bp_blog_avatar( ) {190 echo bp_get_blog_avatar( );191 } 192 function bp_get_blog_avatar( ) {189 function bp_blog_avatar( $args = '' ) { 190 echo bp_get_blog_avatar( $args ); 191 } 192 function bp_get_blog_avatar( $args = '' ) { 193 193 global $blogs_template, $bp; 194 195 $defaults = array( 196 'type' => 'full', 197 'width' => false, 198 'height' => false, 199 'class' => 'avatar', 200 'id' => false, 201 'alt' => __( 'Blog avatar', 'buddypress' ) 202 ); 203 204 $r = wp_parse_args( $args, $defaults ); 205 extract( $r, EXTR_SKIP ); 194 206 195 207 /*** … … 197 209 * Right now you can use a filter with the ID of the blog to change it if you wish. 198 210 */ 199 return apply_filters( 'bp_get_blog_avatar_' . $blogs_template->blog->blog_id, '<img src="' . apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' ) . md5( $blogs_template->blog->blog_id . '.blogs@' . $bp->root_domain ) . '?d=identicon&s=150" class="avatar blog-avatar" alt="' . __( 'Blog Avatar', 'buddypress' ) . '" />', $blogs_template->blog->blog_id ); 200 } 201 202 function bp_blog_avatar_thumb() { 203 echo bp_get_blog_avatar_thumb(); 204 } 205 function bp_get_blog_avatar_thumb() { 206 global $blogs_template, $bp; 207 208 return apply_filters( 'bp_get_blog_avatar_thumb_' . $blogs_template->blog->blog_id, '<img src="' . apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' ) . md5( $blogs_template->blog->blog_id . '.blogs@' . $bp->root_domain ) . '?d=identicon&s=50" class="avatar blog-avatar thumb" alt="' . __( 'Blog Avatar', 'buddypress' ) . '" />', $blogs_template->blog->blog_id ); 209 } 210 211 function bp_blog_avatar_mini() { 212 echo bp_get_blog_avatar_mini(); 213 } 214 function bp_get_blog_avatar_mini() { 215 global $blogs_template, $bp; 216 217 return apply_filters( 'bp_get_blog_avatar_mini_' . $blogs_template->blog->blog_id, '<img src="' . apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' ) . md5( $blogs_template->blog->blog_id . '.blogs@' . $bp->root_domain ) . '?d=identicon&s=25" class="avatar blog-avatar mini" alt="' . __( 'Blog Avatar', 'buddypress' ) . '" />', $blogs_template->blog->blog_id ); 218 } 211 return apply_filters( 'bp_get_blog_avatar_' . $blogs_template->blog->blog_id, bp_core_fetch_avatar( array( 'item_id' => $blogs_template->blog->blog_id, 'object' => 'blog', 'type' => $type, 'avatar_dir' => 'blog-avatars', 'alt' => $alt, 'width' => $width, 'height' => $height, 'class' => $class, 'email' => get_blog_option( $blogs_template->blog->blog_id, 'admin_email' ) ) ) ); 212 } 213 /* DEPRECATED */ 214 function bp_blog_avatar_thumb() { echo bp_get_blog_avatar('type=thumb'); } 215 function bp_blog_avatar_mini() { echo bp_get_blog_avatar_mini('type=thumb&width=30&height=30'); } 219 216 220 217 function bp_blog_permalink() {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)