Contact Form 7 / Download
Two fixes and one enhancement. 1) The SEO issue reported by Dexter has been fixed (I believe). 2) For wpautop() haters, hook function adding logic changed. 3) New include_blank option added to form tag of drop-down menus.
SEO issue
Dexter and some people told me that there seems be a SEO issue in Contact Form 7.
The “?wpcf7=json” code is used by Contact Form 7 only in AJAX submitting (POST) process. I wonder why Google indexed such URLs even now. Anyway, I worked around the issue.
Now Contact Form 7 doesn’t use “?wpcf7=json”, so I believe that kind of problem is fixed. But Google’s existing indexes are still there, I can’t do anything for that.
If you hate wpautop()
wpautop() is a WordPress’s built-in filter which automatically surrounds a paragraph with <p></p> tag. It’s useful and I like it, while I know some users hate it.
Some users remove the filter by commenting out a line in wp-includes/default-filters.php like below.
//add_filter('the_content', 'wpautop');
# Well, this is just an example. I don’t suggest that.
But when you are using Contact Form 7, this hack doesn’t work.
wpautop() is clever, but it doesn’t correctly treat form control elements. See this ticket. It’s a big issue for Contact Form 7. So Contact Form 7 removes original wpautop() filter, and adds patched one.
Due to this, if you want to remove wpautop() filtering, you need to hack codes in Contact Form 7 so far. It was sometimes confusing for the anti-autop hackers who didn’t know Contact Form 7 is doing such replacing.
In this release, I changed the replacing logic. Now it replaces wpautop() only if original wpautop() is registered on the filters array. So if you hate wpautop(), you can remove it by just editting wp-includes/default-filters.php.
New include_blank option for drop-down menu
If include_blank option is set, drop-down menu inserts a blank item “—” into the top of it. So this tag
[select your-menu "---" "a" "b" "c"]
and this tag
[select your-menu include_blank "a" "b" "c"]
have the same semantics.
I recommend you to use this option because it seems that some browsers don’t submit first option’s value in a menu, even if they shows the first one as selected by default. See also the HTML spec.