Enable admin post list sorting
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
function sportspress_pre_get_posts( $query ) {
|
function sportspress_pre_get_posts( $query ) {
|
||||||
|
|
||||||
if ( is_admin() ):
|
if ( is_admin() ):
|
||||||
|
if ( isset( $query->query[ 'orderby' ] ) || isset( $query->query[ 'order' ] ) ):
|
||||||
|
return $query;
|
||||||
|
endif;
|
||||||
$post_type = $query->query['post_type'];
|
$post_type = $query->query['post_type'];
|
||||||
|
|
||||||
if ( in_array( $post_type, array( 'sp_result', 'sp_outcome', 'sp_column', 'sp_statistic' ) ) ):
|
if ( in_array( $post_type, array( 'sp_result', 'sp_outcome', 'sp_column', 'sp_statistic' ) ) ):
|
||||||
|
|||||||
Reference in New Issue
Block a user