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


PHP SendPress_Data::build_social方法代碼示例

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


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

示例1: external

 static function external($template_id, $email_id, $subscriber_id, $e)
 {
     $links = SendPress_Data::build_social();
     if ($links != '' && $links != false) {
         return $links;
     }
     return '';
 }
開發者ID:richardsweeney,項目名稱:sendpress,代碼行數:8,代碼來源:class-sendpress-tag-social-links.php

示例2: render_html


//.........這裏部分代碼省略.........
             }
             $headercontent = "<div style='padding: 10px; text-align:center;'><h1 style='text-align:center; color: " . $header_text_color . " !important;'>" . $header_link_open . $header_text . $header_link_close . "</h1>" . $sub_header_text . "</div>";
             $HtmlCode = str_replace("*|SP:HEADERCONTENT|*", $headercontent, $HtmlCode);
         }
         $HtmlCode = str_replace("*|SP:HEADERBG|*", $header_bg, $HtmlCode);
         $HtmlCode = str_replace("*|SP:HEADERTEXT|*", $header_text_color, $HtmlCode);
         $HtmlCode = str_replace("*|SP:BODYBG|*", $body_bg, $HtmlCode);
         $HtmlCode = str_replace("*|SP:BODYTEXT|*", $body_text, $HtmlCode);
         $HtmlCode = str_replace("*|SP:BODYLINK|*", $body_link, $HtmlCode);
         $HtmlCode = str_replace("*|SP:CONTENTBG|*", $content_bg, $HtmlCode);
         $HtmlCode = str_replace("*|SP:CONTENTTEXT|*", $content_text, $HtmlCode);
         $HtmlCode = str_replace("*|SP:CONTENTLINK|*", $content_link, $HtmlCode);
         $HtmlCode = str_replace("*|SP:CONTENTBORDER|*", $content_border, $HtmlCode);
         $HtmlCode = $this->tag_replace($HtmlCode);
         // Date processing
         $canspam = wpautop(SendPress_Option::get('canspam'));
         $HtmlCode = str_replace("*|SP:CANSPAM|*", $canspam, $HtmlCode);
         $social = '';
         if ($twit = SendPress_Option::get('twitter')) {
             $social .= "<a href='{$twit}' style='color: {$body_link};'>Twitter</a>";
         }
         if ($fb = SendPress_Option::get('facebook')) {
             if ($social != '') {
                 $social .= " | ";
             }
             $social .= "<a href='{$fb}'  style='color: {$body_link};'>Facebook</a>";
         }
         if ($ld = SendPress_Option::get('linkedin')) {
             if ($social != '') {
                 $social .= " | ";
             }
             $social .= "<a href='{$ld}'  style='color: {$body_link};'>LinkedIn</a>";
         }
         $social = SendPress_Data::build_social($body_link);
         $HtmlCode = str_replace("*|SP:SOCIAL|*", $social, $HtmlCode);
         /*
         $dom = new DomDocument();
         	$dom->strictErrorChecking = false;
         	@$dom->loadHtml($HtmlCode);
         	$iTags = $dom->getElementsByTagName('img');
         	foreach ($iTags as $iElement) {
         		$class = $iElement->getAttribute('class');
         	}
         	$body_html = $dom->saveHtml();
         */
         /*
         			$simplecss = file_get_contents(SENDPRESS_PATH.'/templates/simple.css');
         				
         			// create instance
         			$cssToInlineStyles = new CSSToInlineStyles($HtmlCode, $simplecss);
         // grab the processed HTML
         			$HtmlCode = $cssToInlineStyles->convert();
         */
         $display_correct = __("Is this email not displaying correctly?", "sendpress");
         $view = __("View it in your browser", "sendpress");
         $start_text = __("Not interested anymore?", "sendpress");
         $unsubscribe = __("Unsubscribe", "sendpress");
         $instantly = __("Instantly", "sendpress");
         $manage = __("Manage Subscription", "sendpress");
         if ($render) {
             //RENDER IN BROWSER
             if ($inline) {
                 $link = get_permalink($post->ID);
                 $browser = $display_correct . ' <a style="color: ' . $body_link . ';" href="' . $link . '">' . $view . '</a>.';
                 $HtmlCode = str_replace("*|SP:BROWSER|*", $browser, $HtmlCode);
                 $remove_me = ' <a href="#"  style="color: ' . $body_link . ';" >' . $unsubscribe . '</a> | ';
開發者ID:richardsweeney,項目名稱:sendpress,代碼行數:67,代碼來源:class-sendpress-template.php

示例3: wpautop

    if ($fb = SendPress_Option::get('facebook')) {
        if ($social != '') {
            $social .= " | ";
        }
        $social .= "<a href='{$fb}'  style='color: {$bg};'>Facebook</a>";
    }
    if ($ld = SendPress_Option::get('linkedin')) {
        if ($social != '') {
            $social .= " | ";
        }
        $social .= "<a href='{$ld}'  style='color: {$bg};'>LinkedIn</a>";
    }
    //echo $social;
    echo SendPress_Data::build_social();
} else {
    echo SendPress_Data::build_social();
    ?>
						
						<?php 
}
?>
					 <div id="can-spam-template">
					 	<?php 
if (false !== SendPress_Option::get('canspam')) {
    echo wpautop(SendPress_Option::get('canspam'));
} else {
    ?>
	
					 	Blog/Company Name<br>
                                Street Address<br>
                                Anywhere, USA 01234<br>
開發者ID:radscheit,項目名稱:unicorn,代碼行數:31,代碼來源:email-style.2.0.php


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