// Display inscription
$crcr_gr_inscription = get_post_meta( get_the_id(), 'crcr_gr_inscription', true );
If ( !empty($crcr_gr_inscription) ) {
echo "<center>" ;
echo nl2br("$crcr_gr_inscription",false) ;
echo "</center>" ;
}
Provided I enter the text to be displayed directly into the database (using Adminer) my text displays as desired. My question is: how to enter my text using New Record or Edit Record? Line feeds always seem to be ignored when entering text in this way.
]]>I dont think this is supposed to happen, but when I try adding more than just one line of text to the text fields for the maintenance page, and then save it, ALL new lines get a lovely br-tag added. That INCLUDES other tags as well, eg. h2.
After reediting and saving the code, MORE breaks get added!
Thus I cannot use this plugin and have it disabled and deleted
Version: 5.0.1
WP: 4.9.8
First thank you for great plugin working absolutely fine.
Looking for assistance on design, i have added HTML template for new posts notifications but it automatically added new <br/> on each line break… (after all html tags even). Is there any hook or filter to disable “nl2br”.
Kindly assist,
Thanks
On sendinblue.php on line #649 you guys are doing a nl2br($message) which can throw off some plugins such as WooCommerce for instance.
A suggestion would be to put a checkbox on the plugin page for ppl to opt-in if they want nl2br applied to the message or not.
Thank you for the plugin and great service! I migrated over from Mandrill when they shut out transactional emails for free tiers and I couldn’t be happier.
https://www.ads-software.com/plugins/mailin/
]]>I have a problem with wpMandrill plugin and WooCommerce mails.
I need to send a mix of WooCommerce mails in plain text and HTML. I can’t find a way to make it work properly with the nl2br feature. I mean, I want it enabled for WC plain text mails while I want it disabled for WC HTML email type.
Is there a way to achieve that using the mandrill_nl2br and/or mandrill_payload filters? Or maybe there is another filter to use for that.
It seems that there is no distinction between different WooCommerce mails (i.e. New account, New order, etc.) in the array
$message['tags']['automatic']
This is in fact my problem. I think.
Any help?
Thank you
Jonathan
https://www.ads-software.com/plugins/wpmandrill/
]]>I do have a request, though. I noticed when a post had an un-ordered list that it would display “fine” in the actual post, but would have many more line breaks in the NLP display. Viewing the source, the NLP display adds BR tags around every
LI tag.
I’m not a coder, but browsing through the plugin’s “network-latest-posts.php” file, I found four calls to nl2br(). Based on the if() statements, I changed only the one pertinent to my scenario and voila: the extraneous BR tags were gone. Yay!
FYI, I changed line 972 from:
echo nl2br( do_shortcode( $field->post_content ) );
to:
echo ( do_shortcode( $field->post_content ) );
But my problem is that when I update the plugin to your next release, my change to your code will disappear. Can you make this a user-interface option, so it is saved between plugin updates?
Thanks again.
]]>I’m a new user of WordPress, trying to get things to “look” right. But I’m seeing that WP does some automatic formatting of my text, such as inserting line breaks whenever I hit enter, and also wrapping text in paragraph tags.
Now since I’m a competent HTML guy, and also wanting to control my markup quite tightly, this is a bit annoying. Now, looking around the code, I can see the function “the_content” seems to apply the line breaks and other stuff in the second line, where it goes
$content = apply_filters(‘the_content’, $content);
Now, it would be simply to comment this section out, but as I’m quite new to this, I wonder if there’s another way to go about it (also, it’s hard for me to “picture” the consequences of commenting the above code out). So any advice from seasoned users of WP?
]]>Anyone know how to fix this problem…?
]]>Thanks!
]]>