/** * @see Walker::start_el() * @since 1.3 * * @param string $output Passed by reference. Used to append additional content. * @param object $category Category data object. * @param int $depth Depth of category in reference to parents. * @param array $args */ function start_el(&$output, $category, $depth = 0, $args = array(), $id = 0) { $output .= '<li><a href="' . esc_url(get_term_link($category)) . '" title="'; if ($category->description) { $output .= esc_attr($category->description); } else { $output .= sprintf(__('View all posts filed under %s', 'sitetree'), SiteTreeUtilities::escTitleAttr($category->name)); } $output .= '">' . esc_attr($category->name) . '</a>'; if ($args['feed']) { $output .= ' (<a href="' . esc_url(get_term_feed_link($category->term_id)) . '" title="' . SiteTreeUtilities::escTitleAttr($args['feed']) . '">' . esc_attr($args['feed']) . '</a>)'; } if ($args['show_count']) { $output .= ' <span class="sitetree-posts-number">(' . (int) $category->count . ')</span>'; } }