I have just released Contact Form 7 1.10.1, it has a few bug fixes, new features and translation updates. They are not critical or security-related bugs, so you don’t need to upgrade urgently.
Download | Plugin Homepage | FAQ | Support Forum
(日本語のドキュメントは下のほうにあります。)
Bugs fixed
- A necessary ‘global $wp_version’ declaration was missing. This omission could cause erroneous paths of JavaScript and CSS files in case if you were using it on specific WordPress version.
- If the items include the apostrophe character (‘) in it, checked items were being erroneously unchecked when getting validation errors.
New features
- Controllable CSS loading: If you don’t need the original CSS files loaded by Contact Form 7, define the
WPCF7_LOAD_CSSconstant as false (default: true). You can do this easily by inserting this line into your wp-config.php file:
define( 'WPCF7_LOAD_CSS', false ); use_label_elementoption for checkbox and radio button. By using this, you can wrap each checkbox and radio button with<label>tag. You can use it like this:
[checkbox fruit use_label_element "Orange" "Apple" "Banana"]- Loading the JavaScripts in the header when the
WPCF7_LOAD_JSconstant is defined as header.By default, Contact Form 7 loads scripts in the footer if you are using it on WordPress 2.8 or higher. But we’ve heard from a lot of users that loading scripts in the footer won’t work in several instances. If you have such a situation, try to insert this line into your wp-config.php file:
define( 'WPCF7_LOAD_JS', 'header' );But, most of the time the reason that loading scripts in the footer fails is because it is missing the
wp_footer()call in their template. Lester Chan discusses this issue. My suggestion would be not to use the aboveWPCF7_LOAD_JSsetting, but to ask your theme’s author to fix this issue and insert thewp_footer()as a WordPress theme standard.
Translation Updates
New addition:
- Slovak (sk) – Patrik Bóna
Updated:
- German (de_DE) – Ivan Graf
- Italian (it_IT) – Gianni Diurno
- Persian (Farsi; fa_IR) – Mohammad Musavi
Thank you.
(in Japanese from here)
Contact Form 7 1.10.1 をリリースしました。このバージョンにはいくつかのバグ修正、新しい機能と翻訳の更新が含まれます。これらのバグは重大なものやセキュリティに関係したものではないので、急いでアップグレードする必要はありません。
修正済みのバグ
- 必要な ‘global $wp_version’ の宣言が抜けていました。特定のバージョンの WordPress を使っている場合において、間違った JavaScript と CSS のパスが生成される可能性がありました。
- チェックボックスやラジオボタンなどで選択された項目が、検証エラー表示時に間違って選択から外される問題がありました。この問題は項目の値がアポストロフィー (‘) を含む場合にみられました。
新しい機能
- 制御可能な CSS 読み込み。Contact Form 7 が読み込む CSS ファイルを必要としない場合は、
WPCF7_LOAD_CSS定数を false に指定してください(デフォルトは true)。wp-config.php に次の行を追加するとよいでしょう:
define( 'WPCF7_LOAD_CSS', false ); - チェックボックスとラジオボタンに
use_label_elementオプションを追加。このオプションを使用すると、チェックボックスとラジオボタンの個々の項目を<label>タグで包みます。使用例は次の通り:
[checkbox fruit use_label_element "オレンジ" "リンゴ" "バナナ"] WPCF7_LOAD_JS定数が header に指定されている場合に JavaScript をヘッダーに読み込みます。WordPress 2.8 以上で使用する場合、デフォルトでは Contact Form 7 はスクリプトをフッターに読み込みます。しかし、多くのユーザーからの報告によると、フッターへの読み込みが機能しない場合があるようです。もしそのような問題がみられる場合は、試しに以下の行を wp-config.php に追加してみてください:
define( 'WPCF7_LOAD_JS', 'header' );とはいうものの、このフッターへのスクリプト読み込みが失敗する問題の理由のほとんどは、使っているテンプレートで
wp_footer()を正しく呼び出していないことにあります。Lester Chan がこのことについて説明しています。ですから、上に書いた設定を使うよりも、お使いのテーマの作者に WordPress のテーマの標準に従うよう修正してもらうようにお願いすることをお勧めします。
翻訳の更新
新たに追加されたもの:
- スロバキア語 (sk) – Patrik Bóna
更新されたもの:
- ドイツ語 (de_DE) – Ivan Graf
- イタリア語 (it_IT) – Gianni Diurno
- ペルシャ語 (Farsi; fa_IR) – Mohammad Musavi
ありがとうございます。