本文整理汇总了PHP中C::get_nsfw方法的典型用法代码示例。如果您正苦于以下问题:PHP C::get_nsfw方法的具体用法?PHP C::get_nsfw怎么用?PHP C::get_nsfw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类C
的用法示例。
在下文中一共展示了C::get_nsfw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_the_excerpt
<?php
if (get_the_excerpt() != '') {
?>
<div class="entry-meta">
<?php
echo get_the_excerpt();
?>
</div>
<?php
}
?>
<!-- nsfw? -->
<?php
if (C::get_nsfw() != '') {
?>
<div class="episode-nsfw">
<p>This episode has been flagged as <span class="nsfw" title="Not Safe For Work">NSFW</span>. Please be advised.</p>
</div>
<?php
}
?>
<!-- content -->
<?php
the_content();
?>
<div class="edit"><?php
edit_post_link('Edit Episode');
示例2: convergence_feed_description_filter
/**
* Filter. Adds a call to action to the end of all Feed items.
* @param type $content
* @return type
*/
function convergence_feed_description_filter($content)
{
global $wp_query;
$post_id = $wp_query->post->ID;
$excerpt = get_the_excerpt($post_id);
$nsfw = "";
if (C::get_nsfw() != "") {
$nsfw = "<p>This episode has been flagged as <strong>NSFW</strong>. Please be advised.</p><br /><br />";
}
$fringe = C::get_related_fringe_url();
if ($fringe != "") {
$fringe = '<p>This episode has a related <a href="' . $fringe . '">Fringe</a> episode. You should listen!</a></p>';
}
$content = strip_tags($excerpt) . "<br /><br />" . $nsfw . $content . $fringe;
$extra = '<br /><br />Listen to more at <a href=' . get_bloginfo('siteurl') . '>The-Nexus.tv</a> and follow us on <a href="http://twitter.com/thenexustv">Twitter</a>.';
$content = $content . $extra;
return $content;
}