• Resolved David Jensen

    (@dkjensen)


    Hello –

    I am having a bit of an issue getting my emails to format properly, due to the nl2br() function inside the process_email_html() method.

    I am dynamically pulling in post templates where my %content% is, and the formatting of the post template file has line breaks in it to make it easier to read when coding (tabs, line breaks, etc).

    The only way to get it to format properly is if all my code is on one line.

    Is it possible to replace the nl2br() function automatically applied there, with a filter where the nl2br function gets applied to it?

    That way I can choose to remove the filter, this should not effect other users who are using the plugin.

    https://wordpress.org/plugins/wp-better-emails/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nicolas Lemoine

    (@nlemoine)

    Hi David,

    I’ll release a new version today. I’ll add two filters wpbe_convert_line_breaks and wpbe_convert_urls so you can deactivate this feature.

    add_filter('wpbe_convert_line_breaks', '__return_false');

    will do the trick.

    N.

    Plugin Author Nicolas Lemoine

    (@nlemoine)

    Just released 0.3, you can safely use the filter.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Automatic line breaks in process_email_html()’ is closed to new replies.