Skip to content

Commit

Permalink
Update class-get-portfolio.php
Browse files Browse the repository at this point in the history
  • Loading branch information
nk-o committed Jul 10, 2024
1 parent 91a25bf commit 7237f25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions classes/class-get-portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -1427,15 +1427,15 @@ public static function get_query_params( $options, $for_filter = false, $layout_
case 'image_caption':
case 'image_alt':
case 'image_description':
if ( 'date' === $custom_order ) {
$custom_order = 'published_time';
}

/**
* We've reworked this code to work correctly with empty sortable values.
* Now images with filled values ​​will be sorted first.
* And empty images will be inserted later at the very end of the array.
*/
if ( 'date' === $custom_order ) {
$custom_order = 'published_time';
}

$images = self::sort_array_by_field( $images, $custom_order, $custom_order_direction );
break;
case 'rand':
Expand Down

0 comments on commit 7237f25

Please sign in to comment.