Alphabetic sort of track files
-
Hi,
It would be really useful if you could make a minor change to the wp-gpx-maps_admin_tracks.php file so that the table of tracks is sorted alphabetically.
I make the following change to line 95 of that file but I have to remember to do this when the plugin is updated:
Change “$filenames = array_reverse($filenames);” to “sort($filenames);”
This makes it a lot easier to find shortcodes for GPX files as they’re then listed alphabetically.
readdir (the function you use to get the list of filenames) isn’t guaranteed to return them alphabetically; it returns them as they’re “stored on the file system” and doing a reverse of the array doesn’t seem to be displaying them latest to oldest either, which I guess was the intention?
Thanks
- The topic ‘Alphabetic sort of track files’ is closed to new replies.