Skip to content

Instantly share code, notes, and snippets.

@pglewis
Created October 17, 2013 23:41
Show Gist options
  • Save pglewis/7034243 to your computer and use it in GitHub Desktop.
Save pglewis/7034243 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'bp_core_fetch_avatar', 'my_bp_core_fetch_avatar', 10, 9 );
function my_bp_core_fetch_avatar ($value, $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir) {
$avatar_url = pods_image_url ( pods( 'user', $item_id )->field( 'avatar' ) );
return '<img src="' . $avatar_url . '" class="' . esc_attr( $params[ 'class' ] ) . '"' . $css_id . $html_width . $html_height . $params[ 'alt' ] . $params[ 'title'] . ' />';
}
add_filter( 'bp_core_fetch_avatar_url', 'my_bp_core_fetch_avatar_url', 10, 2 );
function my_bp_core_fetch_avatar_url( $value, $params ) {
return pods_image_url ( pods( 'user', $params[ 'item_id' ] )->field( 'avatar' ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment