Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从PHP中的函数中检索投票金额变量并输入仪表插件_Php_Variables_Gauge_Vote_Meter - Fatal编程技术网

从PHP中的函数中检索投票金额变量并输入仪表插件

从PHP中的函数中检索投票金额变量并输入仪表插件,php,variables,gauge,vote,meter,Php,Variables,Gauge,Vote,Meter,我试图从WTI Like Post Pro wordpress插件中提取与不同帖子相关联的喜欢的总数,然后减去不喜欢的数量,并将这个总数输入wordpress中的一个米规gaugepress中……这与在中找到的相似 仪表的外观如下所示: 查看链接,因为我没有发布图片的声誉 此外,我需要一个“相似”投票来代表仪表上的几个“单位”,例如,一个相似=8个单位 我试着询问这两个插件的作者,但都没有回应 以下是来自WTI-Like Post Pro的代码: 函数GetWtiLikeCount$post

我试图从WTI Like Post Pro wordpress插件中提取与不同帖子相关联的喜欢的总数,然后减去不喜欢的数量,并将这个总数输入wordpress中的一个米规gaugepress中……这与在中找到的相似

仪表的外观如下所示:

查看链接,因为我没有发布图片的声誉

此外,我需要一个“相似”投票来代表仪表上的几个“单位”,例如,一个相似=8个单位

我试着询问这两个插件的作者,但都没有回应

以下是来自WTI-Like Post Pro的代码:

函数GetWtiLikeCount$post\u id{ 全球$wpdb; $show_symbols=获取选项'wti_like_post_show_symbols'; $wti_like_count=$wpdb->get_varSELECT SUMvalue FROM{$wpdb->prefix}wti_like_post,其中post_id='$post_id'和value>=0; 如果!$wti\u喜欢\u计数{ $wti_like_计数=0; }否则{ 如果$show_符号{ $wti_like_count=+.$wti_like_count; }否则{ $wti_like_count=$wti_like_count; } } 返回$wti_like_count; } /** *获得一个职位 *@param$post_id整数 *@返回字符串 */ 函数GetWtiUnlikeCount$post\u id{ 全球$wpdb; $show_symbols=获取选项'wti_like_post_show_symbols'; $wti_不像_count=$wpdb->get_varSELECT SUMvalue FROM{$wpdb->prefix}wti_like_post,其中post_id='$post_id'和value