Skip to content

Commit

Permalink
improved isset
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 authored Jul 19, 2022
1 parent 44b0aac commit c1a206a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CPT_Columns.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c1a206a

Please sign in to comment.