Changeset 5762
- Timestamp:
- 02/13/2012 08:02:41 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-avatars.php
r5729 r5762 796 796 797 797 /** 798 * Check if a given user ID has an uploaded avatar 799 * 800 * @since BuddyPress (1.0) 801 * @param int $user_id 802 * @return boolean 803 */ 804 function bp_get_user_has_avatar( $user_id = 0 ) { 805 806 if ( empty( $user_id ) ) 807 $user_id = bp_displayed_user_id(); 808 809 $retval = false; 810 if ( bp_core_fetch_avatar( array( 'item_id' => $user_id, 'no_grav' => true, 'html' => false ) ) != bp_core_avatar_default() ) 811 $retval = true; 812 813 return (bool) apply_filters( 'bp_get_user_has_avatar', $retval, $user_id ); 814 } 815 816 /** 798 817 * Utility function for fetching an avatar dimension setting 799 818 * -
trunk/bp-xprofile/bp-xprofile-template.php
r5729 r5762 825 825 } 826 826 827 function bp_get_user_has_avatar() {828 829 if ( !bp_core_fetch_avatar( array( 'item_id' => bp_displayed_user_id(), 'no_grav' => true ) ) )830 return false;831 832 return true;833 }834 835 827 function bp_edit_profile_button() { 836 828 global $bp;
Note: See TracChangeset
for help on using the changeset viewer.