From 8e42a01ca1127c6abf52c50e3fd87e77252ce75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=81=E9=80=9D=E4=B8=AD=E6=B2=89=E6=B2=A6?= <1178710004@qq.com> Date: Thu, 7 May 2020 23:55:48 +0800 Subject: [PATCH] =?UTF-8?q?update=20functions.php.=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=A1=A8=E5=89=8D=E7=BC=80=E4=B8=8D=E4=B8=BA?= =?UTF-8?q?wp=E6=97=B6=E4=BC=9A=E9=80=A0=E6=88=90=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=82=B9=E8=B5=9E=E6=95=B0=E9=87=8F=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index d502ec1..101f514 100644 --- a/functions.php +++ b/functions.php @@ -803,11 +803,12 @@ add_action('wp_ajax_hankin_like', 'hankin_like'); // 获取点赞总数量 function count_post_meta($key){ global $wpdb; + global $table_prefix; $sql = "SELECT count(*) as total, SUM(meta_value) as count FROM - wp_postmeta + ".$table_prefix."postmeta WHERE `meta_key` = '".$key."'"; $res = $wpdb->get_row($sql,ARRAY_A); -- Gitee