當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WPCF7_ContactForm::id方法代碼示例

本文整理匯總了PHP中WPCF7_ContactForm::id方法的典型用法代碼示例。如果您正苦於以下問題:PHP WPCF7_ContactForm::id方法的具體用法?PHP WPCF7_ContactForm::id怎麽用?PHP WPCF7_ContactForm::id使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WPCF7_ContactForm的用法示例。


在下文中一共展示了WPCF7_ContactForm::id方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: process

 /**
  * Subscribe from Contact Form 7 Forms
  *
  * @todo improve smart guessing based on selected MailChimp lists
  *
  * @param WPCF7_ContactForm $cf7_form
  * @return bool
  */
 public function process($cf7_form)
 {
     // was sign-up checkbox checked?
     if (!$this->checkbox_was_checked()) {
         return false;
     }
     $parser = new MC4WP_Field_Guesser($this->get_data());
     $data = $parser->combine(array('guessed', 'namespaced'));
     // do nothing if no email was found
     if (empty($data['EMAIL'])) {
         return false;
     }
     return $this->subscribe($data['EMAIL'], $data, $cf7_form->id());
 }
開發者ID:aaronfrey,項目名稱:PepperLillie-TAT,代碼行數:22,代碼來源:class-contact-form-7.php

示例2: __construct

 public function __construct(WPCF7_ContactForm $contact_form)
 {
     $this->contact_form = $contact_form;
     $config_errors = get_post_meta($contact_form->id(), '_config_errors', true);
     foreach ((array) $config_errors as $section => $errors) {
         if (empty($errors)) {
             continue;
         }
         if (!is_array($errors)) {
             // for back-compat
             $code = $errors;
             $this->add_error($section, $code);
         } else {
             foreach ((array) $errors as $error) {
                 if (!empty($error['code'])) {
                     $code = $error['code'];
                     $args = isset($error['args']) ? $error['args'] : '';
                     $this->add_error($section, $code, $args);
                 }
             }
         }
     }
 }
開發者ID:netmagik,項目名稱:netmagik,代碼行數:23,代碼來源:config-validator.php

示例3: track_cf7_submission

 /**
  * PHPDOC
  *
  * @param WPCF7_ContactForm $form   PHPDOC
  * @param array             $result PHPDOC
  *
  * @return void
  *
  * @since PHPDOC
  */
 public function track_cf7_submission($form, $result)
 {
     $status = $result['status'];
     $type = NelioABAction::SUBMIT_CF7_FORM;
     if ($status == 'mail_sent' || $status == 'demo_mode') {
         $this->send_form_action_if_required($type, $form->id());
     }
 }
開發者ID:jeremygeltman,項目名稱:ThinkThinly,代碼行數:18,代碼來源:alternative-experiment-controller.php


注:本文中的WPCF7_ContactForm::id方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。