Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #44349, comment 32


Ignore:
Timestamp:
09/26/2025 04:59:55 AM (12 months ago)
Author:
ramonopoly

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #44349, comment 32

    initial v1  
    55My workaround was, when multiple attachments have the same post_date, to add ID as secondary sort to guarantee consistent ordering.
    66
    7 ```
    8 $query_args['orderby'] = array( 'date' => $query_args['order'] ?? 'DESC', 'ID' => 'DESC' );
    9 ```
     7
     8
     9{{{
     10                                $query_args['orderby'] = array(
     11                                        'date' => $query_args['order'] ?? 'DESC',
     12                                        'ID'   => 'DESC',
     13                                );
     14}}}
     15