Any WordPress gurus in the house?

Nocturnal

Lifer
Jan 8, 2002
18,927
0
76
I'm trying to get my theme editor file list under Presentation to appear in some type of alpha order which it was until I was transferred to a new server due to my host.

It currently looks like this: http://www.supz.net/images/wp.jpg

Header is all the way at the bottom, it used to be almost near the top. I'm wondering if anyone knows how to fix this. There are a few posts at the WordPress support forum but no fix for this. Thanks!
 

Nocturnal

Lifer
Jan 8, 2002
18,927
0
76
Sorry I was attempting to change hosts. The DNS is propogating right now so you should be able to see it.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
still hasn't propagated for me.

anyway, i looked through the code and it looks like the function that retrieves the files for the theme is get_themes() in wp-includes/functions.php. that function does a while loop to find files in the $template_dir that match a regular expression for files that end in ".php". those files are not sorted before they are returned. what you see in template-editor is the stylesheet files followed by the template files. the only way i can think of for you to change the order these are returned is to actually call the php sort function on the $allowed_files array in template-editor.php in wp-admin.