diff --git a/class/points/class-points-admin.php b/class/points/class-points-admin.php
index 13412ba..c091287 100644
--- a/class/points/class-points-admin.php
+++ b/class/points/class-points-admin.php
@@ -21,7 +21,7 @@ class GDK_Points_List_Table extends WP_List_Table
$hidden = $this->get_hidden_columns();
$sortable = $this->get_sortable_columns();
$data = $this->table_data();
- usort($data, [ & $this, 'sort_data']);
+ usort($data, array(&$this,'sort_data'));
$perPage = 30; //每页30个数据
$currentPage = $this->get_pagenum();
$totalItems = count($data);
@@ -220,15 +220,18 @@ class GDK_Points_Admin
$alert = "";
if (isset($_POST['psearch'])) {
$sdata = trim($_POST['psearch']);
- if (preg_match('/E20/', $sdata)) { //order id
+ if (preg_match('/E20/', $sdata)) {
+ //order id
global $wpdb;
$point_id = $wpdb->get_row("SELECT point_id FROM " . GDK_Points_Database::points_get_table("users") . " WHERE description = '{$sdata}'", ARRAY_A)['point_id'];
$points = GDK_Points::get_point($point_id);
- } elseif (filter_var($sdata, FILTER_VALIDATE_EMAIL)) { //email
+ } elseif (filter_var($sdata, FILTER_VALIDATE_EMAIL)) {
+ //email
$user = get_user_by('email', $sdata);
$points = GDK_Points::get_points_by_user($user->ID);
$k[] = '
用户ID:' . $user->ID . ' 总金币为:' . GDK_Points::get_user_total_points($user->ID) . '
';
- } else { //userid
+ } else {
+ //userid
$points = GDK_Points::get_points_by_user($sdata);
$k[] = '用户ID:' . $sdata . ' 总金币为:' . GDK_Points::get_user_total_points($sdata) . '
';
}
@@ -266,16 +269,19 @@ class GDK_Points_Admin
$data['points'] = $_POST['points'];
}
- if ($points) { // 编辑金币
+ if ($points) {
+ // 编辑金币
GDK_Points::update_points($point_id, $data);
- } else { // 增加金币
+ } else {
+ // 增加金币
if (isset($_POST['user_mail'])) { //如果输入邮箱的话
$usermail = $data['user_mail'];
$user = get_user_by('email', $usermail);
$userid = $user->ID;
$username = $user->display_name;
}
- if (isset($_POST['user_id'])) { //如果输入用户ID的话
+ if (isset($_POST['user_id'])) {
+ //如果输入用户ID的话
$user = get_user_by('id', $data['user_id']);
$usermail = $user->user_email;
$userid = $data['user_id'];
diff --git a/functions/Ajax.php b/functions/Ajax.php
index a02bf40..801f8ab 100644
--- a/functions/Ajax.php
+++ b/functions/Ajax.php
@@ -179,7 +179,7 @@ function pay_view()
}
//无脑输出400错误
if (isset($_POST['id'])) {
- payjs_action('付费查看:'.get_the_title($_POST['id']), 'PP' . $_POST['id'], $_POST['money']); //标题,文章id
+ payjs_action('付费查看:' . get_the_title($_POST['id']), 'PP' . $_POST['id'], $_POST['money']); //标题,文章id
}
}
add_action('wp_ajax_pay_view', 'pay_view');
diff --git a/functions/advanced.php b/functions/advanced.php
index 1f35dc1..9d57e54 100644
--- a/functions/advanced.php
+++ b/functions/advanced.php
@@ -21,7 +21,7 @@ if (gdk_option('gdk_cdn_water')) {
//文章首尾添加自定义内容
function gdk_add_content($content)
{
-
+
$before = gdk_option('gdk_artical_top');
$after = gdk_option('gdk_artical_bottom');
if (empty($before) && empty($after) && !is_single()) {