Completed
Pull Request — master (#206)
by Kiran
05:47
created
geodirectory-functions/custom_functions.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -51,20 +51,20 @@  discard block
 block discarded – undo
51 51
 			jQuery(listSel).children('li').switchClass('gridview_onehalf gridview_onethird gridview_onefourth', 'gridview_onefifth', 600);
52 52
 		}
53 53
 
54
-		jQuery.post("<?php echo geodir_get_ajax_url();?>&gd_listing_view=" + val, function (data) {
54
+		jQuery.post("<?php echo geodir_get_ajax_url(); ?>&gd_listing_view=" + val, function (data) {
55 55
 			//alert(data );
56 56
 		});
57 57
 	}
58 58
     </script>
59 59
     <div class="geodir-list-view-select">
60 60
         <select name="gd_list_view" id="gd_list_view" onchange="geodir_list_view_select(this);">
61
-            <?php $listing_view = (int)$gd_session->get('gd_listing_view'); ?>
62
-            <option value=""><?php _e('View:', 'geodirectory');?></option>
63
-            <option value="1" <?php selected(1, $listing_view);?>><?php _e('View: List', 'geodirectory');?></option>
64
-            <option value="2" <?php selected(2, $listing_view);?>><?php _e('View: Grid 2', 'geodirectory');?></option>
65
-            <option value="3" <?php selected(3, $listing_view);?>><?php _e('View: Grid 3', 'geodirectory');?></option>
66
-            <option value="4" <?php selected(4, $listing_view);?>><?php _e('View: Grid 4', 'geodirectory');?></option>
67
-            <option value="5" <?php selected(5, $listing_view);?>><?php _e('View: Grid 5', 'geodirectory');?></option>
61
+            <?php $listing_view = (int) $gd_session->get('gd_listing_view'); ?>
62
+            <option value=""><?php _e('View:', 'geodirectory'); ?></option>
63
+            <option value="1" <?php selected(1, $listing_view); ?>><?php _e('View: List', 'geodirectory'); ?></option>
64
+            <option value="2" <?php selected(2, $listing_view); ?>><?php _e('View: Grid 2', 'geodirectory'); ?></option>
65
+            <option value="3" <?php selected(3, $listing_view); ?>><?php _e('View: Grid 3', 'geodirectory'); ?></option>
66
+            <option value="4" <?php selected(4, $listing_view); ?>><?php _e('View: Grid 4', 'geodirectory'); ?></option>
67
+            <option value="5" <?php selected(5, $listing_view); ?>><?php _e('View: Grid 5', 'geodirectory'); ?></option>
68 68
         </select>
69 69
     </div>
70 70
 <?php
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      * @param object|string $post The post object.
185 185
      * @param string $post_type The post type.
186 186
      */
187
-    return (object)apply_filters('geodir_post_package_info', $package_info, $post, $post_type);
187
+    return (object) apply_filters('geodir_post_package_info', $package_info, $post, $post_type);
188 188
 
189 189
 }
190 190
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
         // strip slashes message
299 299
         $client_message = stripslashes_deep($client_message);
300 300
 
301
-        geodir_sendEmail($youremail, $yourname, $to_email, $to_name, '', $client_message, $extra = '', 'send_enquiry', $request['pid']);//To client email
301
+        geodir_sendEmail($youremail, $yourname, $to_email, $to_name, '', $client_message, $extra = '', 'send_enquiry', $request['pid']); //To client email
302 302
     }
303 303
 
304 304
     /**
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
      * }
404 404
      */
405 405
     do_action('geodir_before_send_to_friend_email', $request);
406
-    geodir_sendEmail($youremail, $yourname, $to_email, $to_name, $frnd_subject, $frnd_comments, $extra = '', 'send_friend', $request['pid']);//To client email
406
+    geodir_sendEmail($youremail, $yourname, $to_email, $to_name, $frnd_subject, $frnd_comments, $extra = '', 'send_friend', $request['pid']); //To client email
407 407
 
408 408
     /**
409 409
      * Called after the send to friend email is sent.
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
 	 *
588 588
 	 * @since 1.4.4
589 589
 	 */
