{"id":2130,"date":"2014-11-18T08:25:56","date_gmt":"2014-11-18T08:25:56","guid":{"rendered":"http:\/\/musilda.cz\/?p=2130"},"modified":"2014-11-18T08:25:56","modified_gmt":"2014-11-18T08:25:56","slug":"ziskani-odeslanych-dat-z-contact-form-7","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/ziskani-odeslanych-dat-z-contact-form-7\/","title":{"rendered":"Z\u00edsk\u00e1n\u00ed odeslan\u00fdch dat z Contact Form 7"},"content":{"rendered":"
Dnes to nen\u00ed ani moc \u010dl\u00e1nek, nebo n\u00e1vod, ale a\u017e zase budu hledat, pro\u010d nefunguje z\u00edsk\u00e1n\u00ed posted_data v\u00a0wpcf7_mail_sent pro Contact Form 7, tak abych to na\u0161el.\u00a0<\/p>\n
Pokud pot\u0159ebujete prov\u00e9st v Contact Form 7 n\u011bjakou akci a\u017e po \u00a0odesl\u00e1n\u00ed formul\u00e1\u0159e, bude se v\u00e1m hodit hook wpcf7_mail_sent. V n\u00e1vodech a diskuz\u00edch pak zjist\u00edte, \u017ee pro z\u00edsk\u00e1n\u00ed odeslan\u00fdch dat v\u00e1m sta\u010d\u00ed m\u00edt funkci n\u011bjak takto:<\/p>\n
\nfunction udelej_neco($contact_form){\n $data = $contact_form->posted_data;\n}\n<\/pre>\nBohu\u017eel posledn\u00ed verze pluginu u\u017e to tak nem\u00e1 a posted_data vrac\u00ed pr\u00e1zdnou hodnotu.
\nFunkci je pot\u0159eba upravit takto:<\/p>\n
\n function udelej_neco($contact_form){\n $submission = WPCF7_Submission::get_instance();\n\n if ( $submission ) {\n $posted_data = $submission->get_posted_data();\n }\n }\n<\/pre>\nTak\u017ee, pokud jste n\u011bco podobn\u00e9ho hledali, douf\u00e1m, \u017ee jsem v\u00e1m u\u0161et\u0159il \u010das.<\/p>\n","protected":false},"excerpt":{"rendered":"
Dnes to nen\u00ed ani moc \u010dl\u00e1nek, nebo n\u00e1vod, ale a\u017e zase budu hledat, pro\u010d nefunguje z\u00edsk\u00e1n\u00ed posted_data v\u00a0wpcf7_mail_sent pro Contact Form 7, tak abych to na\u0161el.\u00a0<\/p>\n","protected":false},"author":1,"featured_media":1978,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-2130","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippety"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2130"}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=2130"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2130\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/1978"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=2130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=2130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=2130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}