Changeset 8244
- Timestamp:
- 04/06/2014 04:20:35 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-template.php
r8168 r8244 2901 2901 } 2902 2902 2903 function bp_get_group_has_avatar( ) {2903 function bp_get_group_has_avatar( $group_id = false ) { 2904 2904 global $bp; 2905 2905 2906 if ( !empty( $_FILES ) || !bp_core_fetch_avatar( array( 'item_id' => $bp->groups->current_group->id, 'object' => 'group', 'no_grav' => true ) ) ) 2906 if ( false === $group_id ) { 2907 $group_id = bp_get_current_group_id(); 2908 } 2909 2910 // Todo - this looks like an overgeneral check 2911 if ( ! empty( $_FILES ) ) { 2907 2912 return false; 2913 } 2914 2915 $group_avatar = bp_core_fetch_avatar( array( 2916 'item_id' => $group_id, 2917 'object' => 'group', 2918 'no_grav' => true, 2919 'html' => false, 2920 ) ); 2921 2922 if ( bp_core_avatar_default( 'local' ) === $group_avatar ) { 2923 return false; 2924 } 2908 2925 2909 2926 return true;
Note: See TracChangeset
for help on using the changeset viewer.