[Plugin: Grunion Contact Form] Grunion appears to be printing stuff when it should be returning it
-
Okay, first of all, here’s how my WordPress site works:
I’m one of those weird template system fanboys, and I have an obsession with splitting visual stuff from any kind of back-end logic. So, all the HTML for my website is in Smarty templates, and my WordPress theme basically grabs information from the back-end (as necessary) and passes it to the templates.This means all of the processing happens before any of the rendering: if anything gets printed, it appears at the very top of the document and results in an invalid page. Which breaks any web browser that feels such foolishness should not be tolerated. (Surprisingly enough, that is only Internet Explorer).
Now, for a while I was using the_content() and output buffering to get post content. That prints it, but PHP catches the printed output and stores it in a variable instead. Kinda silly.
I switched that to use get_the_content. When I did that, this happened…
https://www.dylanmccall.com/contact/
If you look at the source you’ll see, at the very top of the file:
<link rel=’stylesheet’ id=’grunion.css-css’ href=’https://www.dylanmccall.com/wp-content/plugins/grunion-contact-form/css/grunion.css?ver=3.3.1′ type=’text/css’ media=’all’ />
Normally that appears right above the contact form.
Two things here:
This shouldn’t be printed the way it is, because it screws up anyone who uses get_the_content.
Can you use register_style and enqueue_style for this? I think it’s a little cleaner.Thank you for the great plugin! It works really well ??
https://www.ads-software.com/extend/plugins/grunion-contact-form/
- The topic ‘[Plugin: Grunion Contact Form] Grunion appears to be printing stuff when it should be returning it’ is closed to new replies.