Actually, they *do* get sorted. Just not in a way that makes a lot of sense[1]. If you look in vars.php, below the smilies array, you will see this block of code:
// sorts the smilies' array
if (!function_exists('smiliescmp')) {
function smiliescmp ($a, $b) {
if (strlen($a) == strlen($b)) {
return strcmp($a, $b);
}
return (strlen($a) > strlen($b)) ? -1 : 1;
}
}
uksort($wpsmiliestrans, 'smiliescmp');
Looks to me like it’s sorting first by the *length* of the string, then alphabetically for strings of the same length. Looking at my smilies confirms that this is what is happening.
I’m going to try commenting out the sort, and seeing what happens….
EDIT: Yup. Commenting out that block causes the smilies to be displayed in the order they are listed in vars.php. So for anyone who wants them in a particular order, editing the list should do the job. (This was with 1.5.1)
[1] To me, anyway