Skip to content

Commit

Permalink
Merge pull request #25 from AyeCode/master
Browse files Browse the repository at this point in the history
Lazyload map category images natively - CHANGED
  • Loading branch information
kprajapatii committed Oct 12, 2020
2 parents 5e685b8 + 6c72f90 commit 7b810a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* GD ninja forms widget tries to open wrong lightbox for non AUI - FIXED
* Issue in save multiselect values with bootstrap active - FIXED
* Recent reviews widget image not rounded - FIXED
* Lazyload map category images natively - CHANGED

= 2.1.0.0 =
* AyeCode UI Bootstrap design - ADDED
Expand Down
6 changes: 3 additions & 3 deletions includes/class-geodir-maps.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,7 @@ public static function get_categories_filter( $post_type, $cat_parent = 0, $hide
$term_check .= ' title="' . esc_attr(geodir_utf8_ucfirst($cat_term->name)) . '" value="' . $cat_term->term_id . '" onclick="javascript:build_map_ajax_search_param(\'' . $map_canvas . '\',false, this)">';

if($design_style){
$term_img = '<img class="w-auto mr-1 ml-n1 rounded-circle" style="height:22px;" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . geodir_utf8_ucfirst($cat_term->name) . '"/>';

$term_img = '<img class="w-auto mr-1 ml-n1 rounded-circle" style="height:22px;" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . geodir_utf8_ucfirst($cat_term->name) . '" loading=lazy />';
$term_html = '<li class="'.$li_class.'">' .aui()->input(
array(
'id' => "{$map_canvas}_tick_cat_{$cat_term->term_id}",
Expand All @@ -463,8 +462,9 @@ public static function get_categories_filter( $post_type, $cat_parent = 0, $hide
),
)
);

}else{
$term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . geodir_utf8_ucfirst($cat_term->name) . '"/>';
$term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . geodir_utf8_ucfirst($cat_term->name) . '" loading=lazy />';

$term_html = '<li class="'.$li_class.'">' . $term_check . '<label for="' . $map_canvas.'_tick_cat_'. $cat_term->term_id . '">' . $term_img . geodir_utf8_ucfirst($cat_term->name) . '</label><span class="gd-map-cat-toggle"><i class="fas fa-long-arrow-alt-down" aria-hidden="true" style="display:none"></i></span>';
}
Expand Down

0 comments on commit 7b810a4

Please sign in to comment.