src/class-extended-cpt-admin.php
public function maybe_sort_by_fields( WP_Query $wp_query ) {

		if ( empty( $wp_query->query['post_type'] ) || ! in_array( $this->cpt->post_type, (array) $wp_query->query['post_type'], true ) ) {
			return;
		}

		$sort = Extended_CPT::get_sort_field_vars( $wp_query->query, $this->cpt->args['admin_cols'] );

		if ( empty( $sort ) ) {
			return;
		}

		foreach ( $sort as $key => $value ) {
			$wp_query->set( $key, $value );
		}

	}
public function maybe_sort_by_fields( WP_Query $wp_query ) {

		if ( empty( $wp_query->query['post_type'] ) || ! in_array( $this->cpt->post_type, (array) $wp_query->query['post_type'], true ) ) {
			return;
		}

		$sort = Extended_CPT::get_sort_field_vars( $wp_query->query, $this->cpt->args['admin_cols'] );

		if ( empty( $sort ) ) {
			return;
		}

		foreach ( $sort as $key => $value ) {
			$wp_query->set( $key, $value );
		}

	}
public function maybe_sort_by_fields ( WP_Query $ wp_query ) { if ( empty ( $ wp_query -> query [ 'post_type' ] ) || ! in_array ( $ this -> cpt -> post_type , ( array ) $ wp_query -> query [ 'post_type' ] , true ) ) { return ; } $ sort = Extended_CPT :: get_sort_field_vars ( $ wp_query -> query , $ this -> cpt -> args [ 'admin_cols' ] ) ; if ( empty ( $ sort ) ) { return ; } foreach ( $ sort as $ key => $ value ) { $ wp_query -> set ( $ key , $ value ) ; } }
Set the relevant query vars for sorting posts by our admin sortables.

@param WP_Query $wp_query The current `WP_Query` object.
Set the relevant query vars for sorting posts by our admin sortables .