iDeasilo

Contact Form 7 1.8

Contact Form 7 | Download

(日本語の説明は下にありますので転がして読んでください)

Contact Form 7 1.8 is now available at last! Please note that I’m also planning to release 1.8.1 next month, with even more functions.

The main changes of Contact Form 7 1.8 are below.

Control panel moved from Settings to Manage

This is an important change, particularly if you are a longtime user. In the past, the control panel of Contact Form 7 was in Settings > Contact Form 7. You will now find it in Manage > Contact Form 7.

In addition to this change, I extended the scope of authority to access the control panel. Administrators and editors can read and edit contact forms, while authors and contributors can read only the tag code for inserting into their posts. Whether this change is acceptable to all users is still up for debate, so your feedback would be much appreciated.

Should you find you don’t like the behavior, you can alter it by defining wpcf7_read_capability() and wpcf7_read_write_capability() in or outside the wp-contact-form-7.php. For example, with these codes you can put it back to the old way (only administrators can access the control panel):

function wpcf7_read_capability() { return 'manage_options'; }
function wpcf7_read_write_capability() { return 'manage_options'; }

WP_CONTENT_DIR, WP_CONTENT_URL and other constants

In WordPress 2.6, you can redefine the path of the directory of customizable contents, i.e. wp-content. If you haven’t heard that, read this post from planetOzh. Contact Form 7 1.8 supports this feature by referring the new constants WP_CONTENT_DIR and WP_CONTENT_URL for getting paths. Backward compatibility is also considered.

In addition, it uses these constants:

The WPCF7_* contents are Contact Form 7’s original constants.

You decide paths as you wish by editing source codes and defining these constants.

Compatible with HTTPS

WordPress 2.6 includes better support for visiting the admin over HTTPS. Contact Form 7 1.8 has been updated to be able to work correctly when you are using this feature.

Moving CAPTCHA temporary image directory

In previous releases of Contact Form 7, temporary CAPTCHA images were generated in the directory wp-content/plugins/contact-form-7/captcha/tmp. However, putting the images inside the plugin’s directory could cause trouble when the plugin auto-upgrading function of WordPresss runs (which resets the writing permission of the directory).

To prevent such troubles occurring, the CAPTCHA temporary image directory has been moved to outside the plugin’s directory. Its new home is wp-contents/uploads/wpcf7_captcha.

In most cases that directory is writable, so you can use CAPTCHA without any concerns. If you don’t like the path and want to change it, you can do it by redefining the constants WPCF7_CAPTCHA_TMP_DIR and WPCF7_CAPTCHA_TMP_URL. Don’t forget to make the directory writable.

Adding id: and class: options to submit tag

This may sound like a trivial addition, but it is one many users have requested. There have always been id: and class: options for adding id and class attributes to the form control tags, but the submit tag has not had such options. These options have now, at last, been added to the submit tag in Contact Form 7 1.8.

New translation pack

A translation pack for Hungarian has been newly added. Our thanks must go to Andras Hirschler!

Plans for Contact Form 7 1.8.1

Version 1.8.1 of Contact Form 7 is in the pipeline to be released in September. The following features and improvements are likely to be a part of this version:


Contact Form 7 1.8 をようやくリリースすることができました!

コントロールパネルが 設定 から 管理 へ移動

これまで 設定 > Contact Form 7 にあったコントロールパネルは 管理 > Contact Form 7 に移動しているのでご注意ください。これに伴いアクセス権限の扱いも見直しています。管理者(Administrator) および編集者(Editor) にコンタクトフォームの編集権限が、作成者(Author) および投稿者(Contributor) に埋め込みタグコード表示のみの権限が与えられるようになっています。この変更は賛否の分かれるところかもしれませんのでご意見があれば歓迎します。

この動作が気に入らない場合は、関数 wpcf7_read_capability()wpcf7_read_write_capability() を定義しなおすことで変更も可能です。オリジナルは wp-contact-form-7.php で定義されていますがその外(例えば wp-config.php の中)で定義しても OK です。内容については、たとえば以下のようにすれば従来の権限の扱い(つまり管理者だけがアクセスできる状態)に戻すことができます。

function wpcf7_read_capability() { return 'manage_options'; }
function wpcf7_read_write_capability() { return 'manage_options'; }

WP_CONTENT_DIRWP_CONTENT_URL とその他の定数

WordPress 2.6 から従来の wp-content のパスをユーザーが自由に定義できるようになりました。Contact Form 7 1.8 ではこの変更をサポートするようになっています。

新たに以下の定数を使用するようになっていますので、変更したい場合は自由に再定義して使ってください。

HTTPS に対応

同様に WordPress 2.6 から管理画面の HTTPS 使用のサポートが加わりましたが、それにも対応できるようにしています。

CAPTCHA 画像置き場を移動

これまではテンポラリの CAPTCHA 画像を wp-content/plugins/contact-form-7/captcha/tmp の下に生成していましたが、プラグインのフォルダの中に置いていると WordPress がプラグインを自動アップグレードしようとしたときにフォルダのパーミッションがリセットされて面倒が起こることが多かったので、今後はプラグインフォルダの外に置くことにしました。

新しい置き場所は wp-contents/uploads/wpcf7_captcha で、ここは基本的に書き込み可能にされているはずなので、特に手間もなく CAPTCHA が使えると思います。この置き場所が気に入らない場合は WPCF7_CAPTCHA_TMP_DIRWPCF7_CAPTCHA_TMP_URL の定数で指定していますから好きなように変更してください。指定したフォルダを書き込み可能にしておくのをお忘れなく。

送信(submit)タグに id:class: のオプションを追加

非常に地味な変更ですがけっこう要望が多かったので。送信タグだけこれまでどういうわけか id:class: のオプションが使えませんでしたがこれからは他のタグ同様使えるようになります。

新しい言語パック

ハンガリー語の言語パックが追加同梱されました。作ってくれたのは Andras Hirschler さんです。どうもありがとう!

Contact Form 7 1.8.1 で予定している機能について

1.8 で積みきれなかった機能は 1.8.1 として9月に出します。おそらく次のような機能が追加されるでしょう。