Changeset 589646
- Timestamp:
- 08/24/2012 05:38:33 AM (14 years ago)
- Location:
- category-icons/trunk
- Files:
-
- 34 added
- 5 edited
-
category_icons.css (modified) (1 diff)
-
category_icons.php (modified) (34 diffs)
-
category_icons_widget.php (modified) (1 diff)
-
changelog.txt (modified) (1 diff)
-
images (added)
-
images/arrowdown.png (added)
-
images/spacer.gif (added)
-
images/w3c-xhtml1.0.png (added)
-
js (added)
-
js/category_icons.js (added)
-
js/category_icons_checkall.js (added)
-
js/jquery.metadata.min.js (added)
-
js/jquery.tablesorter.min.js (added)
-
languages (added)
-
languages/category-icons-ro_RO.mo (added)
-
languages/category_icons-ar.mo (added)
-
languages/category_icons-bg_BG.mo (added)
-
languages/category_icons-by_BY.mo (added)
-
languages/category_icons-cs_CZ.mo (added)
-
languages/category_icons-da_DK.mo (added)
-
languages/category_icons-de_DE.mo (added)
-
languages/category_icons-es_ES.mo (added)
-
languages/category_icons-fa_IR.mo (added)
-
languages/category_icons-fr_FR.mo (added)
-
languages/category_icons-hi_IN_HI.mo (added)
-
languages/category_icons-it_IT.mo (added)
-
languages/category_icons-ja.mo (added)
-
languages/category_icons-nl_NL.mo (added)
-
languages/category_icons-pl_PL.mo (added)
-
languages/category_icons-pt_BR.mo (added)
-
languages/category_icons-ru_RU.mo (added)
-
languages/category_icons-sk_SK.mo (added)
-
languages/category_icons-sv_SE.mo (added)
-
languages/category_icons-tr_TR.mo (added)
-
languages/category_icons-uk.mo (added)
-
languages/category_icons-uz_UZ.mo (added)
-
languages/category_icons-zh_CN.mo (added)
-
languages/category_icons-zh_TW.mo (added)
-
readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
category-icons/trunk/category_icons.css
r572619 r589646 41 41 margin: 0; 42 42 list-style: none; 43 padding: <?php echo (strval($GLOBALS['wp_version']) < strval('2.5')) ? '15px 0 0px 25px' : '7px 0 15px 0'; ?>;43 padding: '7px 0 15px 0' ; 44 44 45 45 } -
category-icons/trunk/category_icons.php
r572619 r589646 4 4 Plugin URI: http://www.category-icons.com/ 5 5 Description: Easily assign icons to your categories. (Minimum WP version : 2.8) 6 Version: 2.2. 16 Version: 2.2.3 7 7 Author: Brahim Machkouri 8 8 Author URI: http://www.category-icons.com/ … … 28 28 29 29 // Initialization and Hooks 30 global $table_prefix ;30 global $table_prefix,$recent_posts_version; 31 31 $wpdb->ig_caticons = $table_prefix.'ig_caticons'; 32 32 $caticons_datas = array(); … … 78 78 */ 79 79 function get_cat_icon($params='') { 80 $one_category_only = false; 81 82 if (0 < (int) get_option('igcaticons_iconcatpage',0) ) { 83 $one_category_only = true; 84 } 85 80 86 // Compatibility with qTranslate 81 87 if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) { … … 83 89 remove_filter('list_cats','qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage',0); 84 90 } 91 85 92 // Compatibility with SEO Friendly Images 86 93 if (function_exists('seo_friendly_images') && 1 == get_option('igcaticons_useseo_plugin')) 87 94 add_filter('category_icons', 'seo_friendly_images', 50); 88 95 parse_str($params, $p); 89 if (!isset($p['fit_width'])) $p['fit_width'] = get_option('igcaticons_max_width');90 if (!isset($p['fit_height'])) $p['fit_height'] = get_option('igcaticons_max_height');96 if (!isset($p['fit_width'])) $p['fit_width'] = (int) get_option('igcaticons_max_width'); 97 if (!isset($p['fit_height'])) $p['fit_height'] = (int) get_option('igcaticons_max_height'); 91 98 if (!isset($p['expand'])) $p['expand'] = false; 92 if (!isset($p['small'])) $p['small'] = get_option('igcaticons_use_small');99 if (!isset($p['small'])) $p['small'] = (int) get_option('igcaticons_use_small'); 93 100 if (!isset($p['prefix'])) $p['prefix'] = ''; 94 101 if (!isset($p['suffix'])) $p['suffix'] = ''; 95 102 if (!isset($p['class'])) $p['class'] = ''; 96 103 if (!isset($p['link'])) $p['link'] = true; 97 if (!isset($p['echo'])) $p['echo'] =true;104 if (!isset($p['echo'])) $p['echo'] = true; 98 105 if (!isset($p['use_priority'])) $p['use_priority'] = false; 99 if (!isset($p['max_icons'])) $p['max_icons'] = get_option('igcaticons_max_icons'); 106 if (!isset($p['max_icons'])) $p['max_icons'] = (int) get_option('igcaticons_max_icons'); 107 100 108 if (!isset($p['align'])) $p['align'] = false; 101 109 if (!isset($p['hierarchical'])) $p['hierarchical'] = false; … … 112 120 113 121 stripslaghes_gpc_arr($p); 114 if (is_category() AND in_the_loop()) {115 $cat = get_query_var('cat');122 if (is_category() && in_the_loop() && $one_category_only == true ) { 123 $cat = (int) get_query_var('cat'); 116 124 $category=get_category($cat); 117 $p['cat'][]=$category->cat_ID; 125 if (!isset($p['cat']) || !is_array($p['cat'])) { 126 $p['cat']=array(); 127 } 128 129 $p['cat'][] = $category->cat_ID; 118 130 } 119 131 else { … … 135 147 if (!isset($p['cat'][0])) return; 136 148 if (!is_array($p['cat'])) { 137 $categorie= $p['cat'];149 $categorie= (int) $p['cat']; 138 150 $p['cat'] = array(); 139 151 $p['cat'][] = $categorie; 140 152 } 141 153 } 154 142 155 $nb_icons = 0; 143 156 $urlbegin = ''; … … 177 190 } 178 191 list( $width , $height , $type , $attr) = getimagesize($file); 179 $w = $width;180 $h = $height;192 $w = (int) $width; 193 $h = (int) $height; 181 194 if (!empty($p['fit_width']) || !empty($p['fit_height'])) 182 195 list($w, $h) = ig_caticons_fit_rect($width, $height, $p['fit_width'], $p['fit_height'], $p['expand']); … … 190 203 } 191 204 if (!$p['align']===false) $cat_icons .= 'align="'.$p['align'].'" '; 192 $title = 'title="'.get_cat_name($p['cat'][$i]).'"'; 193 $alt = $title; 205 $fill_with_catname = get_cat_name($p['cat'][$i]); 206 $title = 'title="'.$fill_with_catname.'"'; 207 $alt = 'alt="'.$fill_with_catname.'"';;//$title; 194 208 if (function_exists('seo_friendly_images') && 1 == get_option('igcaticons_useseo_plugin')) $title = '' ; // Compatibility with qTranslate 195 $cat_icons .= 'src="'.$url.'" width="'.$w.'" height="'.$h.'" alt="'.$alt.'"'.$title.' />'.$urlend.$p['suffix'];209 $cat_icons .= 'src="'.$url.'" width="'.$w.'" height="'.$h.'" '.$alt.' '.$title.' />'.$urlend.$p['suffix']; 196 210 $nb_icons++; 197 211 } … … 211 225 else { 212 226 echo $cat_icons; 213 return true; // if echo get_cat_icon s() is used, true will be displayed as "1". So mustthe parameter echo=false must be used in this case.227 return true; // if echo get_cat_icon() is used, true will be displayed as "1". So the parameter echo=false must be used in this case. 214 228 } 215 229 } … … 224 238 */ 225 239 function bm_caticons_process_categories($string='') { 240 $caticons_processed = array(); 226 241 $catlist = get_the_category($GLOBALS['post']->ID); 227 242 if (count($catlist)>1) { … … 277 292 left join $wpdb->posts on $wpdb->term_relationships.object_id = $wpdb->posts.ID 278 293 where post_type = 'page' and $wpdb->term_taxonomy.taxonomy = 'category' and ID="; 279 $nb_max_icons_page = get_option('igcaticons_max_icons');294 $nb_max_icons_page = (int) get_option('igcaticons_max_icons'); 280 295 $cats = array(); 281 296 if ($type != 'cat' && $type != 'page') { 282 297 $type = 'cat'; 283 if (version_compare($GLOBALS['wp_version'], '3.1', '>=') OR version_compare($GLOBALS['wp_version'], '3.1-RC2', '=')) {298 if (version_compare($GLOBALS['wp_version'], '3.1', '>=') ) { 284 299 $type = 'category_name'; 285 300 } … … 292 307 $echo_output = false; 293 308 } 294 if ( !isset($p['icons_only']) ) 309 if ( !isset($p['icons_only']) ) { 295 310 $p['icons_only']=0; 296 297 if ( isset($p['icons_only']) && 'true' == strtolower( $p['icons_only'] ) ) 311 } 312 if ( isset($p['icons_only']) && 'true' == strtolower( $p['icons_only'] ) ) { 298 313 $p['icons_only']=1; 314 } 299 315 } 300 316 if (!empty($list)) { … … 305 321 if ($pos>0) { 306 322 parse_str(substr($child[0],$pos, strlen($child[0])-$pos)); // $cat or $category_name is created from this function 307 if (isset($page) && $page>0) { // get the category from page id323 if (isset($page) && intval($page) >0) { // get the category from page id 308 324 $cats = array(); 309 $cats = $wpdb->get_results($wpdb->prepare($request. $page),ARRAY_A);325 $cats = $wpdb->get_results($wpdb->prepare($request.intval($page)),ARRAY_A); 310 326 } 311 327 else { 312 if (version_compare($GLOBALS['wp_version'], '3.1', '>=') OR version_compare($GLOBALS['wp_version'], '3.1-RC2', '=')) {328 if (version_compare($GLOBALS['wp_version'], '3.1', '>=')) { 313 329 // standard permalinks in wp 3.1+: http://www.sublab.dev/wpdev/?category_name=apple 314 330 $cats[] = bm_caticons_get_cat_ID_by_slug($category_name); 315 331 } 316 332 else { // standard permalinks in wp up to 3.0: http://www.sublab.dev/wpdev/?cat=3 317 $cats[] = $cat;333 $cats[] = (int) $cat; 318 334 } 319 335 } … … 333 349 $cats = array(); 334 350 $page = $wpdb->get_var($wpdb->prepare("SELECT ID FROM `$wpdb->posts` WHERE post_name = '$name'"),0,0); 335 $cats = $wpdb->get_results($wpdb->prepare($request. $page),ARRAY_A);351 $cats = $wpdb->get_results($wpdb->prepare($request.intval($page)),ARRAY_A); 336 352 } 337 353 } … … 360 376 $before_name = bm_caticons_getbool(get_option('igcaticons_before_name')); 361 377 if ($before_name) { // put the html code of the icons before the category name 362 $c hild[1]= substr($child[1],1,strlen($child[1]));363 $list = preg_replace('/'.$child[1].'/', $img.$child[1], $list, 1);378 $cat_name = substr($child[1],1,strlen($child[1])); 379 $list = str_replace('>'.$cat_name, '>'.$img.$cat_name,$list); 364 380 } else {// else after the category name 365 381 $new = substr($child[1],0,strlen($child[1])-1); … … 394 410 else { // if no category id is found, this is ?cat=X given 395 411 list($dummy,$id) = explode('?cat=',$slug); 412 $id = (int) $id; 396 413 } 397 414 return $id; … … 521 538 $files = array(); 522 539 $results = array(); 540 $position = 0; 523 541 $correspondances = array(); 524 542 $filename=''; … … 573 591 } 574 592 else {// display the informations about the line and column 593 $position = 0; 575 594 do { 576 595 $position = strpos($string,$correspondance,$position); … … 656 675 * @param string $filter Which type of table to display 657 676 */ 658 function bm_caticons_codetemplate_display($message,$ code,$list,$filter) {677 function bm_caticons_codetemplate_display($message,$list,$filter) { 659 678 $table = array(); 660 679 foreach ($list as $element) { … … 676 695 <tbody> 677 696 <?php 697 $class = ''; 678 698 if ( 0 == count($list) ) 679 699 $list = array(array('-','-','-')); … … 885 905 global $wpdb; 886 906 $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; 887 if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) 907 if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) 888 908 $action = 'bulk-delete'; 889 909 switch($action) { … … 925 945 <div class="wrap"> 926 946 <h2><?php _e('Select Category Icons','category_icons') ?></h2> 927 <form method="post" action=""> 947 <form method="post" name="caticons-form1" action=""> 948 <?php wp_nonce_field('caticons-nonce'); ?> 928 949 <input type="hidden" name="ig_module" value="caticons" /> 929 950 <input type="hidden" name="ig_tab" value="icons" /> … … 975 996 ?> 976 997 <div class="wrap"> 977 <form id="posts-filter" action="" method="get"> 998 <form id="posts-filter" action="" method="get" name="caticons-form2"> 999 <?php wp_nonce_field('caticons-nonce'); ?> 978 1000 <input type="hidden" name="ig_module" value="caticons" /> 979 1001 <input type="hidden" name="page" value="category_icons.php" /> … … 1038 1060 add_option('igcaticons_max_width','-1'); 1039 1061 add_option('igcaticons_max_height','-1'); 1062 add_option('igcaticons_iconcatpage','0'); 1040 1063 } 1041 1064 … … 1082 1105 bm_caticons_check_uploads_path(); 1083 1106 $tab = isset($_REQUEST['ig_tab']) ? $_REQUEST['ig_tab'] : ''; 1084 if (isset($_POST['info_update']) && 'options' == $tab ) {1107 if (isset($_POST['info_update']) && 'options' == $tab && check_admin_referer('caticons-nonce')) { 1085 1108 ?><div class="updated"><p><strong><?php _e('Settings updated.','category_icons');?></strong></p></div><?php 1086 1109 update_option('igcaticons_path', $_POST['igcaticons_path']); … … 1089 1112 update_option('igcaticons_max_icons', $_POST['igcaticons_max_icons']); 1090 1113 update_option('igcaticons_before_name', $_POST['igcaticons_before_name']); 1091 update_option('igcaticons_templatecode_patch', $_POST['igcaticons_templatecode_patch']);1092 update_option('igcaticons_templatecode_sidebar', $_POST['igcaticons_templatecode_sidebar']);1093 update_option('igcaticons_rssfeeds', $_POST['igcaticons_rssfeeds']);1094 update_option('igcaticons_useseo_plugin', $_POST['igcaticons_useseo_plugin']);1095 1114 update_option('igcaticons_max_width', $_POST['igcaticons_max_width']); 1096 1115 update_option('igcaticons_max_height', $_POST['igcaticons_max_height']); 1116 1117 bm_caticons_updatemyoption('igcaticons_templatecode_patch'); 1118 bm_caticons_updatemyoption('igcaticons_templatecode_sidebar'); 1119 bm_caticons_updatemyoption('igcaticons_rssfeeds'); 1120 bm_caticons_updatemyoption('igcaticons_useseo_plugin'); 1121 bm_caticons_updatemyoption('igcaticons_iconcatpage'); 1097 1122 } 1098 1123 … … 1111 1136 } 1112 1137 1138 // for the checkboxes options 1139 function bm_caticons_updatemyoption($option) { 1140 if (isset($_POST[$option])) { 1141 update_option($option, $_POST[$option]); 1142 } 1143 else { 1144 update_option($option, 0); 1145 } 1146 } 1113 1147 /** 1114 1148 * Display the menu (Icons, Options, Template Tags) … … 1135 1169 list($def_path, $def_url) = ig_caticons_defupload(); 1136 1170 ?><div class="form-wrap"> 1137 <form method="post" action=""> 1171 <form method="post" action="" name="caticons-form3"> 1172 <?php wp_nonce_field('caticons-nonce'); ?> 1138 1173 <input type="hidden" name="ig_module" value="caticons"/> 1139 1174 <input type="hidden" name="ig_tab" value="options"/> … … 1162 1197 </div> 1163 1198 <label><input type="checkbox" name="igcaticons_rssfeeds" id="rssfeeds" value="1" <?php checked('1', get_option('igcaticons_rssfeeds')); ?> /> <?php _e('Display category icons in RSS feeds','category_icons'); ?></label> 1199 <label><input type="checkbox" name="igcaticons_iconcatpage" id="iconcatpage" value="1" <?php checked('1', get_option('igcaticons_iconcatpage')); ?> /> <?php _e('Display only the icon of the selected category in the category page','category_icons'); ?></label> 1200 1164 1201 <?php if (function_exists('seo_friendly_images')) : ?> 1165 1202 <label><input type="checkbox" name="igcaticons_useseo_plugin" id="useseofriendlyimages" value="1" <?php checked('1', get_option('igcaticons_useseo_plugin')); ?> /> … … 1224 1261 ?> 1225 1262 <div class="wrap"><h2><?php 1226 $ct = current_theme_info();1263 $ct = wp_get_theme();//current_theme_info(); 1227 1264 _e('Template Tags for','category_icons'); 1228 1265 echo ' '.$ct->name; … … 1231 1268 <?php 1232 1269 if ( 0 < count($list) ) { 1233 bm_caticons_codetemplate_display($message,$ code,$list,'get_cat_icon');1270 bm_caticons_codetemplate_display($message,$list,'get_cat_icon'); 1234 1271 if (get_option('igcaticons_templatecode_sidebar')==1) { 1235 1272 echo '<h3><a target="_blank" href="http://www.category-icons.com/2008/03/12/function-put_cat_icon/">put_cat_icons()</a></h3>'; 1236 1273 $message = __('Replace the code','category_icons'); 1237 bm_caticons_codetemplate_display($message,$ code,$list,'put_cat_icon');1274 bm_caticons_codetemplate_display($message,$list,'put_cat_icon'); 1238 1275 } 1239 1276 } … … 1295 1332 global $wpdb, $caticons_datas; 1296 1333 1297 $cat = $wpdb->escape($cat);1334 $cat = (int) $cat;//$wpdb->escape($cat); 1298 1335 $result = false; 1299 1336 … … 1338 1375 */ 1339 1376 function ig_caticons_fit_rect($width, $height, $max_width=-1, $max_height=-1, $expand=false) { 1340 $h = $height;1341 $w = $width;1377 $h = (int) $height; 1378 $w = (int) $width; 1342 1379 if ($max_width>0 && ($w > $max_width || $expand)) { 1343 1380 $w = $max_width; … … 1364 1401 * @author Brahim Machkouri 1365 1402 */ 1366 if (defined('OT_LIBRARY') AND OT_LIBRARY) {1367 1403 function otf_caticons($option_key, $result, $ext) { 1368 1404 $categories = get_the_category($result->ID); 1369 1405 return get_cat_icon('cat='.$categories[0]->term_id.'&echo=0'); 1370 1406 } 1371 }1372 1373 ?> -
category-icons/trunk/category_icons_widget.php
r572619 r589646 30 30 if (function_exists('mycategoryorder')) $o = $instance['order'] ? 'order' : 'name'; 31 31 $cat_args = "orderby="; 32 $cat_args .= function_exists('mycategoryorder') ? $o : ' ';32 $cat_args .= function_exists('mycategoryorder') ? $o : 'name'; 33 33 $cat_args .= "&show_count={$c}&hierarchical={$h}&exclude={$exclude}&include={$include}"; 34 34 $putcaticons_parameters = $instance['putcaticons_parameters']; -
category-icons/trunk/changelog.txt
r572619 r589646 1 1 Changelog 2 3 2.2.3 4 * I've added an option in the panel settings for this : "in the category page, only that category icon is displ$ 5 * Bug fixed : the options with a checkbox were not saved correctly (!) 6 7 2.2.2 8 * Bug fixed : if there was a call to get_cat_icon with an ID in the category page (category.php, for example), $ 9 * Bug fixed in the widget : now the category names are displayed alphabetically. 10 * The plugin works with Wordpress Firewall 2. 11 * The datas pulled from the DB are escaped. 12 * Littles fixes. 2 13 3 14 2.2 -
category-icons/trunk/readme.txt
r572619 r589646 2 2 Contributors: submarine 3 3 Donate link: http://www.category-icons.com/support-the-plugin/ 4 Tags: category, categories, icons, icon, image, images, post, posts, list, lists, manage, plugin, plugins, sidebar, horizontally, vertically, widget, admin, photo, photos, formatting, rss 4 Tags: category, categories, icons, icon, image, images, post, posts, list, lists, manage, plugin, plugins, sidebar, horizontally, vertically, widget, admin, photo, photos, formatting, rss, category icons 5 5 Requires at least: 2.8 6 Tested up to: 3.4 7 Stable tag: 2.2.1 8 9 The No. 1 plugin to assign icons to categories. 6 Tested up to: 3.4.1 7 Stable tag: 2.2.3 8 License: GPLv2 or later 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 11 The No. 1 plugin to assign icons to categories. Category Icons allows you to associate a unique image with each of your WordPress categories. 10 12 11 13 == Description == 12 14 13 Assigns icons to categories with WordPress 2.8 or higher. This wonderful plugin : 15 This plugin allows you to associate a unique image with each of your WordPress categories in order to prettify your pages a bit. That will make your category pages look better than 90% of the category pages out there. 16 17 Everything is configurable from the settings menu, you can use it on your index (home) page, post pages, or even your sidebar ! You can do icons only, or text and icons, and it comes with a widget for the sidebar. This wonderful plugin : 14 18 15 19 * displays one or more icons in front of your post title or wherever you want 16 20 * displays icons in the sidebar, with or without the category name, with or without the help of the widget 17 * includes a widget. You can : use multiple Category Icons widgets (for WordPress 2.5 and higher), include or exclude some categories, display only icons (i.e. without the category name)...21 * includes a widget. You can use multiple Category Icons widgets, include or exclude some categories, display only icons (i.e. without the category name)... 18 22 * you can make rollover with the icons in the sidebar if you follow [this tutorial](http://www.category-icons.com/2008/05/how-to-make-rollovers-with-jquery/) 19 23 * is able to display category icons in your RSS 20 * will either show you where to place the little code needed in your themes, or patch them automatically24 * will either show you where to place the little code needed (template tag) in your themes 21 25 * generates pure html code of the img tag, so it gives you the freedom of doing what you want to with the icons (customizing via CSS or not) 22 26 * generates valid XHTML (and Strict XHTML) 23 27 * can prioritize the icons display (by Oliver Weichhold) 24 * is translated in more 20 languages (all the .po files are included, in case you want to update your language).28 * is translated in more than 20 languages (all the .po files are included, in case you want to update your language). 25 29 * is compatible with these powerful plugins : 26 30 [My Category Order](http://wordpress.org/extend/plugins/my-category-order/), … … 31 35 * is compatible with WordPress Network 32 36 37 There is also a [Lite version](http://wordpress.org/extend/plugins/category-icons-lite/). 38 33 39 == Frequently Asked Questions == 34 40 35 Please visit [the official website](http://www.category-icons.com/category/faq/ "Category Icons'FAQ") and [How-To](http://www.category-icons.com/category/howto/ "Category Icons' How-Tos"). Have a look at the how-to, you'll see that there're some tricks to do with it (rollovers, display specific icon, icon by default...). 36 And don't miss the languages updates. 41 Please visit [the official website](http://www.category-icons.com/category/faq/ "Category Icons'FAQ") and [How-To](http://www.category-icons.com/category/howto/ "Category Icons' How-Tos"). Have a look at the how-to, there are some tricks to do with category icons (rollovers, display specific icon, icon by default...). 37 42 38 43 == Installation == … … 50 55 == Screenshots == 51 56 52 [Please visit the category icons plugin page for screenshots & sample](http://www.category-icons.com/screenshots/) 53 54 == Donate == 55 56 Any amount is welcome to support the development of the plugin. 57 58 == I've found a bug, how can I tell you about it so you'll fix it for me? == 59 60 Go to http://www.category-icons.com/contact and fill out the contact form. Make sure you let me know the following: 61 62 * What version of WordPress you're using 63 * What other plugins you're running 64 * Exactly what problem you're seeing 65 66 Unfortunately, I do have a life outside of this plugin, so don't be sad if I don't fix the bug within 5 minutes. ;) 57 [Please visit the category icons plugin page for screenshots](http://www.category-icons.com/screenshots/) 58 59 == Buy me a coffee == 60 61 If you like this plugin, or it has benefited you, [buy me a coffee](http://www.category-icons.com/support-the-plugin/). 67 62 68 63 == Changelog == 64 65 = 2.2.3 = 66 * I've added an option in the panel settings for this : "in the category page, only that category icon is displayed in front of the title if the post has more than one category". 67 * Bug fixed : the options with a checkbox were not saved correctly (!) 68 69 = 2.2.2 = 70 * Bug fixed : if there was a call to get_cat_icon with an ID in the category page (category.php, for example), there was an error : "Fatal error: [] operator not supported for strings". 71 * Bug fixed in the widget : now the category names are displayed alphabetically. 72 * The plugin works with Wordpress Firewall 2. 73 * The datas pulled from the DB are escaped. 74 * Littles fixes. 69 75 70 76 = 2.2 = … … 197 203 * New functionnality : in the parameters of put\_cat\_icons() function, if you put icons\_only=1, then only the icons will be displayed in the sidebar, instead of the icon AND the category name. 198 204 199 example :200 201 if (function\_exists('put\_cat\_icons'))202 put\_cat\_icons( wp\_list\_categories('title\_li=&echo=0') ,'icons\_only=1');203 else204 wp\_list\_categories('title\_li=');205 206 205 = 1.7.7 = 207 206 * The plugin is now compatible with the 'Top Level Categories' plugin. … … 234 233 * new feature : 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. 235 234 236 Example :237 238 get\_cat\_icon('vertical\_display=true');239 240 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.241 242 Example of generated code :243 244 <div class="caticons" style="text-align:center;float:left;width: 32px;">[the\_icons\_are\_here]</div>245 246 Example of extending the class in style.css :247 248 .caticons,img {249 border:0 !important;250 }251 252 235 = 1.7 = 253 236 * A few bugs are resolved. 254 237 * Links & images are now W3 compliant. 255 238 * New functionnality : you can prioritize the display of icons. 256 From the author (Oliver): 257 You can now assign numeric priorities to categories. The priority is used to select a single category icon for a post with multiple categories. 258 259 Example: imagine we have a post with two categories: 260 261 - Companies -> ACME Corp. (Icon: ACME.gif, Priority 10) 262 - Products -> Milk (Icon: Milk.gif, Priority 20) 263 264 If you now pass the new boolean parameter “use\_priority” 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. 265 * You can display icons in the sidebar. you just have to use the new function : put\_cat\_icons(). Example of use : 266 put\_cat\_icons(wp\_list\_categories('show\_count=1&title\_li=<h2>Categories</h2&echo=0')); 267 You can add any parameters to wp\_list\_categories(), but you MUST add echo=0. 268 269 The function put\_cat\_icons() accepts 2 parameters : 270 first parameter : the list to process (from the wp\_list\_categories()), 271 second parameter : a string representing the same parameters as get\_cat\_icons(). 272 * You can define the maximum number of icons to be displayed in front of the posts titles in Options. 239 * You can display icons in the sidebar. you just have to use the new function : put\_cat\_icons(). * You can define the maximum number of icons to be displayed in front of the posts titles in Options. 273 240 * You can translate the plugin into your own language thanks to the .pot file provided with the plugin 274 241 If you translate it to another language than french, thank to send it to me in order to put it online and share it with everyone. :-) 275 * For the frenchies : I've translated the plugin into french. You just have to put the file 'category\_icons-fr\_FR.mo' in the plugins directory. (Pour avoir la traduction du plugin en français, vous devez juste déposer le fichier 'category\_icons-fr\_FR.mo' dans le répertoire des plugins).276 *277 242 278 243 = 1.6 = 279 244 * Now compatible with WordPress 2.3+ 245 246 == Upgrade Notice == 247 The error "Fatal error: [] operator not supported for strings" is fixed.
Note: See TracChangeset
for help on using the changeset viewer.