From cb631b38835764aad4c67e61d0b268e912934fd1 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 12 May 2021 17:58:31 +0900 Subject: [PATCH] =?UTF-8?q?WP=20PLUGIN=20=E3=82=BD=E3=83=BC=E3=83=88?= =?UTF-8?q?=E5=AF=BE=E8=B1=A1=E6=8B=A1=E5=BC=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・カスタム分類の並べ替えにカスタム投稿が漏れていたので追加 --- class/class.apop.ui.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/class/class.apop.ui.php b/class/class.apop.ui.php index ac0f1f4..7e24b3b 100644 --- a/class/class.apop.ui.php +++ b/class/class.apop.ui.php @@ -161,13 +161,16 @@ value="' . $sort_num . '"> } private static function get_sort_post_list( $tax_id, $search_param, $tax_name ): array { - $args = array( + $post_types = array( 'post' ); + $custom_post_types = array_values( get_post_types( array( 'public' => true, '_builtin' => false ) ) ); + $args = array( + 'post_type' => array_merge( $post_types, $custom_post_types ), 'post_status' => array( 'publish', 'draft' ), 'posts_per_page' => - 1, 'orderby' => 'meta_value_num', 'order' => 'ASC', ); - $meta_key = '_apop_post_' . self::create_post_sort_key( $tax_name, $search_param ) . '_' . $tax_id; + $meta_key = '_apop_post_' . self::create_post_sort_key( $tax_name, $search_param ) . '_' . $tax_id; self::create_sort_post_list_meta_query( $args, $meta_key ); self::create_post_tax_query( $args, $search_param, $tax_name, $tax_id );