Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/30/2014 05:36:09 PM (5 years ago)
Author:
imath
Message:

Disable Group avatar feature if WordPress show avatars setting is disabled

In WordPress Administration Discussion settings, if the option "Show Avatars" is not on, we need to disable the Group Avatar feature to avoid some notices and be consistent with the discussion option.

Fixes #5345
See #5494

File:
1 edited

Legend:

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

    r8678 r8737  
    556556        global $bp, $groups_template;
    557557
     558        if ( ! buddypress()->avatar->show_avatars ) {
     559            return false;
     560        }
     561
    558562        $defaults = array(
    559563            'type'   => 'full',
     
    15591563    <li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_group_permalink( $group ) . 'admin/group-settings' ) ?>"><?php _e( 'Settings', 'buddypress' ); ?></a></li>
    15601564
    1561     <?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?>
     1565    <?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) && buddypress()->avatar->show_avatars ) : ?>
    15621566
    15631567        <li<?php if ( 'group-avatar'   == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_group_permalink( $group ) . 'admin/group-avatar' ) ?>"><?php _e( 'Profile Photo', 'buddypress' ); ?></a></li>
     
    17091713            $group = $groups_template->group;
    17101714        }
    1711    
     1715
    17121716        if ( empty( $user_id ) ) {
    17131717            $user_id = bp_loggedin_user_id();
Note: See TracChangeset for help on using the changeset viewer.