From c1a206a773849510638f226f28ea94f4128dd8c2 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Tue, 19 Jul 2022 16:13:00 +0200 Subject: [PATCH] improved isset --- CPT_Columns.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CPT_Columns.php b/CPT_Columns.php index 11e3bb9..6bc5c0e 100644 --- a/CPT_Columns.php +++ b/CPT_Columns.php @@ -318,7 +318,7 @@ function _column_orderby( $query ) { } $orderby = $query->get( 'orderby' ); - if ( (!empty( $orderby ) && isset( $this->cpt_sortable_columns[ $orderby ] )) && $this->cpt_sortable_columns[ $orderby ][ 'type' ] === 'custom_value' ) { + if ( (!empty( $orderby ) && isset( $this->cpt_sortable_columns[ $orderby ], $this->cpt_sortable_columns[ $orderby ][ 'type' ] )) && $this->cpt_sortable_columns[ $orderby ][ 'type' ] === 'custom_value' ) { $query->set( 'orderby', 'meta_value' ); //$query->set( 'meta_key', $this->cpt_sortable_columns[ $orderby ][ 'meta_key' ] ); $query->set( 'meta_query', array(