590
-	if ( is_search() ) {
590
+	if (is_search()) {
591 591
 		return;
592 592
 	}
593 593
 
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
             if ($sort->field_type == 'random') {
612 612
                 $key = $sort->field_type;
613 613
                 ($sort_by == $key || ($sort->is_default == '1' && !isset($_REQUEST['sort_by']))) ? $selected = 'selected="selected"' : $selected = '';
614
-                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url( add_query_arg('sort_by', $key) ) . '">' . __($label, 'geodirectory') . '</option>';
614
+                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url(add_query_arg('sort_by', $key)) . '">' . __($label, 'geodirectory') . '</option>';
615 615
             }
616 616
 
617 617
             if ($sort->htmlvar_name == 'comment_count') {
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
                 if ($sort->asc_title)
625 625
                     $label = $sort->asc_title;
626 626
                 ($sort_by == $key || ($sort->is_default == '1' && $sort->default_order == $key && !isset($_REQUEST['sort_by']))) ? $selected = 'selected="selected"' : $selected = '';
627
-                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url( add_query_arg('sort_by', $key) ) . '">' . __($label, 'geodirectory') . '</option>';
627
+                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url(add_query_arg('sort_by', $key)) . '">' . __($label, 'geodirectory') . '</option>';
628 628
             }
629 629
 
630 630
             if ($sort->sort_desc) {
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
                 if ($sort->desc_title)
634 634
                     $label = $sort->desc_title;
635 635
                 ($sort_by == $key || ($sort->is_default == '1' && $sort->default_order == $key && !isset($_REQUEST['sort_by']))) ? $selected = 'selected="selected"' : $selected = '';
636
-                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url( add_query_arg('sort_by', $key) ) . '">' . __($label, 'geodirectory') . '</option>';
636
+                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url(add_query_arg('sort_by', $key)) . '">' . __($label, 'geodirectory') . '</option>';
637 637
             }
638 638
 
639 639
         }
@@ -648,9 +648,9 @@  discard block
 block discarded – undo
648 648
             <select name="sort_by" id="sort_by" onchange="javascript:window.location=this.value;">
649 649
 
650 650
                 <option
651
-                    value="<?php echo esc_url( add_query_arg('sort_by', '') );?>" <?php if ($sort_by == '') echo 'selected="selected"';?>><?php _e('Sort By', 'geodirectory');?></option><?php
651
+                    value="<?php echo esc_url(add_query_arg('sort_by', '')); ?>" <?php if ($sort_by == '') echo 'selected="selected"'; ?>><?php _e('Sort By', 'geodirectory'); ?></option><?php
652 652
 
653
-                echo $sort_field_options;?>
653
+                echo $sort_field_options; ?>
654 654
 
655 655
             </select>
656 656
 
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
         $category = array();
720 720
 
721 721
         if (isset($_REQUEST['backandedit'])) {
722
-            $post = (object)$gd_session->get('listing');
722
+            $post = (object) $gd_session->get('listing');
723 723
             $post_type = $post->listing_type;
724 724
             if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')
725 725
                 $post_id = $_REQUEST['pid'];
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
             if ($add_location_filter != '0') {
797 797
                 $geodir_add_location_url = '1';
798 798
             }
799
-            $viewall_url = get_term_link((int)$category[0], $post_type . $category_taxonomy);
799
+            $viewall_url = get_term_link((int) $category[0], $post_type . $category_taxonomy);
800 800
             $geodir_add_location_url = NULL;
801 801
         }
802 802
         ob_start();
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
         $geodir_post_category_str = serialize($geodir_post_category_str);
894 894
     }
895 895
 
896
-    $all_var['post_category_array'] = html_entity_decode((string)$geodir_post_category_str, ENT_QUOTES, 'UTF-8');
896
+    $all_var['post_category_array'] = html_entity_decode((string) $geodir_post_category_str, ENT_QUOTES, 'UTF-8');
897 897
     $script = "var post_category_array = " . json_encode($all_var) . ';';
898 898
     echo '<script>';
899 899
     echo $script;
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
     $location_id = NULL;
