Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/02/2015 01:01:03 AM (9 years ago)
Author:
boonebgorges
Message:

Allow group avatars to be disabled.

Props xgz, boonebgorges, imath, hnla.
Fixes #4677.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-template.php

    r9819 r9828  
    710710        }
    711711
     712        // Whether a group avatar will appear.
     713        if ( bp_disable_group_avatar_uploads() || ! buddypress()->avatar->show_avatars ) {
     714            $classes[] = 'group-no-avatar';
     715        } else {
     716            $classes[] = 'group-has-avatar';
     717        }
     718
    712719        /**
    713720         * Filters classes that will be applied to row class of the current group in the loop.
     
    859866        global $groups_template;
    860867
    861         // Bail if avatars are turned off
    862         // @todo Should we maybe still filter this?
    863         if ( ! buddypress()->avatar->show_avatars ) {
     868        // Bail if avatars are turned off.
     869        if ( bp_disable_group_avatar_uploads() || ! buddypress()->avatar->show_avatars ) {
    864870            return false;
    865871        }
Note: See TracChangeset for help on using the changeset viewer.