[WordPress] 外掛分享: CS Likes Counter

首頁外掛目錄 › CS Likes Counter
WordPress 外掛 CS Likes Counter 的封面圖片
100+
安裝啟用
★★★★★
5/5 分(2 則評價)
2683 天前
最後更新
問題解決
WordPress 3.9+ v1.0.6 上架:2016-04-05

內容簡介

Counter 外掛能讓您計算使用者對文章的讚和倒讚數。

計算功能是使用 AJAX。

為防止作弊,每個 IP 地址每 10 分鐘才能投票一次。

使用方法

只需要在 single.php 的迴圈內使用 CS_Likes::show_buttons_like() 函式即可

<?php while(have_post()) : the_post(); ?>
<?php echo CS_Likes::show_buttons_like(); ?>
<?php endwhile; ?>

如果在迴圈外,也可以使用文章的 ID 來呼叫函式

<?php echo CS_Likes::show_buttons_like($post_id); ?>

要獲取贊數,使用以下函式:

<?php $likes_count = CS_Likes::get_post_likes($post_id); ?>

要獲取倒讚數,使用以下函式:

<?php $dislikes_count = CS_Likes::get_post_dislikes($post_id); ?>

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.6) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「CS Likes Counter」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Counter allows you to count the likes and dislikes.
Counting is carried out using AJAX.
Limitation of cheating over IP (from one IP can vote with 10 minutes intervals).
Usage
Simply place the template single.php function call inside the loop


Or use ID of post, if function call outside the loop

To obtain the number of likes, use the function:

To obtain the number of dislikes, use the function:

延伸相關外掛

文章
Filter
Apply Filters
Mastodon