Skip to:
Content

BuddyPress.org

Opened 3 years ago

Closed 3 years ago

#7131 closed defect (bug) (fixed)

[BP Nouveau Request] BP_Group_Extension->widget_diplay() is never reachable

Reported by: imath Owned by: imath
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: Groups Keywords: has-patch
Cc:

Description

The action added to 'groups_custom_group_boxes' that calls the Group Class widget_display method is inside an if statement that is always false. See below

if ( ! bp_current_action() && bp_is_current_action( 'home' ) ) {}

It's not possible for the current action to be home and nothing at the same time :)

So i'd suggest to use the bp_is_group_home() template tag instead, to give it a chance to be used in case the theme is using the bp_custom_group_boxes() template tag.

Attachments (1)

7131.patch (523 bytes) - added by imath 3 years ago.

Download all attachments as: .zip

Change History (4)

@imath
3 years ago

#1 @imath
3 years ago

  • Summary changed from BP_Group_Extension->widget_diplay() is never reachable to [BP Nouveau Request] BP_Group_Extension->widget_diplay() is never reachable

#2 @imath
3 years ago

  • Owner set to imath
  • Status changed from new to assigned

#3 @imath
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 10905:

Groups: Make sure BP_Group_Extension::widget_display() can be used

On the single item home (eg: a custom front template), it will now be possible to use bp_custom_group_boxes() to get the content provided by the Group extensions in their widget.

2 unit tests are checking this only happens when on the Groups single item home.

Fixes #7131

Note: See TracTickets for help on using tickets.