diff --git src/bp-blogs/bp-blogs-template.php src/bp-blogs/bp-blogs-template.php
index fd28f2c36..65e044a42 100644
|
|
|
function bp_blog_avatar( $args = '' ) { |
| 302 | 302 | * admin. Filter 'bp_get_blog_avatar_' . $blog_id to customize. |
| 303 | 303 | * |
| 304 | 304 | * @since 2.4.0 Introduced `$title` argument. |
| 305 | | * @since 6.0.0 Introduced the `$blog_id` & `$admin_user_id` arguments. |
| | 305 | * @since 6.0.0 Introduced the `$blog_id`, `$admin_user_id` and `html` arguments. |
| 306 | 306 | * |
| 307 | 307 | * @see bp_core_fetch_avatar() For a description of arguments and |
| 308 | 308 | * return values. |
| … |
… |
function bp_blog_avatar( $args = '' ) { |
| 320 | 320 | * @type bool $no_grav Default: false. |
| 321 | 321 | * @type int $blog_id The blog ID. Default: O. |
| 322 | 322 | * @type int $admin_user_id The Blog Admin user ID. Default: 0. |
| | 323 | * @type bool $html Default: true. |
| 323 | 324 | * } |
| 324 | 325 | * @return string User avatar string. |
| 325 | 326 | */ |
| … |
… |
function bp_blog_avatar( $args = '' ) { |
| 364 | 365 | esc_attr( $author_displayname ) |
| 365 | 366 | ), |
| 366 | 367 | 'no_grav' => false, |
| | 368 | 'html' => true, |
| 367 | 369 | ) ); |
| 368 | 370 | |
| 369 | 371 | // Use site icon if available. |
| … |
… |
function bp_blog_avatar( $args = '' ) { |
| 407 | 409 | |
| 408 | 410 | // We have a site icon. |
| 409 | 411 | if ( ! is_numeric( $site_icon ) ) { |
| | 412 | // Just return the raw url of the Site Icon. |
| | 413 | if ( ! $r['html'] ) { |
| | 414 | return esc_url_raw( $site_icon ); |
| | 415 | } |
| | 416 | |
| 410 | 417 | if ( empty( $r['width'] ) && ! isset( $size ) ) { |
| 411 | 418 | $size = 'full' === $r['type'] ? bp_core_avatar_full_width() : bp_core_avatar_thumb_width(); |
| 412 | 419 | } else { |
| … |
… |
function bp_blog_avatar( $args = '' ) { |
| 431 | 438 | // Fallback to user ID avatar. |
| 432 | 439 | if ( '' === $avatar ) { |
| 433 | 440 | $avatar = bp_core_fetch_avatar( array( |
| 434 | | 'item_id' => $admin_user_id, |
| | 441 | 'item_id' => $admin_user_id, |
| 435 | 442 | // 'avatar_dir' => 'blog-avatars', |
| 436 | 443 | // 'object' => 'blog', |
| 437 | | 'type' => $r['type'], |
| 438 | | 'alt' => $r['alt'], |
| 439 | | 'css_id' => $r['id'], |
| 440 | | 'class' => $r['class'], |
| 441 | | 'width' => $r['width'], |
| 442 | | 'height' => $r['height'], |
| 443 | | 'no_grav' => $r['no_grav'], |
| | 444 | 'type' => $r['type'], |
| | 445 | 'alt' => $r['alt'], |
| | 446 | 'css_id' => $r['id'], |
| | 447 | 'class' => $r['class'], |
| | 448 | 'width' => $r['width'], |
| | 449 | 'height' => $r['height'], |
| | 450 | 'no_grav' => $r['no_grav'], |
| | 451 | 'html' => $r['html'], |
| 444 | 452 | ) ); |
| 445 | 453 | } |
| 446 | 454 | |