Changeset 583156
- Timestamp:
- 08/08/2012 04:29:06 PM (14 years ago)
- Location:
- category-icons-lite/tags/1.2
- Files:
-
- 2 edited
-
caticons-lite.class.php (modified) (4 diffs)
-
caticonslite.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
category-icons-lite/tags/1.2/caticons-lite.class.php
r583115 r583156 296 296 * This function returns the icon url 297 297 */ 298 private function get_icon($cat_id= 0) {298 private function get_icon($cat_id=-1) { 299 299 global $wpdb; 300 300 $result = ''; 301 $cat_id = (int) $cat_id; 302 if ( 0 == $cat_id ) { 301 if ( -1 == $cat_id ) { 303 302 $catlist = get_the_category(get_the_ID()); 304 303 if (is_array($catlist)) {// If there are several categories, … … 374 373 * Returns the category icons 375 374 */ 376 function get_cat_icon($cat_id= 0) {375 function get_cat_icon($cat_id=-1) { 377 376 $result = ''; 378 377 $icons = $this->get_icon($cat_id); … … 411 410 if (0 < $nb) { 412 411 $name = $result[0]; 413 //$cats[] = $this->slugs[trim($name)];414 412 $cats[] = $this->search_cat_id('slug',$name); 415 413 } … … 485 483 $form_fields['category']['input'] = 'select'; 486 484 $form_fields['category']['select'] = $array."<input type='hidden' id='caticonslite_categories' name='caticonslite_categories' value='$array_categories' />"; 487 488 485 } 489 486 return $form_fields; -
category-icons-lite/tags/1.2/caticonslite.php
r583069 r583156 87 87 88 88 if (!function_exists('get_cat_icon_lite')) { 89 function get_cat_icon_lite($cat_id= 0) {89 function get_cat_icon_lite($cat_id=-1) { 90 90 global $CategoryIconsLite; 91 91 return $CategoryIconsLite->get_cat_icon($cat_id);
Note: See TracChangeset
for help on using the changeset viewer.