Skip to:
Content

BuddyPress.org

Changeset 12225


Ignore:
Timestamp:
09/07/2018 02:09:08 PM (7 years ago)
Author:
djpaul
Message:

Nouveau: fix filtering Member Directory when specified by user type.

This is a problem we had with BP-Legacy's JS, and as it seems this part was
copied into Nouveau, we are implementing the same fix here. This involves not
using Javascript filtering for the Member Directory filters when a user type
is set.

A better fix would be to rewrite the Javascript to solve the underlying issue.

Fixes #7903 (3.0.x branch)

Props imath

Location:
branches/3.0/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/src/bp-core/bp-core-template.php

    r11938 r12225  
    32463246            }
    32473247        } else {
    3248             if ( bp_get_current_member_type() ) {
     3248            if ( bp_get_current_member_type() || ( bp_is_groups_directory() && bp_get_current_group_directory_type() ) ) {
    32493249                $bp_classes[] = 'type';
    32503250            }
  • branches/3.0/src/bp-templates/bp-nouveau/includes/template-tags.php

    r12212 r12225  
    44 *
    55 * @since 3.0.0
    6  * @version 3.1.0
     6 * @version 3.2.0
    77 */
    88
     
    908908        $classes    = array();
    909909
    910         if ( 'directory' === $bp_nouveau->displayed_nav && ! empty( $nav_item->li_class ) ) {
    911             $classes = (array) $nav_item->li_class;
     910        if ( 'directory' === $bp_nouveau->displayed_nav ) {
     911            if ( ! empty( $nav_item->li_class ) ) {
     912                $classes = (array) $nav_item->li_class;
     913            }
     914
     915            if ( bp_get_current_member_type() || ( bp_is_groups_directory() && bp_get_current_group_directory_type() ) ) {
     916                $classes[] = 'no-ajax';
     917            }
    912918        } elseif ( 'groups' === $bp_nouveau->displayed_nav || 'personal' === $bp_nouveau->displayed_nav ) {
    913919            $classes  = array( 'bp-' . $bp_nouveau->displayed_nav . '-tab' );
Note: See TracChangeset for help on using the changeset viewer.