bug corection bootstrap ultimate theme
-
I have found 2 bugs the first one makes all the posts in carousel selected when loading home page. There is simply the word “active” in the wrong place in /inc/modules/carousel.php
this is the corrected code<div class="carousel slide" id="myCarousel"> <!-- Indicators --> <ol class="carousel-indicators"> <li class="active" data-slide-to="0" data-target="#myCarousel"></li> <?php $cnt=1; while($cnt < $postcnt) { echo '<li data-slide-to="'.$cnt.'" data-target="#myCarousel" class=""></li>'; $cnt++; } ?> </ol>
The second one affects categories selection in higlights, carousel, featurettes etc. when I have categories that are not sequentially numbered from 1 to n, for example if I delete a category then add other categories.
In inc/eo/admin-functions.php the wrong function array_merge is used to merge two arrays. This function renumbers all the numeric keys.
The correct function to use is simply + to add two arraysCorrected code:
inc/eo/admin-functions.phpfunction eo_get_q_cats() { $category_ids = get_all_category_ids(); $cat_arr = array(); foreach($category_ids as $cat_id) { $cat_name = get_cat_name($cat_id); // echo $cat_id . ': ' . $cat_name; $cat_arr[$cat_id] = $cat_name; } ksort($cat_arr); $st_cat_arr = array(0 => "ALL"); // $fin_cat_arr = array_merge($st_cat_arr,$cat_arr); $fin_cat_arr = $st_cat_arr+$cat_arr; return $fin_cat_arr; }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘bug corection bootstrap ultimate theme’ is closed to new replies.