[wp-hackers] Enhanced E-Mails needs testing

Wojtek Szkutnik wojtek.szkutnik at gmail.com
Sun Aug 21 22:58:21 UTC 2011

Thanks for the input!

As for output buffering, this is per westi's suggestions:

   - Personally, I think it would be better to try and avoid using output
   buffering to capture the content of the HTML version of the emails – it
   should be fairly easy to switch over the way this works when we bring these
   into core.
   - In general output buffering is “not a good idea” ™ and we tend to avoid
   it. There aren’t specific pitfalls I can highlight here but I think it will
   probably end up easier to maintain and extend if it if function and string
   building based over output buffering.

If we decide that output buffering is the way to go, it shouldnt take too
much work to switch it back to the way it was. I'm not entirely sure which
one is better and I definitely liked the clean code of the 0.1 version.

@docs +1, I'm still working on the docs and some basic info for developers

@templates I have to think it through, your point is valid but I have to
consider if this doesn't cause some cross-template problems. I will get back
to it soon :)


On Sun, Aug 21, 2011 at 11:55 PM, John Blackbourn
<johnbillion+wp at gmail.com>wrote:

> On 21 August 2011 21:49, Wojtek Szkutnik <wojtek.szkutnik at gmail.com>
> wrote:
> > I'd like to chime in - it's a really exciting project, but since we have
> > released the last version recently, it wasn't tested as thoroughly as
> we'd
> > like it to be. There is probably a lot of polishing to do, but I'll be
> happy
> > to work on it as long as there is place for improvements. Now that GSoC
> is
> > almost over, I have scheduled part of my time for developing this project
> > further - any suggestions are highly welcome!
> 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.
> What was the reason for switching away from output buffering? Was
> there a performance issue? I ask because I would imagine if the
> functionality of this plugin was rolled into core then themes should
> be able to template the emails by including the email.php (and
> email-foo-bar.php) templates just like regular theme templates. It
> introduces inconsistency if the email templates have to return a
> string instead of just outputting the markup. You've probably already
> discussed all this, but this is my feedback anyway! :)
> 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).
> 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?
> John
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list