Skip to content

Commit

Permalink
fixed default sort for images
Browse files Browse the repository at this point in the history
  • Loading branch information
Fellan-91 committed May 16, 2024
1 parent 87c250d commit 5583366
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions classes/class-get-portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -1449,12 +1449,16 @@ public static function get_query_params( $options, $for_filter = false, $layout_
}
}

if ( 'desc' === $custom_order_direction ) {
$images = array_reverse( $images );
}

break;
}

if (
'desc' === $custom_order_direction &&
'rand' === $custom_order &&
'default' === $custom_order
) {
$images = array_reverse( $images );
}
}

// pages count.
Expand Down

0 comments on commit 5583366

Please sign in to comment.