Changeset 109
- Timestamp:
- 10/23/2013 04:31:06 PM (11 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content
- Files:
-
- 5 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-p2/functions.php
r72 r109 24 24 } 25 25 26 // Return a list of link categories applied to the current post, unless it is uncategorized 27 function wporg_p2_get_cats_with_count( $post, $format = 'list', $before = '', $sep = '', $after = '' ) { 28 $cat_links = array(); 29 $post_cats = get_the_terms( $post->ID, 'category' ); 30 31 if ( ! $post_cats ) 32 return ''; 33 34 foreach ( $post_cats as $cat ) { 35 if ( 'uncategorized' == $cat->slug ) { 36 continue; 37 } 38 39 if ( $cat->count > 1 && ! is_category( $cat->slug ) ) { 40 $cat_link = '<a href="' . get_term_link( $cat, 'category' ) . '" rel="category">' . $cat->name . ' ( ' . number_format_i18n( $cat->count ) . ' )</a>'; 41 } else { 42 $cat_link = $cat->name; 43 } 44 45 if ( $format == 'list' ) 46 $cat_link = '<li>' . $cat_link . '</li>'; 47 48 $cat_links[] = $cat_link; 49 } 50 51 if ( empty( $cat_links ) ) { 52 return ''; 53 } 54 55 return apply_filters( 'cats_with_count', $before . join( $sep, $cat_links ) . $after, $post ); 56 } -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-p2/style.css
r96 r109 170 170 .postcontent table td { 171 171 vertical-align: top; 172 } 173 174 /* Add some space below tag/category descriptions */ 175 #tag-description, 176 #category-description { 177 margin-bottom: 2em; 172 178 } 173 179
Note: See TracChangeset
for help on using the changeset viewer.