Skip to:
Content

BuddyPress.org

Opened 4 years ago

Closed 4 years ago

#8391 closed defect (bug) (fixed)

BP Nouveau: improve Groups Loop and single Groups Headers (with & without cover) templates

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 7.0.0 Priority: normal
Severity: normal Version: 3.0.0
Component: Templates Keywords: has-patch
Cc:

Description

I was testing the improvements we brought to the BP REST API when I've noticed the Group Types were not included into the regular Groups single item header.

Exploring the issue, I've noticed there was a weird function in Nouveau used to fill the template container having the meta class. I believe I've improved this function, following the @todo that was inside the code. I had to create a new class BP_Nouveau_Group_Meta as this function was used like an object, eg: <?php echo esc_html( bp_nouveau_group_meta()->status ); ?> to safely deprecate it.
I've fixed the issue about Group Types display in Group headers.

Then, I've noticed another bug about the live update of dates (via moment.js). The "Active" word was disappearing in Group Headers and wasn't refreshing in Loops.

The patch adresses all this + some improvements on code indentation.

Attachments (1)

8391.patch (22.3 KB) - added by imath 4 years ago.

Download all attachments as: .zip

Change History (3)

@imath
4 years ago

#1 @imath
4 years ago

  • Summary changed from BP Nouveau: improve Groups Loop and Groups Header (with & without cover) templates to BP Nouveau: improve Groups Loop and single Groups Headers (with & without cover) templates

#2 @imath
4 years ago

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

In 12789:

BP Nouveau: improve the way Groups template meta data are managed

Deprecate bp_nouveau_group_meta() and introduce bp_nouveau_the_group_meta() as a replacement. This function is used into BP Nouveau template parts to output specific Groups data mainly inside the .item-meta container of the Groups templates.

Stop using bp_nouveau_group_meta() to display Group Types inside the Group's header (and actually make sure the regular and cover image headers are outputting the Group Types if necessary). BP Nouveau is now directly using the BP Groups template tag bp_group_type_list().

Finally, make sure the Group's last activity .item-meta container always shows the "Active" word before the human time diff we're live updating using JavaScript.

Fixes #8391

Note: See TracTickets for help on using tickets.