{"id":1658,"date":"2011-06-16T15:27:57","date_gmt":"2011-06-16T06:27:57","guid":{"rendered":"http:\/\/apr20.net\/?p=1658"},"modified":"2011-06-16T15:27:57","modified_gmt":"2011-06-16T06:27:57","slug":"wordpress-contact-form%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%81%ae%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%a2%e3%83%89%e3%83%ac%e3%82%b9%e7%a2%ba%e8%aa%8d%e3%82%92%e5%ae%9f%e8%a3%85%e3%81%99","status":"publish","type":"post","link":"https:\/\/apr20.net\/?p=1658","title":{"rendered":"WordPress Contact Form\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u78ba\u8a8d\u3092\u5b9f\u88c5\u3059\u308b"},"content":{"rendered":"<p>WordPress\u3067\u3088\u304f\u4f7f\u308f\u308c\u308b\u30e1\u30fc\u30eb\u30d5\u30a9\u30fc\u30e0\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u300cContact Form7\u300d\u3067\u3059\u304c\u3001\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u78ba\u8a8d\u7528\u306e\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u304c\u3001\u6a19\u6e96\u3067\u3064\u3044\u3066\u308b\u304b\u3068\u601d\u3063\u3066\u305f\u3089\u3064\u3044\u3066\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"http:\/\/hello.lumiere-couleur.com\/smilkobuta\/2010\/12\/02\/contact-form-7\u3067\u78ba\u8a8d\u7528\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3092\u52a0\/\" target=\"_blank\">\u3053\u3061\u3089\u306e\u30b5\u30a4\u30c8<\/a>\u3055\u3093\u304c\u3001\u7c21\u5358\u306b\u5b9f\u88c5\u51fa\u6765\u308b\u65b9\u6cd5\u3092\u516c\u958b\u3057\u3066\u304f\u308c\u3066\u307e\u3057\u305f\u306e\u3067\u3001\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h3>\u8a2d\u5b9a\u65b9\u6cd5<\/h3>\n<p>\u30c6\u30fc\u30de\u306e<strong>function.php<\/strong>\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>[php]<br \/>\n&lt;?php<br \/>\nadd_filter( &#8216;wpcf7_validate_email&#8217;, &#8216;wpcf7_text_validation_filter_extend&#8217;, 11, 2 );<br \/>\nadd_filter( &#8216;wpcf7_validate_email*&#8217;, &#8216;wpcf7_text_validation_filter_extend&#8217;, 11, 2 );<br \/>\nfunction wpcf7_text_validation_filter_extend( $result, $tag ) {<br \/>\n    $type = $tag[&#8216;type&#8217;];<br \/>\n    $name = $tag[&#8216;name&#8217;];<br \/>\n    $_POST[$name] = trim( strtr( (string) $_POST[$name], &quot;n&quot;, &quot; &quot; ) );<br \/>\n    if ( &#8216;email&#8217; == $type || &#8216;email*&#8217; == $type ) {<br \/>\n        if (preg_match(&#8216;\/(.*)_confirm$\/&#8217;, $name, $matches)){<br \/>\n            $target_name = $matches[1];<br \/>\n            if ($_POST[$name] != $_POST[$target_name]) {<br \/>\n                $result[&#8216;valid&#8217;] = false;<br \/>\n                $result[&#8216;reason&#8217;][$name] = &#8216;\u78ba\u8a8d\u7528\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u4e00\u81f4\u3057\u3066\u3044\u307e\u305b\u3093&#8217;;<br \/>\n            }<br \/>\n        }<br \/>\n    }<br \/>\n    return $result;<br \/>\n}<br \/>\n?&gt;<br \/>\n[\/php]<\/p>\n<p><strong>Contact Form \uff17<\/strong>\u306e\u65b9\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>[php]<br \/>\n&lt;p&gt;\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9&lt;br \/&gt;<br \/>\n[email* your-email] &lt;\/p&gt;<\/p>\n<p>&lt;p&gt;\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9 (\u78ba\u8a8d\u7528\uff09&lt;br \/&gt;<br \/>\n[email* your-email_confirm] &lt;\/p&gt;<br \/>\n[\/php]<\/p>\n<p>\u3053\u308c\u3067\u7c21\u5358\u306b\u5b9f\u88c5\u51fa\u6765\u307e\u3057\u305f\u3002\u52d5\u4f5c\u78ba\u8a8d\u6e08\u3067\u3059\u3002<\/p>\n<p>\u53c2\u8003\u30b5\u30a4\u30c8\uff1a<a href=\"http:\/\/hello.lumiere-couleur.com\/smilkobuta\/2010\/12\/02\/contact-form-7\u3067\u78ba\u8a8d\u7528\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3092\u52a0\/\" target=\"_blank\">\u3053\u3076\u305f\u306e\u30e9\u30c3\u30d1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\u3067\u3088\u304f\u4f7f\u308f\u308c\u308b\u30e1\u30fc\u30eb\u30d5\u30a9\u30fc\u30e0\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u300cContact Fo&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1718,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1658","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-web-category"],"_links":{"self":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts\/1658","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1658"}],"version-history":[{"count":0,"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts\/1658\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}