[buddypress-trac] [BuddyPress Trac] #7434: BP Email Template Hierarchy
buddypress-trac
noreply at wordpress.org
Thu Feb 2 15:26:12 UTC 2017
#7434: BP Email Template Hierarchy
-------------------------+-----------------------------------
Reporter: espellcaste | Owner: DJPaul
Type: enhancement | Status: new
Priority: normal | Milestone: 2.8
Component: Emails | Version:
Severity: normal | Keywords: has-patch 2nd-opinion
-------------------------+-----------------------------------
Currently, the order of the BP Email template hierarchy is as follow:
- Look for the template on the theme folder: (single-bp-email-slug-
title.php)
- Look for the template on the theme folder without slug on it (single-bp-
email.php)
- Look for the template on buddypress/assets/emails/single-bp-email.php
That's fine until you need to customize the templates so that they are
almost completely different from one another. I have a scenario where I
have "components" on the site. Each component has its own email, with
different styling.
So for me, it is easier to create a custom single-bp-email-slug-here.php
and customize to the way I want. But creating specific template for each
email is adding up to the theme folder, together with others single-
custom-posttypes.php and page-custom-template.php, etc.
So I'd like to suggest that the priority of the folder to fetch the
templates from, should be BuddyPress and not the theme's.
Here follows the order I believe would be better:
- Look for the template on buddypress/assets/emails/single-bp-emails-slug-
title.php
- Look for the template on the theme folder: single-bp-emails.php
- Look for the template on buddypress/assets/emails/single-bp-emails.php)
Maybe single-bp-emails-ID.php would also be an option. I created a patch
with the example above.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7434>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list