WP PLUGIN ソート対象拡張
・カスタム分類の並べ替えにカスタム投稿が漏れていたので追加
This commit is contained in:
@@ -161,7 +161,10 @@ value="' . $sort_num . '">
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static function get_sort_post_list( $tax_id, $search_param, $tax_name ): array {
|
private static function get_sort_post_list( $tax_id, $search_param, $tax_name ): array {
|
||||||
|
$post_types = array( 'post' );
|
||||||
|
$custom_post_types = array_values( get_post_types( array( 'public' => true, '_builtin' => false ) ) );
|
||||||
$args = array(
|
$args = array(
|
||||||
|
'post_type' => array_merge( $post_types, $custom_post_types ),
|
||||||
'post_status' => array( 'publish', 'draft' ),
|
'post_status' => array( 'publish', 'draft' ),
|
||||||
'posts_per_page' => - 1,
|
'posts_per_page' => - 1,
|
||||||
'orderby' => 'meta_value_num',
|
'orderby' => 'meta_value_num',
|
||||||
|
|||||||
Reference in New Issue
Block a user