当前位置: 首页>>代码示例>>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;未经允许,请勿转载。