Skip to:
Content

BuddyPress.org

Changeset 11613


Ignore:
Timestamp:
06/23/2017 05:44:46 PM (7 years ago)
Author:
r-a-y
Message:

bp-legacy: Fix the display of hidden groups in group loops in some instances.

Themes or plugins that use the .hidden CSS declaration to hide content
can conflict with hidden groups in group loops. Themes that utilize the
Bootstrap framework are particularly prone to this problem.

The issue is due to us using the group status as a CSS class and 'hidden'
is a valid BuddyPress group status option.

To workaround this, we check the visibility of a hidden group in the group
loop with JS. If the group is hidden via CSS, we force the display of the
group with the !important rule.

In the future, we should probably deprecate the usage of the hidden CSS
class in group loops for something else.

Props r-a-y, MikeGillihan, hnla, henry.wright.

Fixes #7443.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/js/buddypress.js

    r11606 r11613  
    13971397        return false;
    13981398    } );
     1399
     1400    // Fix hidden group visibility with themes using the .hidden CSS rule.
     1401    jq('#groups-list li.hidden').each(function() {
     1402        if ( jq(this).css('display') === 'none' ) {
     1403            jq(this).css('cssText', 'display: list-item !important');
     1404        }
     1405    });
    13991406
    14001407    /** Button disabling ************************************************/
Note: See TracChangeset for help on using the changeset viewer.