Icon priority by Oliver Weichhold

You can prioritize the display of icons. From the author (Oliver) :”You can now assign numeric priorities to categories. The priority is used to select a single category icon for a post with multiple categories.Example:

imagine we have a post with two categories:

  • Companies -> ACME Corp. (Icon: ACME.gif, Priority 10)
  • Products -> Milk (Icon: Milk.gif, Priority 20)

If you now pass the new boolean parameter “use_priority=true” to the get_cat_icon() function, it will only render Milk.gif, because Products -> Milk has the highest priority of all categories for the post”.

Display icons vertically

You can now display the icons vertically. It’s like a ’stack’ of icons, thank to a new parameter for the function get_cat_icon() : vertical_display. Set it to true if you want to use that feature.

Example :

<?php get_cat_icon(‘vertical_display=true’); ?>

The ’stack’ is generated thank to a div tag. That div tag has a class : caticons. So if you want to extend the style of the div tag, you can use css in style.css.

Example of generated code :

<div class=”caticons” style=”text-align: center; float: left; width:32px“> [the_icons_are_here] </div>

Example of extending the class in style.css :

img.caticons {
border
:0 !important;
}

You can’t modify the value text-align, nor the float value. The width take automatically the larger width of the icons to display.