Sort plugins by plugin name, not file name.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-01-24 07:48:21 +00:00
parent 7cba6fd969
commit 4c08bf3d7c
1 changed files with 7 additions and 0 deletions

View File

@ -87,6 +87,13 @@ if (empty($plugins)) {
</tr> </tr>
<?php <?php
$style = ''; $style = '';
function sort_plugins($plug1, $plug2) {
return strnatcasecmp($plug1['Name'], $plug2['Name']);
}
usort($plugins, 'sort_plugins');
foreach($plugins as $plugin_file => $plugin_data) { foreach($plugins as $plugin_file => $plugin_data) {
$style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate'; $style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate';