[wordpress插件] CS Likes CounterCS点赞计数器

wordpress 插件 文章 2020-04-05 20:50 568 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Counter allows you to count the likes and dislikes.

Counter可让您计算喜欢和不喜欢的次数。

Counting is carried out using AJAX.

使用AJAX进行计数。

Limitation of cheating over IP (from one IP can vote with 10 minutes intervals).

限制IP作弊(从一个IP可以每10分钟投票一次)。

Usage

用法

Simply place the template single.php function call inside the loop

只需将模板single.php函数调用放在循环内

  <?php while(have_post()):the_post(); 

?>    

?>    

<?php echo CS_Likes :: show_buttons_like();

?>

?>

<?php结束;

?>

?>

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

或者,如果在循环外调用函数,则使用帖子ID

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

?>

?>

To obtain the number of likes, use the function:

要获得喜欢的次数,请使用以下功能:

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

?>

?>

To obtain the number of dislikes, use the function:

要获取不喜欢的次数,请使用以下功能:

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

?>

?>

安装步骤

    1. Upload cs-likes-counter directory to the /wp-content/plugins/ directory
    2. 将cs-likes-counter目录上传到/ wp-content / plugins /目录

    3. Activate the plugin through the Plugins menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Place function in your template inside the loop
    6. 在循环内的模板中放置函数

    or

      1. Install plugin directly in WordPress through the Plugins, Add New -> Search panel
      2. 通过插件直接在WordPress中安装插件,添加新的->搜索面板

      3. Search for CS Likes Counter
      4. 搜索CS点赞计数器

      5. Place function in your template inside the loop
      6. 在循环内的模板中放置函数

下载地址
https://downloads.wordpress.org/plugin/cs-likes-counter.1.0.6.zip
-EOF-

AI助手支持GPT4.0