function wpcf7_strip_quote_deep($arr) { if (is_string($arr)) { return wpcf7_strip_quote($arr); } if (is_array($arr)) { $result = array(); foreach ($arr as $key => $text) { $result[$key] = wpcf7_strip_quote($text); } return $result; } }
function wpcf7_flamingo_get_value($field, $contactform) { if (empty($field) || empty($contactform)) { return false; } $value = ''; if (in_array($field, array('email', 'name', 'subject'))) { $templates = $contactform->additional_setting('flamingo_' . $field); if (empty($templates[0])) { $template = sprintf('[your-%s]', $field); } else { $template = trim(wpcf7_strip_quote($templates[0])); } $value = $contactform->replace_mail_tags($template); } $value = apply_filters('wpcf7_flamingo_get_value', $value, $field, $contactform); return $value; }
function wpcf7c_ajax_json_echo_step1($items, $result) { global $wpcf7_confflag; $flag = false; if (WPCF7_VERSION == '3.9' || WPCF7_VERSION == '3.9.1') { $flag = $wpcf7_confflag; } else { if (WPCF7_VERSION >= "3.9.2") { if ('mail_sent' == $result['status']) { $flag = true; } } else { $flag = $result['mail_sent']; } } if ($flag) { if (!isset($items["onSubmit"]) || $items["onSubmit"] == null) { $items["onSubmit"] = array("wpcf7c_step1('" . $_POST['_wpcf7_unit_tag'] . "');"); } else { $items["onSubmit"][] = "wpcf7c_step1('" . $_POST['_wpcf7_unit_tag'] . "');"; } // オプションによる追加チェック $form = WPCF7_ContactForm::get_current(); $on_confirm = $form->additional_setting('on_confirm', false); if (!empty($on_confirm)) { foreach ($on_confirm as $key => $on_confirm_func) { $items["onSubmit"][] = wpcf7_strip_quote($on_confirm_func); } } $items["message"] = ""; $items["mailSent"] = false; unset($items['captcha']); } else { // フィルタ指定があればエラー時にアンカーまでスクロールさせる $result = false; if (apply_filters('wpcf7c_input_error_scroll', $result)) { if (!isset($items["onSubmit"]) || $items["onSubmit"] == null) { $items["onSubmit"] = array("wpcf7c_scroll('" . $_POST['_wpcf7_unit_tag'] . "');"); } else { $items["onSubmit"][] = "wpcf7c_scroll('" . $_POST['_wpcf7_unit_tag'] . "');"; } } } return $items; }