提交 e466454e 编写于 作者: ijianbo's avatar ijianbo

修复bug:使用微慕api缓存插件时,采用memcached服务的时候,文章浏览数不更新

上级 0a99460e
......@@ -510,13 +510,15 @@ class RAM_WP_REST_Posts_Controller extends WP_REST_Controller {
$minapper_cache_type =get_option('minapper_cache_type');
if($minapper_cache_type=='memcached')
{
$cachedata->pageviews=$pageviews;
$data=$cachedata->data;
$data['pageviews']=$pageviews;
$cachedata->data=$data;
}
else{
$cachedata['pageviews']=$pageviews;
}
$response = rest_ensure_response( $cachedata );
return $response;
//$response = rest_ensure_response( $cachedata );
return $cachedata;
}
......
......@@ -3,7 +3,7 @@
Plugin Name: REST API TO MiniProgram 微慕小程序
Plugin URI: https://www.minapper.com
Description: 为微信小程序、app提供定制化WordPress REST API json 输出.
Version: 4.0.7
Version: 4.0.8
Author: jianbo
Author URI: https://www.minapper.com
License: GPL v3
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册