Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 14 months ago

#8046 closed enhancement (wontfix)

Nouveau bp_nouveau_ajax_object_template_loader(): Use bp_get_template_part()

Reported by: dcavins's profile dcavins Owned by: dcavins's profile dcavins
Milestone: Priority: normal
Severity: normal Version: 4.1.0
Component: Core Keywords: has-patch
Cc: dcavins

Description

While adding Nouveau support to a plugin that interacts with BP's template stack and template selection filters, I found that the AJAX-requested template parts in Nouveau were not utilizing the bp_get_template_part filter. I think this was done so that the template path could be passed through a Nouveau-specific filter instead of just being built. Here's a small change that preserves the Nouveau filter while also using a slightly modified version of bp_get_template_part().

Attachments (1)

8046.1.diff (3.5 KB) - added by dcavins 6 years ago.
Use bp_get_template_part() in Nouveau's AJAX template loader.

Download all attachments as: .zip

Change History (12)

@dcavins
6 years ago

Use bp_get_template_part() in Nouveau's AJAX template loader.

#1 follow-up: @espellcaste
6 years ago

  • Milestone changed from Awaiting Review to 5.0.0

This can go into the next release.

#2 in reply to: ↑ 1 @dcavins
6 years ago

Replying to espellcaste:

This can go into the next release.

Thanks for taking a look, @espellcaste.

@imath, if you have a minute, could you take a look and make sure I'm not steamrolling the intent of the original code? Thanks!

#3 follow-up: @imath
6 years ago

Hi @dcavins

Sure! To be honest, I can't remember why I've done so 😬. I will try to find why asap !

#4 in reply to: ↑ 3 @dcavins
6 years ago

Replying to imath:

Hi @dcavins

Sure! To be honest, I can't remember why I've done so 😬. I will try to find why asap !

Thanks!

#5 @imath
6 years ago

@dcavins

I found why I couldn't remember. Actually, I was using bp_get_template_part() 😀 see the last state of the file on the Next Template Packs repo

This part was edited in [11821] by @DJPaul. I'd ask him to be sure before committing the change ;)

#6 @dcavins
6 years ago

Ah! It looks like the point of that commit was to introduce a new filter, which couldn't have been done with the way bp_get_template_part() behaved at that time. We'll see if Paul has any memory beyond that.

Thanks again!

#7 @espellcaste
6 years ago

  • Owner set to dcavins
  • Status changed from new to reviewing

@DJPaul What do you think? Are we safe? =P

Last edited 6 years ago by espellcaste (previous) (diff)

#8 @imath
5 years ago

  • Milestone changed from 5.0.0 to Up Next

Let's take more time to fix this.

#9 @imath
21 months ago

  • Milestone changed from Up Next to 12.0.0

#10 @imath
14 months ago

  • Milestone changed from 12.0.0 to Under Consideration

#11 @dcavins
14 months ago

  • Milestone Under Consideration deleted
  • Resolution set to wontfix
  • Status changed from reviewing to closed

I think we can close this, since Nouveau has its own filter that accomplishes a similar result: $template_path = apply_filters( 'bp_nouveau_object_template_path', $template_path );

Note: See TracTickets for help on using tickets.