@@ -202,14 +202,14 @@ discard block |
||
202 | 202 | // Add marker cluster |
203 | 203 | if (isset($params['marker_cluster']) && gdsc_to_bool_val($params['marker_cluster']) && defined('GDCLUSTER_VERSION')) { |
204 | 204 | $map_args['enable_marker_cluster'] = true; |
205 | - if(get_option('geodir_marker_cluster_type')) { |
|
205 | + if (get_option('geodir_marker_cluster_type')) { |
|
206 | 206 | if ($map_args['autozoom']) { |
207 | 207 | $map_args['enable_marker_cluster_no_reposition'] = false; |
208 | 208 | } else { |
209 | 209 | $map_args['enable_marker_cluster_no_reposition'] = true; |
210 | 210 | } |
211 | 211 | |
212 | - $map_args['enable_marker_cluster_server'] = true ; |
|
212 | + $map_args['enable_marker_cluster_server'] = true; |
|
213 | 213 | |
214 | 214 | } |
215 | 215 | } else { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | } |
218 | 218 | |
219 | 219 | // if lat and long set in shortcode, hack it so the map is not repositioned |
220 | - if(!empty($params['latitude']) && !empty($params['longitude']) ){ |
|
220 | + if (!empty($params['latitude']) && !empty($params['longitude'])) { |
|
221 | 221 | $map_args['enable_marker_cluster_no_reposition'] = true; |
222 | 222 | } |
223 | 223 | |
@@ -890,20 +890,20 @@ discard block |
||
890 | 890 | |
891 | 891 | $show_adv_search = isset($params['show_adv_search']) && in_array($params['show_adv_search'], array('default', 'always', 'searched')) ? $params['show_adv_search'] : ''; |
892 | 892 | |
893 | - if ($show_adv_search != '' ) { |
|
894 | - $show_adv_class = 'geodir-advance-search-' . $show_adv_search . ' '; |
|
893 | + if ($show_adv_search != '') { |
|
894 | + $show_adv_class = 'geodir-advance-search-'.$show_adv_search.' '; |
|
895 | 895 | if ($show_adv_search == 'searched' && geodir_is_page('search')) { |
896 | 896 | $show_adv_search = 'search'; |
897 | 897 | } |
898 | - $show_adv_attrs = 'data-show-adv="' . $show_adv_search . '"'; |
|
898 | + $show_adv_attrs = 'data-show-adv="'.$show_adv_search.'"'; |
|
899 | 899 | |
900 | - $params['before_widget'] = str_replace('class="', $show_adv_attrs . ' class="' . $show_adv_class, $params['before_widget']); |
|
900 | + $params['before_widget'] = str_replace('class="', $show_adv_attrs.' class="'.$show_adv_class, $params['before_widget']); |
|
901 | 901 | } |
902 | 902 | |
903 | 903 | ob_start(); |
904 | 904 | |
905 | 905 | //geodir_get_template_part('listing', 'filter-form'); |
906 | - the_widget('geodir_advance_search_widget', $params, $params ); |
|
906 | + the_widget('geodir_advance_search_widget', $params, $params); |
|
907 | 907 | |
908 | 908 | $output = ob_get_contents(); |
909 | 909 | ob_end_clean(); |
@@ -1103,7 +1103,7 @@ discard block |
||
1103 | 1103 | |
1104 | 1104 | // Validate character_count |
1105 | 1105 | //todo: is this necessary? |
1106 | - $params['character_count'] = $params['character_count']; |
|
1106 | + $params['character_count'] = $params['character_count']; |
|
1107 | 1107 | |
1108 | 1108 | // Validate our layout choice |
1109 | 1109 | // Outside of the norm, I added some more simple terms to match the existing |
@@ -1115,7 +1115,7 @@ discard block |
||
1115 | 1115 | |
1116 | 1116 | // Validate Listing width, used in the template widget-listing-listview.php |
1117 | 1117 | // The context is in width=$listing_width% - So we need a positive number between 0 & 100 |
1118 | - $params['listing_width'] = gdsc_validate_listing_width($params['listing_width']); |
|
1118 | + $params['listing_width'] = gdsc_validate_listing_width($params['listing_width']); |
|
1119 | 1119 | |
1120 | 1120 | // Validate the checkboxes used on the widget |
1121 | 1121 | $params['add_location_filter'] = gdsc_to_bool_val($params['add_location_filter']); |
@@ -1131,7 +1131,7 @@ discard block |
||
1131 | 1131 | if (!empty($params['tags'])) { |
1132 | 1132 | if (!is_array($params['tags'])) { |
1133 | 1133 | $comma = _x(',', 'tag delimiter'); |
1134 | - if ( ',' !== $comma ) { |
|
1134 | + if (',' !== $comma) { |
|
1135 | 1135 | $params['tags'] = str_replace($comma, ',', $params['tags']); |
1136 | 1136 | } |
1137 | 1137 | $params['tags'] = explode(',', trim($params['tags'], " \n\t\r\0\x0B,")); |
@@ -1153,13 +1153,13 @@ discard block |
||
1153 | 1153 | unset($atts['pageno']); |
1154 | 1154 | } |
1155 | 1155 | |
1156 | - if ( !empty($atts['shortcode_content']) ) { |
|
1156 | + if (!empty($atts['shortcode_content'])) { |
|
1157 | 1157 | $content = $atts['shortcode_content']; |
1158 | 1158 | } |
1159 | 1159 | $params['shortcode_content'] = trim($content); |
1160 | 1160 | $atts['shortcode_content'] = trim($content); |
1161 | 1161 | |
1162 | - $params['shortcode_atts'] = $atts; |
|
1162 | + $params['shortcode_atts'] = $atts; |
|
1163 | 1163 | |
1164 | 1164 | $output = geodir_sc_gd_listings_output($params); |
1165 | 1165 | |
@@ -1226,8 +1226,8 @@ discard block |
||
1226 | 1226 | // Validate the checkboxes used on the widget |
1227 | 1227 | $params['hide_empty'] = gdsc_to_bool_val($params['hide_empty']); |
1228 | 1228 | $params['show_count'] = gdsc_to_bool_val($params['show_count']); |
1229 | - $params['hide_icon'] = gdsc_to_bool_val($params['hide_icon']); |
|
1230 | - $params['cpt_left'] = gdsc_to_bool_val($params['cpt_left']); |
|
1229 | + $params['hide_icon'] = gdsc_to_bool_val($params['hide_icon']); |
|
1230 | + $params['cpt_left'] = gdsc_to_bool_val($params['cpt_left']); |
|
1231 | 1231 | |
1232 | 1232 | if ($params['max_count'] != 'all') { |
1233 | 1233 | $params['max_count'] = absint($params['max_count']); |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | $value = 100; |
30 | 30 | } |
31 | 31 | // Re-add the percent symbol |
32 | - $value = $value . '%'; |
|
32 | + $value = $value.'%'; |
|
33 | 33 | } elseif ((strlen($value) - 2) == strpos(trim($value), 'px')) { |
34 | 34 | // Get the absint & re-add the 'px' |
35 | - $value = preg_replace('/\D/', '', $value) . 'px'; |
|
35 | + $value = preg_replace('/\D/', '', $value).'px'; |
|
36 | 36 | } else { |
37 | 37 | $value = preg_replace('/\D/', '', $value); |
38 | 38 | } |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | } |
212 | 212 | if (isset($query->query_vars['is_geodir_loop']) && $query->query_vars['is_geodir_loop']) { |
213 | 213 | |
214 | - $table = $plugin_prefix . $geodir_post_type . '_detail'; |
|
214 | + $table = $plugin_prefix.$geodir_post_type.'_detail'; |
|
215 | 215 | |
216 | 216 | add_filter('posts_fields', 'geodir_posts_fields', 1); |
217 | 217 | add_filter('posts_join', 'geodir_posts_join', 1); |
@@ -560,10 +560,10 @@ discard block |
||
560 | 560 | $post_number = !empty($args['post_number']) ? $args['post_number'] : 10; |
561 | 561 | $add_location_filter = !empty($args['add_location_filter']) ? true : false; |
562 | 562 | $list_sort = !empty($args['list_sort']) ? $args['list_sort'] : 'latest'; |
563 | - $character_count = isset($args['character_count']) ? $args['character_count'] : ''; |
|
564 | - $layout = !empty($args['layout']) ? $args['layout'] : 'gridview_onehalf'; |
|
565 | - $with_pagination = !empty($args['with_pagination']) ? true : false; |
|
566 | - $event_type = !empty($args['event_type']) ? $args['event_type'] : ''; |
|
563 | + $character_count = isset($args['character_count']) ? $args['character_count'] : ''; |
|
564 | + $layout = !empty($args['layout']) ? $args['layout'] : 'gridview_onehalf'; |
|
565 | + $with_pagination = !empty($args['with_pagination']) ? true : false; |
|
566 | + $event_type = !empty($args['event_type']) ? $args['event_type'] : ''; |
|
567 | 567 | $shortcode_content = !empty($args['shortcode_content']) ? trim($args['shortcode_content']) : ''; |
568 | 568 | $tags = !empty($args['tags']) ? $args['tags'] : array(); |
569 | 569 | /** |
@@ -577,13 +577,13 @@ discard block |
||
577 | 577 | $shortcode_content = apply_filters('geodir_sc_gd_listings_not_found_content', $shortcode_content, $args); |
578 | 578 | |
579 | 579 | $top_pagination = $with_pagination && !empty($args['top_pagination']) ? true : false; |
580 | - $bottom_pagination = $with_pagination && !empty($args['bottom_pagination']) ? true : false; |
|
580 | + $bottom_pagination = $with_pagination && !empty($args['bottom_pagination']) ? true : false; |
|
581 | 581 | |
582 | 582 | $shortcode_atts = !empty($args['shortcode_atts']) ? $args['shortcode_atts'] : array(); |
583 | 583 | |
584 | 584 | // ajax mode |
585 | - $geodir_ajax = !empty($args['geodir_ajax']) ? true : false; |
|
586 | - $pageno = $geodir_ajax && !empty($args['pageno']) ? $args['pageno'] : 1; |
|
585 | + $geodir_ajax = !empty($args['geodir_ajax']) ? true : false; |
|
586 | + $pageno = $geodir_ajax && !empty($args['pageno']) ? $args['pageno'] : 1; |
|
587 | 587 | |
588 | 588 | $query_args = array( |
589 | 589 | 'posts_per_page' => $post_number, |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | // Clean tags |
643 | 643 | if (!is_array($tags)) { |
644 | 644 | $comma = _x(',', 'tag delimiter'); |
645 | - if ( ',' !== $comma ) { |
|
645 | + if (',' !== $comma) { |
|
646 | 646 | $tags = str_replace($comma, ',', $tags); |
647 | 647 | } |
648 | 648 | $tags = explode(',', trim($tags, " \n\t\r\0\x0B,")); |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | |
652 | 652 | if (!empty($tags)) { |
653 | 653 | $tag_query = array( |
654 | - 'taxonomy' => $post_type . '_tags', |
|
654 | + 'taxonomy' => $post_type.'_tags', |
|
655 | 655 | 'field' => 'name', |
656 | 656 | 'terms' => $tags |
657 | 657 | ); |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | if(!pid > 0 || !(container && typeof container != 'undefined')) { |
769 | 769 | return false; |
770 | 770 | } |
771 | - var scatts = "<?php echo addslashes(json_encode($shortcode_atts));?>"; |
|
771 | + var scatts = "<?php echo addslashes(json_encode($shortcode_atts)); ?>"; |
|
772 | 772 | |
773 | 773 | var data = { |
774 | 774 | 'action': 'geodir_sclistings', |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | /** |
794 | 794 | * if lazyload images enabled then refresh them once ajax page changed. |
795 | 795 | */ |
796 | - if(get_option('geodir_lazy_load',1)){?> |
|
796 | + if (get_option('geodir_lazy_load', 1)) {?> |
|
797 | 797 | geodir_init_lazy_load(); |
798 | 798 | <?php }?> |
799 | 799 | |
@@ -856,16 +856,16 @@ discard block |
||
856 | 856 | if ($max_page > 1 || $always_show) { |
857 | 857 | // Extra pagination info |
858 | 858 | $geodir_pagination_more_info = get_option('geodir_pagination_advance_info'); |
859 | - $start_no = ( $pageno - 1 ) * $posts_per_page + 1; |
|
859 | + $start_no = ($pageno - 1) * $posts_per_page + 1; |
|
860 | 860 | $end_no = min($pageno * $posts_per_page, $numposts); |
861 | 861 | |
862 | 862 | if ($geodir_pagination_more_info != '') { |
863 | - $pagination_info = '<div class="gd-pagination-details">' . wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts) . '</div>'; |
|
863 | + $pagination_info = '<div class="gd-pagination-details">'.wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts).'</div>'; |
|
864 | 864 | |
865 | 865 | if ($geodir_pagination_more_info == 'before') { |
866 | - $before = $before . $pagination_info; |
|
866 | + $before = $before.$pagination_info; |
|
867 | 867 | } else if ($geodir_pagination_more_info == 'after') { |
868 | - $after = $pagination_info . $after; |
|
868 | + $after = $pagination_info.$after; |
|
869 | 869 | } |
870 | 870 | } |
871 | 871 | |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | } |
876 | 876 | |
877 | 877 | if (($pageno - 1) > 0) { |
878 | - echo '<a class="gd-page-sc-prev" href="javascript:void(0);" onclick="gd_sc_gopage(this, ' . (int)($pageno - 1) . ');">' . $prelabel . '</a> '; |
|
878 | + echo '<a class="gd-page-sc-prev" href="javascript:void(0);" onclick="gd_sc_gopage(this, '.(int) ($pageno - 1).');">'.$prelabel.'</a> '; |
|
879 | 879 | } |
880 | 880 | |
881 | 881 | for ($i = $pageno - $half_pages_to_show; $i <= $pageno + $half_pages_to_show; $i++) { |
@@ -883,17 +883,17 @@ discard block |
||
883 | 883 | if ($i == $pageno) { |
884 | 884 | echo "<strong class='on' class='gd-page-sc-act'>$i</strong>"; |
885 | 885 | } else { |
886 | - echo ' <a class="gd-page-sc-no" href="javascript:void(0);" onclick="gd_sc_gopage(this, ' . (int)$i . ');">' . $i . '</a> '; |
|
886 | + echo ' <a class="gd-page-sc-no" href="javascript:void(0);" onclick="gd_sc_gopage(this, '.(int) $i.');">'.$i.'</a> '; |
|
887 | 887 | } |
888 | 888 | } |
889 | 889 | } |
890 | 890 | |
891 | 891 | if (($pageno + 1) <= $max_page) { |
892 | - echo ' <a class="gd-page-sc-nxt" href="javascript:void(0);" onclick="gd_sc_gopage(this, ' . (int)($pageno + 1) . ');">' . $nxtlabel . '</a>'; |
|
892 | + echo ' <a class="gd-page-sc-nxt" href="javascript:void(0);" onclick="gd_sc_gopage(this, '.(int) ($pageno + 1).');">'.$nxtlabel.'</a>'; |
|
893 | 893 | } |
894 | 894 | |
895 | 895 | if ($pageno < $max_page) { |
896 | - echo ' <a class="gd-page-sc-lst" href="javascript:void(0);" onclick="gd_sc_gopage(this, ' . (int)$max_page . ');">»</a>'; |
|
896 | + echo ' <a class="gd-page-sc-lst" href="javascript:void(0);" onclick="gd_sc_gopage(this, '.(int) $max_page.');">»</a>'; |
|
897 | 897 | } |
898 | 898 | echo "</div> $after"; |
899 | 899 | } |
@@ -916,7 +916,7 @@ discard block |
||
916 | 916 | $scatts = isset($_POST['scatts']) ? $_POST['scatts'] : NULL; |
917 | 917 | $pageno = isset($_POST['pageno']) ? absint($_POST['pageno']) : 1; |
918 | 918 | |
919 | - $shortcode_atts = !empty($scatts) ? (array)json_decode(stripslashes_deep($scatts)) : NULL; |
|
919 | + $shortcode_atts = !empty($scatts) ? (array) json_decode(stripslashes_deep($scatts)) : NULL; |
|
920 | 920 | |
921 | 921 | if (!empty($shortcode_atts) && is_array($shortcode_atts)) { |
922 | 922 | $shortcode_atts['pageno'] = $pageno; |