Created
June 12, 2022 01:26
-
-
Save KaineLabs/c2c8877817ab96c1973b41f3972429ef to your computer and use it in GitHub Desktop.
Youzify Albums Media Switch Order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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