Created
October 17, 2013 23:41
-
-
Save pglewis/7034243 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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