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