Changeset 4324
- Timestamp:
- 10/04/2006 09:35:25 AM (18 years ago)
- Location:
- branches/2.0/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-admin/admin-functions.php
r4230 r4324 1571 1571 } 1572 1572 1573 if ( !$plugins_dir || !$plugin_files) {1573 if ( !$plugins_dir || !$plugin_files ) 1574 1574 return $wp_plugins; 1575 } 1576 1577 sort($plugin_files); 1578 1579 foreach ($plugin_files as $plugin_file) { 1575 1576 foreach ( $plugin_files as $plugin_file ) { 1580 1577 if ( !is_readable("$plugin_root/$plugin_file")) 1581 1578 continue; … … 1583 1580 $plugin_data = get_plugin_data("$plugin_root/$plugin_file"); 1584 1581 1585 if ( empty ($plugin_data['Name'])) {1582 if ( empty ($plugin_data['Name']) ) 1586 1583 continue; 1587 }1588 1584 1589 1585 $wp_plugins[plugin_basename($plugin_file)] = $plugin_data; 1590 1586 } 1587 1588 uasort($wp_plugins, create_function('$a, $b', 'return strnatcasecmp($a["Name"], $b["Name"]);')); 1591 1589 1592 1590 return $wp_plugins; -
branches/2.0/wp-admin/plugins.php
r4323 r4324 89 89 $style = ''; 90 90 91 function sort_plugins($plug1, $plug2) {92 return strnatcasecmp($plug1['Name'], $plug2['Name']);93 }94 95 uasort($plugins, 'sort_plugins');96 97 91 foreach($plugins as $plugin_file => $plugin_data) { 98 92 $style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate';
Note: See TracChangeset
for help on using the changeset viewer.