Plugin Directory

Changeset 583156


Ignore:
Timestamp:
08/08/2012 04:29:06 PM (14 years ago)
Author:
submarine
Message:

1.2 second bug fixed

Location:
category-icons-lite/tags/1.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • category-icons-lite/tags/1.2/caticons-lite.class.php

    r583115 r583156  
    296296        * This function returns the icon url
    297297        */
    298         private function get_icon($cat_id=0) {
     298        private function get_icon($cat_id=-1) {
    299299            global $wpdb;
    300300            $result = '';
    301             $cat_id = (int) $cat_id;
    302             if ( 0 == $cat_id ) {   
     301            if ( -1 == $cat_id ) {
    303302                $catlist = get_the_category(get_the_ID());
    304303                if (is_array($catlist)) {// If there are several categories,
     
    374373        * Returns the category icons
    375374        */
    376         function get_cat_icon($cat_id=0) {
     375        function get_cat_icon($cat_id=-1) {
    377376            $result = '';
    378377            $icons = $this->get_icon($cat_id);
     
    411410                       if (0 < $nb) {
    412411                           $name = $result[0];
    413                            //$cats[] = $this->slugs[trim($name)];   
    414412                           $cats[] = $this->search_cat_id('slug',$name);
    415413                       }
     
    485483                $form_fields['category']['input'] = 'select';
    486484                $form_fields['category']['select'] = $array."<input type='hidden' id='caticonslite_categories' name='caticonslite_categories' value='$array_categories' />";
    487                
    488485            }
    489486            return $form_fields;
  • category-icons-lite/tags/1.2/caticonslite.php

    r583069 r583156  
    8787   
    8888    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) {
    9090            global $CategoryIconsLite;
    9191            return $CategoryIconsLite->get_cat_icon($cat_id);
Note: See TracChangeset for help on using the changeset viewer.