LEGACY: function get_media_items()
-
Hi all, so for consistency, I was wondering if we could update the function so that the media items are ordered correctly.
Before the code looked like this (before 4.0.0)
$attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'orderby' => 'menu_order ASC, ID', 'order' => 'DESC') );
Suggested fix should be as below (since the orderby parameter only filters what values are allowed)
$attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'orderby' => 'menu_order', 'order' => 'ASC') );
The reason why we’re still using this legacy code is because we are still using the thick box UI to handle our media since ordering is visually better (has numbering).
https://www.ads-software.com/support/topic/is-there-a-way-to-disable-the-new-media-manager/
Hope this is possible, thanks!
- The topic ‘LEGACY: function get_media_items()’ is closed to new replies.