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 | Owned by: | 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)
Change History (12)
#1
follow-up:
↓ 2
@
6 years ago
- Milestone changed from Awaiting Review to 5.0.0
This can go into the next release.
#2
in reply to:
↑ 1
@
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:
↓ 4
@
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
@
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
@
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
@
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
@
6 years ago
- Owner set to dcavins
- Status changed from new to reviewing
@DJPaul What do you think? Are we safe? =P
#11
@
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 );
Use bp_get_template_part() in Nouveau's AJAX template loader.