Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/c2c8877817ab96c1973b41f3972429ef to your computer and use it in GitHub Desktop.
Save KaineLabs/c2c8877817ab96c1973b41f3972429ef to your computer and use it in GitHub Desktop.
Youzify Albums Media Switch Order
<?php
add_filter( 'youzify_albums_switch_attachments_order' , '__return_false', 999 );
function yzc_albums_attachments_append() { ?>
<script type="text/javascript">window.youzify_albums_append_attachments = true;</script>
<?php
}
add_action( 'wp_head' , 'yzc_albums_attachments_append', 999 );
function yzc_order_by_asc() {
return 'ASC';
}
add_filter( 'youzify_albums_get_media_order_by' , 'yzc_order_by_asc', 999 );
add_filter( 'youzify_albums_get_media_ids_order_by' , 'yzc_order_by_asc', 999 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment