當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。