[wp-hackers] Enhanced E-Mails needs testing
Aaron D. Campbell
aaron at xavisys.com
Mon Aug 22 16:28:57 UTC 2011
On 8/21/2011 2:55 PM, John Blackbourn wrote:
> 1. I noticed in the changelog for 0.2 one of the changes was "Removed
> output buffering". I presume the first version of the plugin used
> regular templates for the messages which were captured by an output
> buffer. The current templates are much less user friendly as they have
> to return the template in a string rather than just outputting markup.
That was done at Westi's request:
> 2. The documentation should mention what the templates need to be
> named for each of the various email notifications used in WordPress (I
> had to look at the source of each of the functions in the plugin's
> pluggable.php to find out).
We will definitely need more documentation. This will need to be both
inline as well as in the codex since this is going into core.
> 3. The template hierarchy appears to search for templates in this
> order (using 'email-newuser-admin' as an example):
> * email-newuser-admin.php
> * email-newuser.php
> * email.php
> It would be good if it also searched for email-admin.php before
> searching for email.php, thus allowing a theme to simply define two
> generic templates, email-user.php and email-admin.php (which may well
> be styled completely differently as one is intended for admins and one
> for users). Thoughts?
Personally I think it makes more sense to work as similarly to
get_template_part() and therefore locate_template() as possible. I'd
actually like to see it USE locate_template() but then it would need to
be converted to find files outside the theme directories. Still, it
might make sense to make that possible (with proper checks).
More information about the wp-hackers