Do you use buddypress? If you use buddypress, you might have seen the buddypress admin bar.
here is a small screenshot for reference.
As expected,most of the time you will like to brand your site and will be using your custom theme for your buddypres powered site.
and here is what do I mean by buddypress admin bar logo

How do you change the byddypress logo in the buddypress admin bar? do you edit the bp-core/bp-core-adminbar.php or upload image to bp-core/images direcotry.These are not recommended as It will wipe out your customization with the next upgrade of buddypress.
Well,So here Is an easier way , you can use to add your own logo and custom alt text for the logo in the buddypress admin bar.
Buddypress provides two hooks for the purpose
bp_admin_bar_logo_src and bp_admin_bar_logo_alt_text .You cn use these filters to easily specify your logo/alt text without tempering with the core file.
Now let me show you an example how to do it
First of all ,we need to add the filters
<?php /*Let us add the filters */ add_filter("bp_admin_bar_logo_src","cc_my_adminbar_logo");//it will help us modify the logo image add_filter("bp_admin_bar_logo_alt_text","cc_my_adminbar_logo_alt_text"); //allows you to change the alt text specified for your site ?>
As you may see,we have just added the two filters, now we need to define the two functions cc_my_adminbar_logocc_my_adminbar_logo_alt_text.
These function names can be anything, just make sure you use the same name in function definition ,which you used in the “apply_filters”
The function “cc_my_adminbar_logo” returns the absolute url of the image you want to use in place of buddypress default logo. and the function “cc_my_adminbar_logo_alt_text” will return the alt text we want to be used with the admin bar logo.By default it is “buddypress”.
So ,let us complete our code.
<?php /*Let us add the filters */ add_filter("bp_admin_bar_logo_src","cc_my_adminbar_logo");//it will help us modify the logo image add_filter("bp_admin_bar_logo_alt_text","cc_my_adminbar_logo_alt_text"); //allows you to change the alt text specified for your site /* * cc_my_adminbar_logo($default_logo_src) returns the absolute url of your custom image */ function cc_my_adminbar_logo($default_logo_src) { /*let us ignore the defult buddypress logo url,which is passed as the first arguement*/ $my_logo_url="http://example.com/custom-adminbar-logo.png"; /*change the value of $my_logo_url with your own custom logo; */ return $my_logo_url; } /** *cc_my_adminbar_logo_alt_text($defult_alt_text) * returns the custom alt text from admin bar logo */ function cc_my_adminbar_logo_alt_text($defult_alt_text) { /*ignore the default text*/ $my_logo_alt_text="MyWonderFulSite description"; /*Please change the $my_logo_alt_text value with your own custom value */ return $my_logo_alt_text; } ?>
That’s it, we return our own admin bar logo url and the alt text.
To use it on your site, modify the above code with your custom requirement(logo url and text).Put it in some php file and upload it to wp-content/mu-plugins directory,go and visit your site.The logo will be changed.
Though,It’s simple,I hope it helps.Let me know ,how it goes with you.
Note: There was a typing mistake in the original article as pointed by Eduardo,now it is corrected.Thanks Eduardo for pointing.

![[blinklist]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/blinklist.png)
![[Bloglines]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/bloglines.png)
![[del.icio.us]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/digg.png)
![[dzone]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/dzone.png)
![[Facebook]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/facebook.png)
![[Ma.gnolia]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/magnolia.png)
![[Mister Wong]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/misterwong.png)
![[Reddit]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/reddit.png)
![[Sphere]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/sphere.png)
![[Sphinn]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/sphinn.png)
![[StumbleUpon]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/technorati.png)
![[Email]](http://www.thinkinginwordpress.com/wp-content/plugins/bookmarkify/email.png)