1027 1027
     if ($geodir_location_manager) {
1028 1028
         $sql = $wpdb->prepare("SELECT location_id FROM " . POST_LOCATION_TABLE . " WHERE city_slug=%s ORDER BY location_id ASC LIMIT 1", array($gd_city));
1029
-        $location_id = (int)$wpdb->get_var($sql);
1029
+        $location_id = (int) $wpdb->get_var($sql);
1030 1030
         $location_type = geodir_what_is_current_location();
1031 1031
         if ($location_type == 'city') {
1032 1032
             $replace_location = geodir_get_current_location(array('what' => 'city', 'echo' => false));
@@ -1087,45 +1087,45 @@  discard block
 block discarded – undo
1087 1087
 
1088 1088
 
1089 1089
     $gd_page = '';
1090
-    if(geodir_is_page('home')){
1090
+    if (geodir_is_page('home')) {
1091 1091
         $gd_page = 'home';
1092 1092
         $meta_desc = (get_option('geodir_meta_desc_homepage')) ? get_option('geodir_meta_desc_homepage') : $meta_desc;
1093 1093
     }
1094
-    elseif(geodir_is_page('detail')){
1094
+    elseif (geodir_is_page('detail')) {
1095 1095
         $gd_page = 'detail';
1096 1096
         $meta_desc = (get_option('geodir_meta_desc_detail')) ? get_option('geodir_meta_desc_detail') : $meta_desc;
1097 1097
     }
1098
-    elseif(geodir_is_page('pt')){
1098
+    elseif (geodir_is_page('pt')) {
1099 1099
         $gd_page = 'pt';
1100 1100
         $meta_desc = (get_option('geodir_meta_desc_pt')) ? get_option('geodir_meta_desc_pt') : $meta_desc;
1101 1101
     }
1102
-    elseif(geodir_is_page('listing')){
1102
+    elseif (geodir_is_page('listing')) {
1103 1103
         $gd_page = 'listing';
1104 1104
         $meta_desc = (get_option('geodir_meta_desc_listing')) ? get_option('geodir_meta_desc_listing') : $meta_desc;
1105 1105
     }
1106
-    elseif(geodir_is_page('location')){
1106
+    elseif (geodir_is_page('location')) {
1107 1107
         $gd_page = 'location';
1108 1108
         $meta_desc = (get_option('geodir_meta_desc_location')) ? get_option('geodir_meta_desc_location') : $meta_desc;
1109 1109
         $meta_desc = apply_filters('geodir_seo_meta_location_description', $meta_desc);
1110 1110
 
1111 1111
     }
1112
-    elseif(geodir_is_page('search')){
1112
+    elseif (geodir_is_page('search')) {
1113 1113
         $gd_page = 'search';
1114 1114
         $meta_desc = (get_option('geodir_meta_desc_search')) ? get_option('geodir_meta_desc_search') : $meta_desc;
1115 1115
     }
1116
-    elseif(geodir_is_page('add-listing')){
1116
+    elseif (geodir_is_page('add-listing')) {
1117 1117
         $gd_page = 'add-listing';
1118 1118
         $meta_desc = (get_option('geodir_meta_desc_add-listing')) ? get_option('geodir_meta_desc_add-listing') : $meta_desc;
1119 1119
     }
1120
-    elseif(geodir_is_page('author')){
1120
+    elseif (geodir_is_page('author')) {
1121 1121
         $gd_page = 'author';
1122 1122
         $meta_desc = (get_option('geodir_meta_desc_author')) ? get_option('geodir_meta_desc_author') : $meta_desc;
1123 1123
     }
1124
-    elseif(geodir_is_page('login')){
1124
+    elseif (geodir_is_page('login')) {
1125 1125
         $gd_page = 'login';
1126 1126
         $meta_desc = (get_option('geodir_meta_desc_login')) ? get_option('geodir_meta_desc_login') : $meta_desc;
1127 1127
     }
1128
-    elseif(geodir_is_page('listing-success')){
1128
+    elseif (geodir_is_page('listing-success')) {
1129 1129
         $gd_page = 'listing-success';
1130 1130
         $meta_desc = (get_option('geodir_meta_desc_listing-success')) ? get_option('geodir_meta_desc_listing-success') : $meta_desc;
1131 1131
     }
@@ -1153,7 +1153,7 @@  discard block
 block discarded – undo
1153 1153
          * @param string $title The page description including variables.
1154 1154
          * @param string $gd_page The GeoDirectory page type if any.
1155 1155
          */
1156
-        $meta_desc = apply_filters('geodir_seo_meta_description_pre', __($meta_desc, 'geodirectory'),$gd_page,'');
1156
+        $meta_desc = apply_filters('geodir_seo_meta_description_pre', __($meta_desc, 'geodirectory'), $gd_page, '');
1157 1157
 
1158 1158
         /**
1159 1159
          * Filter SEO meta description.
@@ -1169,7 +1169,7 @@  discard block
 block discarded – undo
1169 1169
         $place_tags = wp_get_post_terms($post->ID, $post->post_type . '_tags', array("fields" => "names"));
1170 1170
         $place_cats = wp_get_post_terms($post->ID, $post->post_type . 'category', array("fields" => "names"));
1171 1171
 
1172
-        $meta_key .= implode(", ", array_merge((array)$place_cats, (array)$place_tags));
1172
+        $meta_key .= implode(", ", array_merge((array) $place_cats, (array) $place_tags));
1173 1173
     } else {
1174 1174
         $posttags = get_the_tags();
1175 1175
         if ($posttags) {
@@ -1359,8 +1359,8 @@  discard block
 block discarded – undo
1359 1359
 
1360 1360
     global $post, $post_images, $video, $special_offers, $related_listing, $geodir_post_detail_fields;
1361 1361
 
1362
-    $post_id = !empty($post) && isset($post->ID) ? (int)$post->ID : 0;
1363
-    $request_post_id = !empty($_REQUEST['p']) ? (int)$_REQUEST['p'] : 0;
1362
+    $post_id = !empty($post) && isset($post->ID) ? (int) $post->ID : 0;
1363
+    $request_post_id = !empty($_REQUEST['p']) ? (int) $_REQUEST['p'] : 0;
1364 1364
     $is_backend_preview = (is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p'])) && is_super_admin() ? true : false; // skip if preview from backend
1365 1365
 
1366 1366
     if ($is_backend_preview && !$post_id > 0 && $request_post_id > 0) {
@@ -1395,7 +1395,7 @@  discard block
 block discarded – undo
1395 1395
         if (!empty($post_images)) {
1396 1396
             foreach ($post_images as $image) {
1397 1397
                 $caption = (!empty($image->caption)) ? $image->caption : '';
1398
-                $thumb_image .= '<a href="' . $image->src . '" title="'.$caption.'">';
1398
+                $thumb_image .= '<a href="' . $image->src . '" title="' . $caption . '">';
1399 1399
                 $thumb_image .= geodir_show_image($image, 'thumbnail', true, false);
1400 1400
                 $thumb_image .= '</a>';
1401 1401
             }
@@ -1474,12 +1474,12 @@  discard block
 block discarded – undo
1474 1474
     }
1475 1475
 
1476 1476
 
1477
-    $arr_detail_page_tabs = geodir_detail_page_tabs_list();// get this sooner so we can get the active tab for the user
1477
+    $arr_detail_page_tabs = geodir_detail_page_tabs_list(); // get this sooner so we can get the active tab for the user
1478 1478
 
1479 1479
     $active_tab_name = '';
1480
-    foreach($arr_detail_page_tabs as $tabs){
1481
-        if(isset($tabs['is_active_tab']) && $tabs['is_active_tab'] && isset($tabs['heading_text']) && $tabs['heading_text']){
1482
-            $active_tab_name = __($tabs['heading_text'],'geodirectory');
1480
+    foreach ($arr_detail_page_tabs as $tabs) {
1481
+        if (isset($tabs['is_active_tab']) && $tabs['is_active_tab'] && isset($tabs['heading_text']) && $tabs['heading_text']) {
1482
+            $active_tab_name = __($tabs['heading_text'], 'geodirectory');
1483 1483
         }
1484 1484
     }
1485 1485
     ?>
@@ -1488,7 +1488,7 @@  discard block
 block discarded – undo
1488 1488
 
1489 1489
         <div id="geodir-tab-mobile-menu" >
1490 1490
             <i class="fa fa-bars"></i>
1491
-            <span class="geodir-mobile-active-tab"><?php echo $active_tab_name;?></span>
1491
+            <span class="geodir-mobile-active-tab"><?php echo $active_tab_name; ?></span>
1492 1492
             <i class="fa fa-sort-desc"></i>
1493 1493
         </div>
1494 1494
 
@@ -1508,18 +1508,18 @@  discard block
 block discarded – undo
1508 1508
                 if ($detail_page_tab['is_display']) {
1509 1509
                     ?>
1510 1510
                     <dt></dt> <!-- added to comply with validation -->
1511
-                    <dd <?php if ($detail_page_tab['is_active_tab']){ ?>class="geodir-tab-active"<?php }?> >
1512
-                        <a data-tab="#<?php echo $tab_index;?>"
1513
-                           data-status="enable"><?php _e($detail_page_tab['heading_text'],'geodirectory');?></a>
1511
+                    <dd <?php if ($detail_page_tab['is_active_tab']) { ?>class="geodir-tab-active"<?php }?> >
1512
+                        <a data-tab="#<?php echo $tab_index; ?>"
1513
+                           data-status="enable"><?php _e($detail_page_tab['heading_text'], 'geodirectory'); ?></a>
1514 1514
                     </dd>
1515 1515
 
1516 1516
                     <?php
1517 1517
                     ob_start() // start tab content buffering
1518 1518
                     ?>
1519
-                    <li id="<?php echo $tab_index;?>Tab" <?php if ($tab_index == 'post_profile') {
1519
+                    <li id="<?php echo $tab_index; ?>Tab" <?php if ($tab_index == 'post_profile') {
1520 1520
                         //echo 'itemprop="description"';
1521 1521
                     }?>>
1522
-                        <div id="<?php echo $tab_index;?>" class="hash-offset"></div>
1522
+                        <div id="<?php echo $tab_index; ?>" class="hash-offset"></div>
1523 1523
                         <?php
1524 1524
                         /**
1525 1525
                          * Called before the details tab content is output per tab.
@@ -1569,7 +1569,7 @@  discard block
 block discarded – undo
1569 1569
                                 break;
1570 1570
                             case 'post_video':
1571 1571
                                 /** This action is documented in geodirectory_template_actions.php */
1572
-                                echo apply_filters('the_content', stripslashes($video));// we apply the_content filter so oembed works also;
1572
+                                echo apply_filters('the_content', stripslashes($video)); // we apply the_content filter so oembed works also;
1573 1573
                                 break;
1574 1574
                             case 'special_offers':
1575 1575
                                 echo wpautop(stripslashes($special_offers));
@@ -1702,7 +1702,7 @@  discard block
 block discarded – undo
1702 1702
     $flip = false;
1703 1703
     $modify = false;
1704 1704
     if (!empty($exif) && isset($exif['Orientation'])) {
1705
-        switch ((int)$exif['Orientation']) {
1705
+        switch ((int) $exif['Orientation']) {
1706 1706
             case 1:
1707 1707
                 // do nothing
1708 1708
                 break;
@@ -1779,7 +1779,7 @@  discard block
 block discarded – undo
1779 1779
         }
1780 1780
         
1781 1781
         if ($quality !== null) {
1782
-            $image->set_quality((int)$quality);
1782
+            $image->set_quality((int) $quality);
1783 1783
         }
1784 1784
         
1785 1785
        $result = $image->save($file_path);
@@ -1925,9 +1925,9 @@  discard block
 block discarded – undo
1925 1925
             $comments_echo .= "</span>\n";
1926 1926
 
1927 1927
             $comments_echo .= '<span class="geodir_reviewer_content">';
1928
-            if($comment->user_id){$comments_echo .= '<a href="'.get_author_posts_url( $comment->user_id ).'">';}
1928
+            if ($comment->user_id) {$comments_echo .= '<a href="' . get_author_posts_url($comment->user_id) . '">'; }
1929 1929
             $comments_echo .= '<span class="geodir_reviewer_author">' . $comment->comment_author . '</span> ';
1930
-            if($comment->user_id){$comments_echo .= '</a>';}
1930
+            if ($comment->user_id) {$comments_echo .= '</a>'; }
1931 1931
             $comments_echo .= '<span class="geodir_reviewer_reviewed">' . __('reviewed', 'geodirectory') . '</span> ';
1932 1932
             $comments_echo .= '<a href="' . $permalink . '" class="geodir_reviewer_title">' . $post_title . '</a>';
1933 1933
             $comments_echo .= geodir_get_rating_stars($comment->overall_rating, $comment_post_ID);
@@ -1958,7 +1958,7 @@  discard block
 block discarded – undo
1958 1958
     if (!empty($post_types)) {
1959 1959
         foreach ($post_types as $key => $post_type) {
1960 1960
             $cpt_name = __($post_type->labels->singular_name, 'geodirectory');
1961
-            $post_type_name =   sprintf(__('%s Categories', 'geodirectory'),$cpt_name);
1961
+            $post_type_name = sprintf(__('%s Categories', 'geodirectory'), $cpt_name);
1962 1962
             $taxonomies = geodir_get_taxonomies($key);
1963 1963
             $cat_taxonomy = !empty($taxonomies[0]) ? $taxonomies[0] : NULL;
1964 1964
             $cat_terms = $cat_taxonomy ? get_terms($cat_taxonomy) : NULL;
@@ -2065,10 +2065,10 @@  discard block
 block discarded – undo
2065 2065
             stWidget.addEntry({
2066 2066
                 "service": "sharethis",
2067 2067
                 "element": document.getElementById('st_sharethis'),
2068
-                "url": "<?php echo geodir_curPageURL();?>",
2069
-                "title": "<?php echo $post->post_title;?>",
2068
+                "url": "<?php echo geodir_curPageURL(); ?>",
2069
+                "title": "<?php echo $post->post_title; ?>",
2070 2070
                 "type": "chicklet",
2071
-                "text": "<?php _e( 'Share', 'geodirectory' );?>"
2071
+                "text": "<?php _e('Share', 'geodirectory'); ?>"
2072 2072
             });</script>
2073 2073
 
2074 2074
     </div>
Please login to merge, or discard this patch.
geodirectory-functions/map-functions/get_markers.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     $gd_post_type = sanitize_text_field($_REQUEST['post_type']);
11 11
     $post_taxonomy = geodir_get_taxonomies($gd_post_type);
12 12
     $map_canvas_name = sanitize_text_field($_REQUEST['map_canvas']);
13
-    $child_collapse = (bool)$_REQUEST['child_collapse'];
13
+    $child_collapse = (bool) $_REQUEST['child_collapse'];
14 14
     echo home_map_taxonomy_walker($post_taxonomy, 0, true, 0, $map_canvas_name, $child_collapse, true);
15 15
     die;
16 16
 }
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
     global $wpdb, $plugin_prefix, $gd_session;
31 31
 
32 32
     if ($_REQUEST['m_id'] != '') {
33
-        $pid = (int)$_REQUEST['m_id'];
33
+        $pid = (int) $_REQUEST['m_id'];
34 34
     } else {
35 35
         echo __('No marker data found', 'geodirectory');
36 36
         exit;
37 37
     }
38 38
 
39 39
     if (isset($_REQUEST['post_preview']) && $_REQUEST['post_preview'] != '' && $gd_ses_listing = $gd_session->get('listing')) {
40
-        $post = (object)$gd_ses_listing;
40
+        $post = (object) $gd_ses_listing;
41 41
         echo geodir_get_infowindow_html($post, $_REQUEST['post_preview']);
42 42
     } else {
43 43
         $geodir_post_type = get_post_type($pid);
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	 */
194 194
 	$groupby = apply_filters('geodir_home_map_listing_groupby', $groupby);
195 195
 
196
-    $catsql = $wpdb->prepare("$select $field_default_cat FROM " . $wpdb->posts . " as p" . $join . " WHERE p.ID = pd.post_id AND p.post_status = 'publish' " . $search . $gd_posttype . $groupby , $main_query_array);
196
+    $catsql = $wpdb->prepare("$select $field_default_cat FROM " . $wpdb->posts . " as p" . $join . " WHERE p.ID = pd.post_id AND p.post_status = 'publish' " . $search . $gd_posttype . $groupby, $main_query_array);
197 197
     
198 198
 	/**
199 199
 	 * Filter the SQL query to retrive markers data
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
                     $end_date = !empty($recurring_data['event_end']) && $recurring_data['event_end'] != '0000-00-00 00:00:00' ? $recurring_data['event_end'] : $start_date;
270 270
                 
271 271
                     if ($end_date != '' && strtotime($end_date) >= $today) {
272
-                        $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($start_date)) .' -> ' . date_i18n($geodir_date_format, strtotime($end_date));
272
+                        $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($start_date)) . ' -> ' . date_i18n($geodir_date_format, strtotime($end_date));
273 273
                     }
274 274
                 }
275 275
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
             $mark_extra = (isset($catinfo_obj->marker_extra)) ? $catinfo_obj->marker_extra : '';
285 285
             $title = str_replace($srcharr, $replarr, $post_title);
286 286
 
287
-            $content_data[] = '{"id":"' . $catinfo_obj->post_id . '","t": "' . $title . '","lt": "' . $catinfo_obj->post_latitude . '","ln": "' . $catinfo_obj->post_longitude . '","mk_id":"' . $catinfo_obj->post_id . '_' . $catinfo_obj->default_category . '","i":"' . $icon . '"'.$mark_extra.'}';
287
+            $content_data[] = '{"id":"' . $catinfo_obj->post_id . '","t": "' . $title . '","lt": "' . $catinfo_obj->post_latitude . '","ln": "' . $catinfo_obj->post_longitude . '","mk_id":"' . $catinfo_obj->post_id . '_' . $catinfo_obj->default_category . '","i":"' . $icon . '"' . $mark_extra . '}';
288 288
             $post_ids[] = $catinfo_obj->post_id;
289 289
         }
290 290
     }
Please login to merge, or discard this patch.