コード例 #1
0
ファイル: wti_like_post_site.php プロジェクト: emtv/hackmsi
/**
 * Show the like content
 * @param $content string
 * @param $param string
 * @return string
 */
function PutWtiLikePost($content)
{
    $show_on_pages = false;
    if (is_page() && get_option('wti_like_post_show_on_pages') || !is_page()) {
        $show_on_pages = true;
    }
    if (!is_feed() && $show_on_pages) {
        $wti_like_post_content = GetWtiLikePost('put');
        $wti_like_post_position = get_option('wti_like_post_position');
        if ($wti_like_post_position == 'top') {
            $content = $wti_like_post_content . $content;
        } elseif ($wti_like_post_position == 'bottom') {
            $content = $content . $wti_like_post_content;
        } else {
            $content = $wti_like_post_content . $content . $wti_like_post_content;
        }
    }
    return $content;
}
コード例 #2
0
                    <div class="video-toolbar-item count-cm">
                        <span class="maincolor2hover"><a href="#comments" class="maincolor2hover"><i class="fa fa-comment"></i>  <?php 
    echo get_comments_number();
    ?>
</a></span>
                    </div>
                    <?php 
}
?>
                    <?php 
if (function_exists('GetWtiLikePost')) {
    ?>
                    <div class="video-toolbar-item like-dislike">
                    	<?php 
    if (function_exists('GetWtiLikePost')) {
        GetWtiLikePost();
    }
    ?>
                        <!--<span class="maincolor2hover like"><i class="fa fa-thumbs-o-up"></i></span>
                        <span class="maincolor2hover dislike"><i class="fa fa-thumbs-o-down"></i></span>-->
                    </div>
                    <?php 
}
?>
                    <?php 
if (function_exists('wpfp_link')) {
    ?>
                    <div class="video-toolbar-item tm-favories">
                    	<?php 
    wpfp_link();
    ?>
コード例 #3
0
/**
 * Filter for showing the like/unlike with post excerpts
 * @param string $excerpt
 * @return string
 */
function ExcerptWtiLikePost($excerpt)
{
    if (!is_feed()) {
        $wti_like_post_excerpt = GetWtiLikePost('put');
        $wti_like_post_position = get_option('wti_like_post_position');
        if ($wti_like_post_position == 'top') {
            $excerpt = $wti_like_post_excerpt . $excerpt;
        } elseif ($wti_like_post_position == 'bottom') {
            $excerpt = $excerpt . $wti_like_post_excerpt;
        } else {
            $excerpt = $wti_like_post_excerpt . $excerpt . $wti_like_post_excerpt;
        }
    }
    return $excerpt;
}