Unomoon Form
Shortcode-based contact form with a confirmation screen.
Install in
Unomoon Form creates mail forms with confirmation screens using shortcodes. It is a GPL fork of MW WP Form by inc2734 / Web の相談所.
Unomoon Form は、ショートコードで確認画面付きのメールフォームを作成できます。MW WP Form の GPL フォークです。
Why this fork exists
The upstream project states on its official site that development is halted except for vulnerability fixes, that it will not re-verify the plugin each time WordPress is updated, and that users should consider migrating to another plugin. As of this writing, upstream is still marked “tested up to 6.4” while WordPress 7.2 has shipped.
This fork exists to do the two things upstream has stopped doing:
- Track upstream security fixes. Every fix released upstream is ported here.
- Keep verifying against current WordPress. Each release is tested on the latest WordPress.
Nothing about the form workflow is changed. If you are happy with MW WP Form and do not need either of the above, there is no reason to switch.
上流は公式サイトで「開発は脆弱性対応を除き停止」「WordPress のアップデートのたびに動作確認はしない」「他のプラグインへの乗り換えを検討してほしい」と表明しています。本フォークは、上流が行わなくなった セキュリティ修正の追随 と 最新 WordPress での動作検証 を引き受けることを目的としています。フォームの作成フロー自体は変更していません。
Differences from MW WP Form
This fork migrates plugin identifiers, post types, shortcode prefixes, hooks, assets and admin labels to the unomoon-form / unomoonform_* namespace. Shortcodes are not compatible: [mwform_text] becomes [unomoonform_text], and so on. The two plugins can therefore be installed side by side, but forms are not shared between them.
プラグイン識別子、投稿タイプ、ショートコード接頭辞、フック、アセット、管理画面ラベルを unomoon-form / unomoonform_* 名前空間へ移行しています。ショートコードに互換性はありません。
Features
- Shortcode-based form creation
- Confirmation screen
- Same-page or separate-page transitions
- Validation rules
- Admin notification email and automatic reply email
- Inquiry data storage
- Chart display for saved inquiry data
- Japanese translation available
主な機能: ショートコードによるフォーム作成/確認画面/同一URLまたは個別URLでの画面遷移/バリデーションルール/管理者宛メールと自動返信メール/問い合わせデータ保存/保存データのグラフ表示/日本語対応
Documentation
Japanese documentation, including how this fork differs from MW WP Form and the things people commonly trip over: https://cielos.phantomoon.com/unomoon-form/
Credits
Original plugin: MW WP Form by inc2734, currently maintained by Web の相談所.
Upstream repository: https://github.com/web-soudan/mw-wp-form
Upstream site: https://mw-wp-form.web-soudan.co.jp
Third-party resources
The following libraries are bundled with the plugin. No external scripts, styles or fonts are loaded at runtime.
- Chart.js (MIT) — renders the inquiry data charts. https://www.chartjs.org/ / https://github.com/chartjs/Chart.js
- jQuery UI “smoothness” theme CSS (MIT) — styles the date picker and admin widgets. https://jqueryui.com/ / https://github.com/jquery/jquery-ui
- jQuery UI MonthPicker 3.0.4 (GPL-3.0-or-later) — month picker widget. The bundled copy is modified to work with jQuery 4; the changes are listed at the top of
js/jquery-ui-month-picker/MonthPicker.js, and its license text is injs/jquery-ui-month-picker/LICENSE.txt. https://github.com/KidSysco/jquery-ui-month-picker
Written by Joobi from the project's own listing. See the source page
Version numbers are <upstream version>.<fork release>. For example 5.1.6.1 is the first fork release that has caught up with upstream 5.1.6; a fix of our own on top of it would be 5.1.6.2, and catching up with upstream 5.1.7 would be 5.1.7.1. Releases before this plugin was submitted to the directory were published on GitHub only, and used a -uno.N suffix (5.1.6-uno.1). The suffix was dropped because stable tags here may contain only numbers and periods.
5.1.9.1
- Security: The inquiry data CSV export now prefixes a single quote to values that start with
=,+,-,@, a tab or a line break. Spreadsheet apps such as Excel treat these as formulas, so a visitor could make a submitted value run as a formula when the CSV was opened (CSV injection). These values now show the leading quote in the file, including negative numbers such as-1and international phone numbers such as+81-90-0000-0000. If another system imports the CSV, check how it handles the quote. Ported from upstream 5.1.9. - Upstream 5.1.9 also hardened the session cookie check. This fork has validated the cookie format and used a prefixed transient key since 5.1.6.2, so no change was needed.
- In the plugin’s own scripts, replaced deprecated jQuery shorthand (
.click( fn ),.change( fn )and the:firstselector) with.on()and.first(), and toggled the tracking number field with.prop( 'disabled' )instead of.removeAttr( 'disabled' ), ahead of jQuery 4. WordPress 7.2 ships jQuery Migrate 3.6.0, which reports them in the console. - The month picker field now works with jQuery 4. The bundled MonthPicker 3.0.4, which is no longer maintained upstream, called
$.isNumeric,$.trimand$.isFunction, which jQuery 4 removed, so the picker did not open on sites whose theme loads jQuery 4. The bundled copy is now the readable source with those calls replaced (and$.proxyand the event shorthand as well), instead of the minified file. - Fixed the previous / next year buttons of the month picker, which stayed disabled unless
MinMonthorMaxMonthwas set (an incompatibility with jQuery UI 1.12 and later). - Hardened the month picker: it no longer builds HTML by joining the field id or option strings,
AltFieldis looked up as a selector only, and HTML tags are stripped from the options in thejsattribute. - Tested on WordPress 7.2.
- セキュリティ: 問い合わせデータの CSV 出力で、先頭が
=・+・-・@・タブ・改行の値の前に'を付けるようにしました。Excel などはこれらを数式として扱うため、送信された値が CSV を開いたときに数式として動くおそれがありました(CSV インジェクション)。-1のような負の数や、+81-90-0000-0000のような国際電話番号も、ファイル上では先頭に'が付きます。CSV をほかのシステムに取り込んでいる場合は、'の扱いを確かめてください。上流 5.1.9 の修正の移植です。 - 上流 5.1.9 のもう 1 つの修正(セッションの Cookie の検証)は、このフォークでは 5.1.6.2 から入っているため、変更はありません。
- jQuery 4 に備えて、このプラグイン自身の JS にある非推奨の書き方(
.click( fn )・.change( fn )・:first)を.on()と.first()に置き換えました。問い合わせ番号の入力欄の有効・無効も、.removeAttr( 'disabled' )ではなく.prop( 'disabled' )で切り替えます。 - 月選択フィールドが jQuery 4 で動くようにしました。同梱の MonthPicker 3.0.4 は上流の更新が止まっていて、jQuery 4 で削除された
$.isNumeric・$.trim・$.isFunctionを使っていたため、テーマが jQuery 4 を読み込むサイトでは選択画面が開きませんでした。minify 済みのファイルをやめ、これらの呼び出し(あわせて$.proxyとイベントの省略形)を置き換えた、読めるソースを同梱します。 - 月選択の前の年・次の年のボタンが、
MinMonthかMaxMonthを指定しないと押せないままだった不具合を直しました(jQuery UI 1.12 以降との相性の問題です)。 - 月選択の守りを固めました。フィールドの id や設定の文字列をつないで HTML を組み立てるのをやめ、
AltFieldはセレクタとしてだけ扱い、js属性の設定からは HTML のタグを取り除きます。 - WordPress 7.2 で動作を確認しました。
5.1.8.2
- Security: With the “querystring” setting, custom fields (post meta) are no longer filled from the post given by
post_idunless their keys are allowed with the newunomoonform_querystring_allowed_meta_keysfilter (orunomoonform_querystring_allowed_meta_keys_<form key>for one form). Any visitor can choose the post ID, so a form placeholder such as{email}could read that meta key from any public post, including values stored by other plugins. Post properties such as{post_title}are not affected, and neither are forms without the setting, which still read the page they are placed on. - With
WP_DEBUGenabled, a notice reports a placeholder left empty for this reason. - セキュリティ: 「URL 引数」がオンのフォームでは、
post_idで指定した投稿のカスタムフィールドを、unomoonform_querystring_allowed_meta_keysフィルターで許可したキーだけ差し込むようにしました。投稿 ID は訪問者が選べるので、{email}などの記号から、ほかのプラグインが公開投稿に保存したメタまで読めました。{post_title}などの投稿の項目と、URL 引数がオフのフォームは今までどおりです。
5.1.8.1
- Security: Tighten access control when a form looks up a post through the
post_idquery string (the “querystring” setting). The check now requires the post to be publicly viewable, not merely in the “publish” status. Inquiry data is saved as “publish” under a non-public post type, so a form containing placeholders such as{email}could display another visitor’s submitted values. Inquiry data post types are also rejected by name, so a filter that makes them viewable cannot reopen this. Ported from upstream 5.1.7 (re-released upstream as 5.1.8 without code changes). - セキュリティ: 「URL 引数」で
post_idの投稿を参照するとき、公開状態だけでなく、投稿タイプも公開かどうかを確かめるようにしました。問い合わせデータは非公開の投稿タイプに「公開」の状態で保存されるため、他人が送った内容を表示できました。上流 5.1.7 の修正の移植です。 - Behavior change: published posts of post types that are not publicly queryable (for example a custom post type registered with
public => false) are no longer substituted throughpost_id. Placeholders for them now stay empty.
5.1.6.3
- Resolved all Plugin Check warnings. Intentional
error_log()calls (mail delivery and upload failures) and the transient-cached direct query are now annotated with the reason; template variables set by_render()are marked as method-local. - Replaced the no-op error handler around the session cookie with a
headers_sent()guard, matching the CSRF cookie code. - Added a plugin icon for the WordPress.org directory.
5.1.6.2
- Renamed the plugin from “Uno WP Form” to “Unomoon Form” to comply with the WordPress.org naming rules. All identifiers moved to the
unomoon-form/unomoonform_*namespace: shortcodes are now[unomoonform_*], hooksunomoonform_*, the form post typeunomoon-form. Sites migrating from Uno WP Form must run the migration script shipped in the GitHub repository (tools/migrate-from-uno-wp-form.php). - Replaced Google Charts with a bundled copy of Chart.js, and bundled the jQuery UI theme CSS. The plugin no longer loads anything from external servers.
- Security: Bound session data to a plugin-prefixed transient key and validate the session cookie format.
- Security: Sanitize all request input (nonce values, settings, inquiry data, chart settings, query strings, server variables) and escape placeholder values substituted into form content.
- Security: Use
wp_handle_upload()for temporary file uploads and generate attachment metadata for saved files. - Removed the mail debug log written to the uploads directory.
- Moved inline scripts and styles to
wp_add_inline_script()/wp_add_inline_style(). - Added direct-access guards to every PHP file.
- Translations are now delivered through translate.wordpress.org instead of bundled files.
5.1.6.1
- Changed the version numbering scheme, dropping the
-uno.Nsuffix. Same code as 5.1.6-uno.1 on GitHub. - Security: Neutralize shortcode syntax in values rendered on the completion screen. A shortcode typed into a form field was executed when the completion screen substituted the value. Ported from upstream 5.1.5.
- Security: Tighten output escaping on the inquiry data list screen. Meta keys derive from mail-content tags and were printed verbatim into HTML id / class attributes and the Screen Options panel. Column identifiers are now mapped to safe slugs. Ported from upstream 5.1.5 and 5.1.6.
- Security: Add output escaping to the dynamic column labels,
response_statusandadmin_mail_to. Ported from upstream 5.1.5. - Tested on WordPress 7.1.
5.1.4.1
- Initial release of the fork, based on MW WP Form 5.1.4.
- Migrated identifiers, post types, shortcode prefixes, hooks, assets and admin labels to the
uno-wp-form/unoform_*namespace (renamed again tounomoon-form/unomoonform_*in 5.1.6.2).
Follow this listing's changes (Atom feed)