Changeset 3848
- Timestamp:
- 06/06/2006 04:50:41 AM (19 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/deprecated.php
r3788 r3848 457 457 wp_print_script( 'wp_tiny_mce' ); 458 458 } 459 460 function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') { 461 $args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image'); 462 return wp_list_authors($args); 463 } 464 459 465 ?> -
trunk/wp-includes/template-functions-author.php
r3205 r3848 157 157 158 158 function wp_list_authors($args = '') { 159 parse_str($args, $r); 160 161 if ( !isset($r['optioncount']) ) 162 $r['optioncount'] = false; 163 if ( !isset($r['exclude_admin']) ) 164 $r['exclude_admin'] = true; 165 if ( !isset($r['show_fullname']) ) 166 $r['show_fullname'] = false; 167 if ( !isset($r['hide_empty']) ) 168 $r['hide_empty'] = true; 169 if ( !isset($r['feed']) ) 170 $r['feed'] = ''; 171 if ( !isset($r['feed_image']) ) 172 $r['feed_image'] = ''; 173 174 list_authors($r['optioncount'], $r['exclude_admin'], $r['show_fullname'], $r['hide_empty'], $r['feed'], $r['feed_image']); 175 } 176 177 function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') { 159 if ( is_array($args) ) 160 $r = &$args; 161 else 162 parse_str($args, $r); 163 164 $defaults = array('optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 165 'feed' => '', 'feed_image' => ''); 166 $r = array_merge($defaults, $r); 167 extract($r); 168 178 169 global $wpdb; 170 // TODO: Move select to get_authors(). 179 171 $query = "SELECT ID, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY display_name"; 180 172 $authors = $wpdb->get_results($query);
Note: See TracChangeset
for help on using the changeset viewer.