当前位置: 首页>>代码示例>>PHP>>正文


PHP Subscriber::replaceCustomFieldValues方法代码示例

本文整理汇总了PHP中Subscriber::replaceCustomFieldValues方法的典型用法代码示例。如果您正苦于以下问题:PHP Subscriber::replaceCustomFieldValues方法的具体用法?PHP Subscriber::replaceCustomFieldValues怎么用?PHP Subscriber::replaceCustomFieldValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Subscriber的用法示例。


在下文中一共展示了Subscriber::replaceCustomFieldValues方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: str_replace

 $confirm_body = str_replace("[!date!]", $date, $confirm_body);
 $confirm_subject = str_replace("[!url!]", $url, $confirm_subject);
 $confirm_body = str_replace("[!url!]", $url, $confirm_body);
 $confirm_subject = str_replace("[!newslettername!]", $newslettername, $confirm_subject);
 $confirm_body = str_replace("[!newslettername!]", $newslettername, $confirm_body);
 $confirm_subject = str_replace("[!address!]", $address, $confirm_subject);
 $confirm_body = str_replace("[!address!]", $address, $confirm_body);
 $confirm_body = str_replace("[!confirm!]", $confirm, $confirm_body);
 $additional_parameters = array("ipaddress" => $_SERVER['REMOTE_ADDR'], "date" => date("g:i d F Y", time()), "url" => $_SERVER['HTTP_REFERER']);
 $params = array();
 date_default_timezone_set($zone);
 $params[0] = $confirm_subject;
 $params[1] = $confirm_body;
 $subscriber = new Subscriber($id);
 foreach ($params as $index => $value) {
     $params[$index] = Subscriber::replaceCustomFieldValues($value, $subscriber);
 }
 $from_email = $newsletter->fromemail;
 if (!$from_email) {
     $from_email = get_bloginfo("admin_email");
 }
 $from_name = $newsletter->fromname;
 if (!$from_name) {
     $from_name = get_bloginfo("name");
 }
 $subject = $params[0];
 $body = $params[1];
 $verificationEmail = array('to' => $email, 'subject' => $subject, 'textbody' => $body, 'fromname' => $from_name, 'from' => $from_email);
 @dispatchEmail($verificationEmail);
 if (empty($return_url)) {
     if (isset($theForm)) {
开发者ID:anirut,项目名称:wp-autoresponder,代码行数:31,代码来源:optin.php

示例2: replaceCustomFields

 /**
  * @param Subscriber $subscriber
  * @param $email
  */
 private function replaceCustomFields(Subscriber $subscriber, &$email)
 {
     $email['subject'] = Subscriber::replaceCustomFieldValues($email['subject'], $subscriber);
     $email['htmlbody'] = Subscriber::replaceCustomFieldValues($email['htmlbody'], $subscriber);
     $email['textbody'] = Subscriber::replaceCustomFieldValues($email['textbody'], $subscriber);
 }
开发者ID:anirut,项目名称:wp-autoresponder,代码行数:10,代码来源:email_queue.php


注:本文中的Subscriber::replaceCustomFieldValues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。