浏览代码

:recycle: putting back type filter on sql query for by-episode

tags/0.9.0
J 4 年前
父节点
当前提交
78f205acf2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      plugins/cia-endpoints/includes/class.make-sortby.php

+ 1
- 1
plugins/cia-endpoints/includes/class.make-sortby.php 查看文件

@@ -167,7 +167,7 @@ class Make_Sort_By extends WP_REST_Controller {
167 167
             ON (wp_p2p.p2p_from = wp_posts.ID OR wp_p2p.p2p_to = wp_posts.ID) 
168 168
             LEFT JOIN wp_posts AS header 
169 169
             ON header.ID = IF(wp_posts.ID = wp_p2p.p2p_to, wp_p2p.p2p_from, wp_p2p.p2p_to) 
170
-            WHERE wp_posts.post_status = 'publish' 
170
+            WHERE wp_posts.post_type = %s AND wp_posts.post_status = 'publish' 
171 171
                 AND (wp_p2p.p2p_type = %s OR wp_p2p.p2p_type = %s) 
172 172
             ORDER BY header.post_date DESC, related_episode, wp_posts.post_date DESC",
173 173
             trim($type, 's'), $type . '_to_episodes' , 'episodes_to_' . $type,

正在加载...
取消
保存