Skip to content

Commit

Permalink
fixed order by image title when title source and description source i…
Browse files Browse the repository at this point in the history
…s set to None
  • Loading branch information
nk-o committed Dec 20, 2024
1 parent e4c4903 commit 6a773fa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion classes/class-get-portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,15 @@ public static function get_query_params( $options, $for_filter = false, $layout_

if ( $attachment ) {
// get image meta if needed.
if ( 'none' !== $options['images_titles_source'] || 'none' !== $options['images_descriptions_source'] ) {
if (
'none' !== $options['images_titles_source'] ||
'none' !== $options['images_descriptions_source'] ||

'image_title' === $options['images_order_by'] ||
'image_caption' === $options['images_order_by'] ||
'image_alt' === $options['images_order_by'] ||
'image_description' === $options['images_order_by']
) {
if ( $attachment && 'attachment' === $attachment->post_type ) {
$img_meta['title'] = $attachment->post_title;
$img_meta['description'] = $attachment->post_content;
Expand Down

0 comments on commit 6a773fa

Please sign in to comment.