s("SELECT ID, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY display_name"); $author_count = array(); foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author") as $row) { $author_count[$row->post_author] = $row->count; } foreach ( (array) $authors as $author ) { $author = get_userdata( $author->ID ); $posts = (isset($author_count[$author->ID])) ? $author_count[$author->ID] : 0; $name = $author->display_name; if ( $show_fullname && ($author->first_name != '' && $author->last_name != '') ) $name = "$author->first_name $author->last_name"; if ( !($posts == 0 && $hide_empty) ) $return .= '
  • '; if ( $posts == 0 ) { if ( !$hide_empty ) $link = $name; } else { $link = 'display_name)) . '">' . $name . ''; if ( (! empty($feed_image)) || (! empty($feed)) ) { $link .= ' '; if (empty($feed_image)) $link .= '('; $link .= ''; else $link .= $name; $link .= ''; if ( empty($feed_image) ) $link .= ')'; } if ( $optioncount ) $link .= ' ('. $posts . ')'; } if ( !($posts == 0 && $hide_empty) ) $return .= $link . '
  • '; } if ( !$echo ) return $return; echo $return; } ?> add($key, $data, $flag, $expire); } /** * Closes the cache. * * This function has ceased to do anything since WordPress 2.5. The * functionality was removed along with the rest of the persistant cache. This * does not mean that plugins can't implement this function when they need to * make sure that the cache is cleaned up after WordPress no longer needs it. * * @since 2.0.0 * * @return bool Always returns True */ function wp_cache_close() { return true; } /** * Removes the cache contents matching ID and flag. * * @since 2.0.0 * @uses $wp_object_cache Object Cache Class * @see WP_Object_Cache::delete() * * @param int|string $id What the contents in the cache are called * @param string $flag Where the cache contents are grouped * @return bool True on successful removal, false on failure */ function wp_cache_delete($id, $flag = '') { global $wp_object_cache; return $wp_object_cache->delete($id, $flag); } /** * Removes all cache items. * * @since 2.0.0 * @uses $wp_object_cache Object Cache Class * @see WP_Object_Cache::flush() * * @return bool Always returns true */ function wp_cache_flush() { global $wp_object_cache; return $wp_object_cache->flush(); } /** * Retrieves the cache contents from the cache by ID and flag. * * @since 2.0.0 * @uses $wp_object_cache Object Cache Class * @see WP_Object_Cache::get() * * @param int|string $id What the contents in the cache are called * @param string $flag Where the cache contents are grouped * @return bool|mixed False on failure to retrieve contents or the cache * contents on success */ function wp_cache_get($id, $flag = '') { global $wp_object_cache; return $wp_object_cache->get($id, $flag); } /** * Sets up Object Cache Global and assigns it. * * @since 2.0.0 * @global WP_Object_Cache $wp_object_cache WordPress Object Cache */ function wp_cache_init() { $GLOBALS['wp_object_cache'] =& new WP_Object_Cache(); } /** * Replaces the contents of the cache with new data. * * @since 2.0.0 * @uses $wp_object_cache Object Cache Class * @see WP_Object_Cache::replace() * * @param int|string $id What to call the contents in the cache * @param mixed $data The contents to store in the cache * @param string $flag Where to group the cache contents * @param int $expire When to expire the cache contents * @return bool False if cache ID and group already exists, true on success */ function wp_cache_replace($key, $data, $flag = '', $expire = 0) { global $wp_object_cache; return $wp_object_cache->replace($key, $data, $flag, $expire); } /** * Saves the data to the cache. * * @since 2.0 * @uses $wp_object_cache Object Cache Class * @see WP_Object_Cache::set() * * @param int|string $id What to call the contents in the cache * @param mixed $data The contents to store in the cache * @param string $flag Where to group the cache contents * @param int $expire When to expire the cache contents * @return bool False if cache ID and group already exists, true on success */ function wp_cache_set($key, $data, $flag = '', $expire = 0) { global $wp_object_cache; return $wp_object_cache->set($key, $data, $flag, $expire); } /** * Adds a group or set of groups to the list of global groups. * * @since 2.6.0 * * @param string|array $groups A group or an array of groups to add */ function wp_cache_add_global_groups( $groups ) { // Default cache doesn't persist so nothing to do here. return; } /** * Adds a group or set of groups to the list of non-persistent groups. * * @since 2.6.0 * * @param string|array $groups A group or an array of groups to add */ function wp_cache_add_non_persistent_groups( $groups ) { // Default cache doesn't persist so nothing to do here. return; } /** * WordPress Object Cache * * The WordPress Object Cache is used to save on trips to the database. The * Object Cache stores all of the cache data to memory and makes the cache * contents available by using a key, which is used to name and later retrieve * the cache contents. * * The Object Cache can be replaced by other caching mechanisms by placing files * in the wp-content folder which is looked at in wp-settings. If that file * exists, then this file will not be included. * * @package WordPress * @subpackage Cache * @since 2.0 */ class WP_Object_Cache { /** * Holds the cached objects * * @var array * @access private * @since 2.0.0 */ var $cache = array (); /** * Cache objects that do not exist in the cache * * @var array * @access private * @since 2.0.0 */ var $non_existant_objects = array (); /** * The amount of times the cache data was already stored in the cache. * * @since 2.5.0 * @access private * @var int */ var $cache_hits = 0; /** * Amount of times the cache did not have the request in cache * * @var int * @access public * @since 2.0.0 */ var $cache_misses = 0; /** * Adds data to the cache if it doesn't already exist. * * @uses WP_Object_Cache::get Checks to see if the cache already has data. * @uses WP_Object_Cache::set Sets the data after the checking the cache * contents existance. * * @since 2.0.0 * * @param int|string $id What to call the contents in the cache * @param mixed $data The contents to store in the cache * @param string $group Where to group the cache contents * @param int $expire When to expire the cache contents * @return bool False if cache ID and group already exists, true on success */ function add($id,