boonebgorges / bp-social-media-profiles

Customize and streamline the display of BuddyPress profile fields related to other social media sites
21 stars 7 forks source link

small change to 'bp_smp_get_icon_url_from_site_name' filter #18

Closed locomo closed 8 years ago

locomo commented 8 years ago

it would make it much easier to customize the icons if the 'bp_smp_get_icon_url_from_site_name' filter passes $site_name

return apply_filters( 'bp_smp_get_icon_url_from_site_name', BP_SMP_PLUGIN_URL . 'images/icons/' . $site_name . '.png', $site_name ); this would then allow something like this: `add_filter( 'bp_smp_get_icon_url_from_site_name', 'my_custom_social_media_icons', 10, 2 ); function my_custom_social_media_icons( $icon_url, $site_name = '' ) {

if ( 'twitter' == $site_name ) {
    $icon_url = "blar";
}

return $icon_url;

}`

boonebgorges commented 8 years ago

Definitely. This was surely an oversight when the filter was orignially written.

locomo commented 8 years ago

awesome, thanks