You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: includes/Actions/GamiPress/GamiPressController.php
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ public static function fetchAllRankType()
68
68
global$wpdb;
69
69
70
70
return$wpdb->get_results(
71
-
"SELECT ID, post_name, post_title, post_type FROM wp_posts where post_type like 'rank_type' AND post_status = 'publish'"
71
+
$wpdb->prepare("SELECT ID, post_name, post_title, post_type FROM %1s where post_type like 'rank-type' AND post_status = 'publish'", $wpdb->posts)
72
72
);
73
73
}
74
74
@@ -78,7 +78,7 @@ public static function fetchAllRankBYType($query_params)
78
78
79
79
global$wpdb;
80
80
$ranks = $wpdb->get_results(
81
-
$wpdb->prepare("SELECT ID, post_name, post_title, post_type FROM wp_posts where post_type like %s AND post_status = 'publish'", $selectRankType)
81
+
$wpdb->prepare("SELECT ID, post_name, post_title, post_type FROM %1s where post_type like %s AND post_status = 'publish'", $wpdb->posts, $selectRankType)
82
82
);
83
83
84
84
wp_send_json_success($ranks);
@@ -89,7 +89,7 @@ public static function fetchAllAchievementType()
89
89
global$wpdb;
90
90
91
91
return$wpdb->get_results(
92
-
$wpdb->prepare("SELECT ID, post_name, post_title, post_type FROM %1s WHERE post_type LIKE %2s AND post_status = 'publish' ORDER BY post_title ASC", $wpdb->posts, 'achievement-type')
92
+
$wpdb->prepare("SELECT ID, post_name, post_title, post_type FROM %1s WHERE post_type LIKE 'achievement-type' AND post_status = 'publish' ORDER BY post_title ASC", $wpdb->posts)
93
93
);
94
94
}
95
95
@@ -99,17 +99,19 @@ public static function fetchAllAchievementBYType($query_params)
99
99
100
100
global$wpdb;
101
101
$awards = $wpdb->get_results(
102
-
$wpdb->prepare("SELECT ID, post_name, post_title, post_type FROM wp_posts where post_type like %s AND post_status = 'publish'", $selectAchievementType)
102
+
$wpdb->prepare("SELECT ID, post_name, post_title, post_type FROM %1s where post_type like %s AND post_status = 'publish'", $wpdb->posts, $selectAchievementType)
$wpdb->prepare("SELECT ID, post_name, post_title, post_type FROM %1s WHERE post_type LIKE %2s AND post_status = 'publish' ORDER BY post_title ASC", $wpdb->posts, 'points-type')
114
+
$wpdb->prepare("SELECT ID, post_name, post_title, post_type FROM %1s WHERE post_type LIKE 'points-type' AND post_status = 'publish' ORDER BY post_title ASC", $wpdb->posts)
0 commit comments