How to make the galleries sort alphabetically for the dropdown in the Add Gallery /Images page

Navigate in Explorer to htdocs\public_html\wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\nextgen_addgallery_page\templates\upload_images.php
 
Add the following code to the top:

<?php if(!function_exists("my_cmp")) {     function my_cmp($a, $b) {       if ($a->title == $b->title) {         return 0;       }       return ($a->title < $b->title) ? -1 : 1;     } } usort($galleries, "my_cmp"); ?>
All Tags


Leave a Reply

%d bloggers like this: