Test Failed
Push — master ( 36e298...f75221 )
by Stiofan
08:17
created
geodirectory-templates/listing-detail.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // We are submitting iframes etc so we turn this off to allow them to show on preview.
13
-if(geodir_is_page('preview')){
13
+if (geodir_is_page('preview')) {
14 14
     header("X-XSS-Protection: 0");
15 15
 }
16 16
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
  * @param string $itemtype The itemtype value of the HTML element.
64 64
  * @see 'geodir_article_close'
65 65
  */
66
-do_action('geodir_article_open', 'details-page', 'post-' . get_the_ID(), get_post_class(), '');
66
+do_action('geodir_article_open', 'details-page', 'post-'.get_the_ID(), get_post_class(), '');
67 67
 
68 68
 ###### MAIN CONTENT ######
69 69
 /** This action is documented in geodirectory-templates/geodir-home.php */
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      * @since 1.1.0
91 91
      */
92 92
     do_action('geodir_action_geodir_set_preview_post'); // set the $post to the preview values
93
-    if (defined( 'GD_TESTING_MODE' )) {
93
+    if (defined('GD_TESTING_MODE')) {
94 94
         global $post;
95 95
     }
96 96
     /** This action is documented in geodirectory-templates/listing-detail.php */
Please login to merge, or discard this patch.
geodirectory-functions/custom_functions.php 1 patch
Spacing   +123 added lines, -123 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
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                 $out .= $subex;
116 116
             }
117 117
         }
118
-        $out .= ' <a class="excerpt-read-more" href="' . get_permalink() . '" title="' . get_the_title() . '">';
118
+        $out .= ' <a class="excerpt-read-more" href="'.get_permalink().'" title="'.get_the_title().'">';
119 119
         /**
120 120
          * Filter excerpt read more text.
121 121
          *
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         if (mb_strlen($excerpt_more) > 0 && mb_strpos($excerpt, $excerpt_more) !== false) {
129 129
             $excut = -(mb_strlen($excerpt_more));
130 130
             $out .= mb_substr($excerpt, 0, $excut);
131
-            $out .= ' <a class="excerpt-read-more" href="' . get_permalink() . '" title="' . get_the_title() . '">';
131
+            $out .= ' <a class="excerpt-read-more" href="'.get_permalink().'" title="'.get_the_title().'">';
132 132
             /**
133 133
              * Filter excerpt read more text.
134 134
              *
@@ -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
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         $post_title = $productinfo->post_title;
239 239
     }
240 240
 
241
-    $post_title = '<a href="' . get_permalink($pid) . '">' . $post_title . '</a>';
241
+    $post_title = '<a href="'.get_permalink($pid).'">'.$post_title.'</a>';
242 242
 
243 243
     $user_info = get_userdata($author_id);
244 244
     $to_email = geodir_get_post_meta($pid, 'geodir_email', true);
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     do_action('geodir_after_send_enquiry', $request, 'Enquiry');
269 269
 
270 270
     $client_message = $frnd_comments;
271
-    $client_message .= '<br>' . __('From :', 'geodirectory') . ' ' . $yourname . '<br>' . __('Phone :', 'geodirectory') . ' ' . $inq_phone . '<br>' . __('Email :', 'geodirectory') . ' ' . $youremail . '<br><br>' . __('Sent from', 'geodirectory') . ' - <b><a href="' . trailingslashit(home_url()) . '">' . get_option('blogname') . '</a></b>.';
271
+    $client_message .= '<br>'.__('From :', 'geodirectory').' '.$yourname.'<br>'.__('Phone :', 'geodirectory').' '.$inq_phone.'<br>'.__('Email :', 'geodirectory').' '.$youremail.'<br><br>'.__('Sent from', 'geodirectory').' - <b><a href="'.trailingslashit(home_url()).'">'.get_option('blogname').'</a></b>.';
272 272
     /**
273 273
      * Filter client message text.
274 274
      *
@@ -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
     /**
@@ -320,9 +320,9 @@  discard block
 block discarded – undo
320 320
     do_action('geodir_after_send_enquiry_email', $request);
321 321
     $url = get_permalink($pid);
322 322
     if (strstr($url, '?')) {
323
-        $url = $url . "&send_inquiry=success";
323
+        $url = $url."&send_inquiry=success";
324 324
     } else {
325
-        $url = $url . "?send_inquiry=success";
325
+        $url = $url."?send_inquiry=success";
326 326
     }
327 327
     /**
328 328
      * Filter redirect url after the send enquiry email is sent.
@@ -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.
@@ -427,9 +427,9 @@  discard block
 block discarded – undo
427 427
 
428 428
     $url = get_permalink($pid);
429 429
     if (strstr($url, '?')) {
430
-        $url = $url . "&sendtofrnd=success";
430
+        $url = $url."&sendtofrnd=success";
431 431
     } else {
432
-        $url = $url . "?sendtofrnd=success";
432
+        $url = $url."?sendtofrnd=success";
433 433
     }
434 434
     /**
435 435
      * Filter redirect url after the send to friend email is sent.
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
              *
464 464
              * @since 1.0.0
465 465
              */
466
-            echo ' <div id="' . apply_filters('geodir_post_gallery_id', 'geodir-post-gallery') . '" class="clearfix" >';
466
+            echo ' <div id="'.apply_filters('geodir_post_gallery_id', 'geodir-post-gallery').'" class="clearfix" >';
467 467
             break;
468 468
         case 'reviews' :
469 469
             echo '<div id="reviews-wrap" class="clearfix"> ';
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
         if (!in_array($post_type, $all_postypes))
530 530
             return false;
531 531
 
532
-        $sort_field_info = $wpdb->get_var($wpdb->prepare("select default_order from " . GEODIR_CUSTOM_SORT_FIELDS_TABLE . " where	post_type= %s and is_active=%d and is_default=%d", array($post_type, 1, 1)));
532
+        $sort_field_info = $wpdb->get_var($wpdb->prepare("select default_order from ".GEODIR_CUSTOM_SORT_FIELDS_TABLE." where	post_type= %s and is_active=%d and is_default=%d", array($post_type, 1, 1)));
533 533
 
534 534
         if (!empty($sort_field_info))
535 535
             return $sort_field_info;
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
         if (!in_array($post_type, $all_postypes))
558 558
             return false;
559 559
 
560
-        $sort_field_info = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . GEODIR_CUSTOM_SORT_FIELDS_TABLE . " WHERE post_type=%s AND is_active=%d AND (sort_asc=1 || sort_desc=1 || field_type='random') AND field_type != 'address' ORDER BY sort_order ASC", array($post_type, 1)));
560
+        $sort_field_info = $wpdb->get_results($wpdb->prepare("SELECT * FROM ".GEODIR_CUSTOM_SORT_FIELDS_TABLE." WHERE post_type=%s AND is_active=%d AND (sort_asc=1 || sort_desc=1 || field_type='random') AND field_type != 'address' ORDER BY sort_order ASC", array($post_type, 1)));
561 561
         /**
562 562
          * Filter post sort options.
563 563
          *
@@ -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') {
@@ -619,21 +619,21 @@  discard block
 block discarded – undo
619 619
             }
620 620
 
621 621
             if ($sort->sort_asc) {
622
-                $key = $sort->htmlvar_name . '_asc';
622
+                $key = $sort->htmlvar_name.'_asc';
623 623
                 $label = $sort->site_title;
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) {
631
-                $key = $sort->htmlvar_name . '_desc';
631
+                $key = $sort->htmlvar_name.'_desc';
632 632
                 $label = $sort->site_title;
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
 
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
         $category = array();
732 732
 
733 733
         if (isset($_REQUEST['backandedit'])) {
734
-            $post = (object)$gd_session->get('listing');
734
+            $post = (object) $gd_session->get('listing');
735 735
             $post_type = $post->listing_type;
736 736
             if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')
737 737
                 $post_id = $_REQUEST['pid'];
@@ -746,13 +746,13 @@  discard block
 block discarded – undo
746 746
 
747 747
         if ($relate_to == 'category') {
748 748
 
749
-            $category_taxonomy = $post_type . $relate_to;
749
+            $category_taxonomy = $post_type.$relate_to;
750 750
             if (isset($post->{$category_taxonomy}) && $post->{$category_taxonomy} != '')
751 751
                 $category = explode(',', trim($post->{$category_taxonomy}, ','));
752 752
 
753 753
         } elseif ($relate_to == 'tags') {
754 754
 
755
-            $category_taxonomy = $post_type . '_' . $relate_to;
755
+            $category_taxonomy = $post_type.'_'.$relate_to;
756 756
             if ($post->post_tags != '')
757 757
                 $category = explode(',', trim($post->post_tags, ','));
758 758
             $tax_field = 'name';
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
             if ($add_location_filter != '0') {
809 809
                 $geodir_add_location_url = '1';
810 810
             }
811
-            $viewall_url = get_term_link((int)$category[0], $post_type . $category_taxonomy);
811
+            $viewall_url = get_term_link((int) $category[0], $post_type.$category_taxonomy);
812 812
             $geodir_add_location_url = NULL;
813 813
         }
814 814
         ob_start();
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
                 $after_title = isset($after_title) ? $after_title : apply_filters('geodir_after_title', '</h3>');
826 826
                 ?>
827 827
                 <div class="location_list_heading clearfix">
828
-                    <?php echo $before_title . $title . $after_title; ?>
828
+                    <?php echo $before_title.$title.$after_title; ?>
829 829
                 </div>
830 830
             <?php
831 831
             }
@@ -913,8 +913,8 @@  discard block
 block discarded – undo
913 913
         $geodir_post_category_str = serialize($geodir_post_category_str);
914 914
     }
915 915
 
916
-    $all_var['post_category_array'] = html_entity_decode((string)$geodir_post_category_str, ENT_QUOTES, 'UTF-8');
917
-    $script = "var post_category_array = " . json_encode($all_var) . ';';
916
+    $all_var['post_category_array'] = html_entity_decode((string) $geodir_post_category_str, ENT_QUOTES, 'UTF-8');
917
+    $script = "var post_category_array = ".json_encode($all_var).';';
918 918
     echo '<script>';
919 919
     echo $script;
920 920
     echo '</script>';
@@ -1035,9 +1035,9 @@  discard block
 block discarded – undo
1035 1035
         }
1036 1036
     } elseif ((is_category() || is_tag()) && isset($current_term->taxonomy) && in_array($current_term->taxonomy, $geodir_taxonomies)) {
1037 1037
         if (is_category()) {
1038
-            $meta_desc .= __("Posts related to Category:", 'geodirectory') . " " . ucfirst(single_cat_title("", FALSE));
1038
+            $meta_desc .= __("Posts related to Category:", 'geodirectory')." ".ucfirst(single_cat_title("", FALSE));
1039 1039
         } elseif (is_tag()) {
1040
-            $meta_desc .= __("Posts related to Tag:", 'geodirectory') . " " . ucfirst(single_tag_title("", FALSE));
1040
+            $meta_desc .= __("Posts related to Tag:", 'geodirectory')." ".ucfirst(single_tag_title("", FALSE));
1041 1041
         }
1042 1042
     } elseif (isset($current_term->taxonomy) && in_array($current_term->taxonomy, $geodir_taxonomies)) {
1043 1043
         $meta_desc .= isset($current_term->description) ? $current_term->description : '';
@@ -1064,8 +1064,8 @@  discard block
 block discarded – undo
1064 1064
     $replace_location = __('Everywhere', 'geodirectory');
1065 1065
     $location_id = NULL;
1066 1066
     if ($geodir_location_manager) {
1067
-        $sql = $wpdb->prepare("SELECT location_id FROM " . POST_LOCATION_TABLE . " WHERE city_slug=%s ORDER BY location_id ASC LIMIT 1", array($gd_city));
1068
-        $location_id = (int)$wpdb->get_var($sql);
1067
+        $sql = $wpdb->prepare("SELECT location_id FROM ".POST_LOCATION_TABLE." WHERE city_slug=%s ORDER BY location_id ASC LIMIT 1", array($gd_city));
1068
+        $location_id = (int) $wpdb->get_var($sql);
1069 1069
         $location_type = geodir_what_is_current_location();
1070 1070
         if ($location_type == 'city') {
1071 1071
             $replace_location = geodir_get_current_location(array('what' => 'city', 'echo' => false));
@@ -1106,65 +1106,65 @@  discard block
 block discarded – undo
1106 1106
                     $category_id = $category->term_id;
1107 1107
                     $category_desc = trim($category->description) != '' ? trim($category->description) : get_tax_meta($category_id, 'ct_cat_top_desc', false, $geodir_post_type);
1108 1108
                     if ($location_id) {
1109
-                        $option_name = 'geodir_cat_loc_' . $geodir_post_type . '_' . $category_id;
1109
+                        $option_name = 'geodir_cat_loc_'.$geodir_post_type.'_'.$category_id;
1110 1110
                         $cat_loc_option = get_option($option_name);
1111 1111
 
1112 1112
                         $gd_cat_loc_default = !empty($cat_loc_option) && isset($cat_loc_option['gd_cat_loc_default']) && $cat_loc_option['gd_cat_loc_default'] > 0 ? true : false;
1113 1113
                         if (!$gd_cat_loc_default) {
1114
-                            $option_name = 'geodir_cat_loc_' . $geodir_post_type . '_' . $category_id . '_' . $location_id;
1114
+                            $option_name = 'geodir_cat_loc_'.$geodir_post_type.'_'.$category_id.'_'.$location_id;
1115 1115
                             $option = get_option($option_name);
1116 1116
                             $category_desc = isset($option['gd_cat_loc_desc']) && trim($option['gd_cat_loc_desc']) != '' ? trim($option['gd_cat_loc_desc']) : $category_desc;
1117 1117
                         }
1118 1118
                     }
1119
-                    $geodir_meta_desc = __("Posts related to Category:", 'geodirectory') . " " . ucfirst(single_cat_title("", FALSE)) . '. ' . $category_desc;
1119
+                    $geodir_meta_desc = __("Posts related to Category:", 'geodirectory')." ".ucfirst(single_cat_title("", FALSE)).'. '.$category_desc;
1120 1120
                 }
1121 1121
             } else if ($geodir_is_tag) {
1122
-                $geodir_meta_desc = __("Posts related to Tag:", 'geodirectory') . " " . ucfirst(single_tag_title("", FALSE)) . '. ' . $geodir_meta_desc;
1122
+                $geodir_meta_desc = __("Posts related to Tag:", 'geodirectory')." ".ucfirst(single_tag_title("", FALSE)).'. '.$geodir_meta_desc;
1123 1123
             }
1124 1124
         }
1125 1125
     }
1126 1126
 
1127 1127
 
1128 1128
     $gd_page = '';
1129
-    if(geodir_is_page('home')){
1129
+    if (geodir_is_page('home')) {
1130 1130
         $gd_page = 'home';
1131 1131
         $meta_desc = (get_option('geodir_meta_desc_homepage')) ? get_option('geodir_meta_desc_homepage') : $meta_desc;
1132 1132
     }
1133
-    elseif(geodir_is_page('detail')){
1133
+    elseif (geodir_is_page('detail')) {
1134 1134
         $gd_page = 'detail';
1135 1135
         $meta_desc = (get_option('geodir_meta_desc_detail')) ? get_option('geodir_meta_desc_detail') : $meta_desc;
1136 1136
     }
1137
-    elseif(geodir_is_page('pt')){
1137
+    elseif (geodir_is_page('pt')) {
1138 1138
         $gd_page = 'pt';
1139 1139
         $meta_desc = (get_option('geodir_meta_desc_pt')) ? get_option('geodir_meta_desc_pt') : $meta_desc;
1140 1140
     }
1141
-    elseif(geodir_is_page('listing')){
1141
+    elseif (geodir_is_page('listing')) {
1142 1142
         $gd_page = 'listing';
1143 1143
         $meta_desc = (get_option('geodir_meta_desc_listing')) ? get_option('geodir_meta_desc_listing') : $meta_desc;
1144 1144
     }
1145
-    elseif(geodir_is_page('location')){
1145
+    elseif (geodir_is_page('location')) {
1146 1146
         $gd_page = 'location';
1147 1147
         $meta_desc = (get_option('geodir_meta_desc_location')) ? get_option('geodir_meta_desc_location') : $meta_desc;
1148 1148
         $meta_desc = apply_filters('geodir_seo_meta_location_description', $meta_desc);
1149 1149
 
1150 1150
     }
1151
-    elseif(geodir_is_page('search')){
1151
+    elseif (geodir_is_page('search')) {
1152 1152
         $gd_page = 'search';
1153 1153
         $meta_desc = (get_option('geodir_meta_desc_search')) ? get_option('geodir_meta_desc_search') : $meta_desc;
1154 1154
     }
1155
-    elseif(geodir_is_page('add-listing')){
1155
+    elseif (geodir_is_page('add-listing')) {
1156 1156
         $gd_page = 'add-listing';
1157 1157
         $meta_desc = (get_option('geodir_meta_desc_add-listing')) ? get_option('geodir_meta_desc_add-listing') : $meta_desc;
1158 1158
     }
1159
-    elseif(geodir_is_page('author')){
1159
+    elseif (geodir_is_page('author')) {
1160 1160
         $gd_page = 'author';
1161 1161
         $meta_desc = (get_option('geodir_meta_desc_author')) ? get_option('geodir_meta_desc_author') : $meta_desc;
1162 1162
     }
1163
-    elseif(geodir_is_page('login')){
1163
+    elseif (geodir_is_page('login')) {
1164 1164
         $gd_page = 'login';
1165 1165
         $meta_desc = (get_option('geodir_meta_desc_login')) ? get_option('geodir_meta_desc_login') : $meta_desc;
1166 1166
     }
1167
-    elseif(geodir_is_page('listing-success')){
1167
+    elseif (geodir_is_page('listing-success')) {
1168 1168
         $gd_page = 'listing-success';
1169 1169
         $meta_desc = (get_option('geodir_meta_desc_listing-success')) ? get_option('geodir_meta_desc_listing-success') : $meta_desc;
1170 1170
     }
@@ -1192,7 +1192,7 @@  discard block
 block discarded – undo
1192 1192
          * @param string $title The page description including variables.
1193 1193
          * @param string $gd_page The GeoDirectory page type if any.
1194 1194
          */
1195
-        $meta_desc = apply_filters('geodir_seo_meta_description_pre', __($meta_desc, 'geodirectory'),$gd_page,'');
1195
+        $meta_desc = apply_filters('geodir_seo_meta_description_pre', __($meta_desc, 'geodirectory'), $gd_page, '');
1196 1196
 
1197 1197
         /**
1198 1198
          * Filter SEO meta description.
@@ -1200,20 +1200,20 @@  discard block
 block discarded – undo
1200 1200
          * @since 1.0.0
1201 1201
          * @param string $meta_desc Meta description content.
1202 1202
          */
1203
-        echo apply_filters('geodir_seo_meta_description', '<meta name="description" content="' . $meta_desc . '" />', $meta_desc);
1203
+        echo apply_filters('geodir_seo_meta_description', '<meta name="description" content="'.$meta_desc.'" />', $meta_desc);
1204 1204
     }
1205 1205
 
1206 1206
     // meta keywords
1207 1207
     if (isset($post->post_type) && in_array($post->post_type, $all_postypes)) {
1208
-        $place_tags = wp_get_post_terms($post->ID, $post->post_type . '_tags', array("fields" => "names"));
1209
-        $place_cats = wp_get_post_terms($post->ID, $post->post_type . 'category', array("fields" => "names"));
1208
+        $place_tags = wp_get_post_terms($post->ID, $post->post_type.'_tags', array("fields" => "names"));
1209
+        $place_cats = wp_get_post_terms($post->ID, $post->post_type.'category', array("fields" => "names"));
1210 1210
 
1211
-        $meta_key .= implode(", ", array_merge((array)$place_cats, (array)$place_tags));
1211
+        $meta_key .= implode(", ", array_merge((array) $place_cats, (array) $place_tags));
1212 1212
     } else {
1213 1213
         $posttags = get_the_tags();
1214 1214
         if ($posttags) {
1215 1215
             foreach ($posttags as $tag) {
1216
-                $meta_key .= $tag->name . ' ';
1216
+                $meta_key .= $tag->name.' ';
1217 1217
             }
1218 1218
         } else {
1219 1219
             $tags = get_tags(array('orderby' => 'count', 'order' => 'DESC'));
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
 
1222 1222
             foreach ($tags as $tag) {
1223 1223
                 if ($xt <= 20) {
1224
-                    $meta_key .= $tag->name . ", ";
1224
+                    $meta_key .= $tag->name.", ";
1225 1225
                 }
1226 1226
 
1227 1227
                 $xt++;
@@ -1230,7 +1230,7 @@  discard block
 block discarded – undo
1230 1230
     }
1231 1231
 
1232 1232
     $meta_key = $meta_key != '' ? rtrim(trim($meta_key), ",") : $meta_key;
1233
-    $geodir_meta_keys = $geodir_meta_keys != '' ? ($meta_key != '' ? $meta_key . ', ' . $geodir_meta_keys : $geodir_meta_keys) : $meta_key;
1233
+    $geodir_meta_keys = $geodir_meta_keys != '' ? ($meta_key != '' ? $meta_key.', '.$geodir_meta_keys : $geodir_meta_keys) : $meta_key;
1234 1234
     if ($geodir_meta_keys != '') {
1235 1235
         $geodir_meta_keys = strip_tags($geodir_meta_keys);
1236 1236
         $geodir_meta_keys = esc_html($geodir_meta_keys);
@@ -1249,7 +1249,7 @@  discard block
 block discarded – undo
1249 1249
          * @since 1.0.0
1250 1250
          * @param string $meta_desc Meta keywords.
1251 1251
          */
1252
-        echo apply_filters('geodir_seo_meta_keywords', '<meta name="keywords" content="' . $meta_key . '" />', $meta_key);
1252
+        echo apply_filters('geodir_seo_meta_keywords', '<meta name="keywords" content="'.$meta_key.'" />', $meta_key);
1253 1253
     }
1254 1254
 
1255 1255
 }
@@ -1394,8 +1394,8 @@  discard block
 block discarded – undo
1394 1394
 {
1395 1395
     global $post, $post_images, $video, $special_offers, $related_listing, $geodir_post_detail_fields;
1396 1396
 
1397
-    $post_id = !empty($post) && isset($post->ID) ? (int)$post->ID : 0;
1398
-    $request_post_id = !empty($_REQUEST['p']) ? (int)$_REQUEST['p'] : 0;
1397
+    $post_id = !empty($post) && isset($post->ID) ? (int) $post->ID : 0;
1398
+    $request_post_id = !empty($_REQUEST['p']) ? (int) $_REQUEST['p'] : 0;
1399 1399
     $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
1400 1400
 
1401 1401
     if ($is_backend_preview && !$post_id > 0 && $request_post_id > 0) {
@@ -1415,7 +1415,7 @@  discard block
 block discarded – undo
1415 1415
 
1416 1416
 
1417 1417
         $excluded_tabs = get_option('geodir_detail_page_tabs_excluded');
1418
-        if(!$excluded_tabs){$excluded_tabs = array();}
1418
+        if (!$excluded_tabs) {$excluded_tabs = array(); }
1419 1419
 
1420 1420
         $related_listing = '';
1421 1421
         if (in_array($post->post_type, $related_listing_array) && !in_array('related_listing', $excluded_tabs)) {
@@ -1439,7 +1439,7 @@  discard block
 block discarded – undo
1439 1439
         if (!empty($post_images)) {
1440 1440
             foreach ($post_images as $image) {
1441 1441
                 $caption = (!empty($image->caption)) ? $image->caption : '';
1442
-                $thumb_image .= '<a href="' . $image->src . '" title="'.$caption.'">';
1442
+                $thumb_image .= '<a href="'.$image->src.'" title="'.$caption.'">';
1443 1443
                 $thumb_image .= geodir_show_image($image, 'thumbnail', true, false);
1444 1444
                 $thumb_image .= '</a>';
1445 1445
             }
@@ -1450,7 +1450,7 @@  discard block
 block discarded – undo
1450 1450
         $map_args['width'] = '600';
1451 1451
         $map_args['height'] = '300';
1452 1452
         if ($post->post_mapzoom) {
1453
-            $map_args['zoom'] = '' . $post->post_mapzoom . '';
1453
+            $map_args['zoom'] = ''.$post->post_mapzoom.'';
1454 1454
         }
1455 1455
         $map_args['autozoom'] = false;
1456 1456
         $map_args['child_collapse'] = '0';
@@ -1476,7 +1476,7 @@  discard block
 block discarded – undo
1476 1476
         if (!empty($post_images)) {
1477 1477
             foreach ($post_images as $image) {
1478 1478
                 if ($image != '') {
1479
-                    $thumb_image .= '<a href="' . $image . '">';
1479
+                    $thumb_image .= '<a href="'.$image.'">';
1480 1480
                     $thumb_image .= geodir_show_image(array('src' => $image), 'thumbnail', true, false);
1481 1481
                     $thumb_image .= '</a>';
1482 1482
                 }
@@ -1518,13 +1518,13 @@  discard block
 block discarded – undo
1518 1518
         $map_args['map_class_name'] = 'geodir-map-preview-page';
1519 1519
     }
1520 1520
 
1521
-    $arr_detail_page_tabs = geodir_detail_page_tabs_list();// get this sooner so we can get the active tab for the user
1521
+    $arr_detail_page_tabs = geodir_detail_page_tabs_list(); // get this sooner so we can get the active tab for the user
1522 1522
 
1523 1523
     $active_tab = '';
1524 1524
     $active_tab_name = '';
1525 1525
     $default_tab = '';
1526 1526
     $default_tab_name = '';
1527
-    foreach($arr_detail_page_tabs as $tab_index => $tabs){
1527
+    foreach ($arr_detail_page_tabs as $tab_index => $tabs) {
1528 1528
         if (isset($tabs['is_active_tab']) && $tabs['is_active_tab'] && !empty($tabs['is_display']) && isset($tabs['heading_text']) && $tabs['heading_text']) {
1529 1529
             $active_tab = $tab_index;
1530 1530
             $active_tab_name = __($tabs['heading_text'], 'geodirectory');
@@ -1545,10 +1545,10 @@  discard block
 block discarded – undo
1545 1545
         $active_tab = $default_tab;
1546 1546
         $active_tab_name = $default_tab_name;
1547 1547
     }
1548
-    $tab_list = (get_option('geodir_disable_tabs',false)) ? true : false;
1548
+    $tab_list = (get_option('geodir_disable_tabs', false)) ? true : false;
1549 1549
     ?>
1550 1550
     <div class="geodir-tabs" id="gd-tabs" style="position:relative;">
1551
-        <?php if(!$tab_list){ ?>
1551
+        <?php if (!$tab_list) { ?>
1552 1552
         <div id="geodir-tab-mobile-menu">
1553 1553
             <i class="fa fa-bars"></i>
1554 1554
             <span class="geodir-mobile-active-tab"><?php echo $active_tab_name; ?></span>
@@ -1569,10 +1569,10 @@  discard block
 block discarded – undo
1569 1569
             foreach ($arr_detail_page_tabs as $tab_index => $detail_page_tab) {
1570 1570
                 if ($detail_page_tab['is_display']) {
1571 1571
 
1572
-                    if(!$tab_list) {
1572
+                    if (!$tab_list) {
1573 1573
                         ?>
1574 1574
                         <dt></dt> <!-- added to comply with validation -->
1575
-                        <dd <?php if ($detail_page_tab['is_active_tab']){ ?>class="geodir-tab-active"<?php } ?> ><a
1575
+                        <dd <?php if ($detail_page_tab['is_active_tab']) { ?>class="geodir-tab-active"<?php } ?> ><a
1576 1576
                                 data-tab="#<?php echo $tab_index; ?>"
1577 1577
                                 data-status="enable"><?php _e($detail_page_tab['heading_text'], 'geodirectory'); ?></a>
1578 1578
                         </dd>
@@ -1580,9 +1580,9 @@  discard block
 block discarded – undo
1580 1580
                     }
1581 1581
                     ob_start() // start tab content buffering
1582 1582
                     ?>
1583
-                    <li id="<?php echo $tab_index;?>Tab">
1584
-                        <?php if($tab_list){
1585
-                            $tab_title = '<span class="gd-tab-list-title" ><a href="#'.$tab_index.'">'.__($detail_page_tab['heading_text'],'geodirectory').'</a></span><hr />';
1583
+                    <li id="<?php echo $tab_index; ?>Tab">
1584
+                        <?php if ($tab_list) {
1585
+                            $tab_title = '<span class="gd-tab-list-title" ><a href="#'.$tab_index.'">'.__($detail_page_tab['heading_text'], 'geodirectory').'</a></span><hr />';
1586 1586
                             /**
1587 1587
                              * Filter the tab list title html.
1588 1588
                              *
@@ -1591,9 +1591,9 @@  discard block
 block discarded – undo
1591 1591
                              * @param string $tab_index The tab index type.
1592 1592
                              * @param array $detail_page_tab The array of values including title text.
1593 1593
                              */
1594
-                            echo apply_filters('geodir_tab_list_title',$tab_title ,$tab_index ,$detail_page_tab);
1594
+                            echo apply_filters('geodir_tab_list_title', $tab_title, $tab_index, $detail_page_tab);
1595 1595
                         }?>
1596
-                        <div id="<?php echo $tab_index;?>" class="hash-offset"></div>
1596
+                        <div id="<?php echo $tab_index; ?>" class="hash-offset"></div>
1597 1597
                         <?php
1598 1598
                         /**
1599 1599
                          * Called before the details tab content is output per tab.
@@ -1611,7 +1611,7 @@  discard block
 block discarded – undo
1611 1611
                          * @since 1.0.0
1612 1612
                          * @todo do we need this if we have the hook above? 'geodir_before_tab_content'
1613 1613
                          */
1614
-                        do_action('geodir_before_' . $tab_index . '_tab_content');
1614
+                        do_action('geodir_before_'.$tab_index.'_tab_content');
1615 1615
                         /// write a code to generate content of each tab
1616 1616
                         switch ($tab_index) {
1617 1617
                             case 'post_profile':
@@ -1643,7 +1643,7 @@  discard block
 block discarded – undo
1643 1643
                                 break;
1644 1644
                             case 'post_video':
1645 1645
                                 /** This action is documented in geodirectory_template_actions.php */
1646
-                                echo apply_filters('the_content', stripslashes($video));// we apply the_content filter so oembed works also;
1646
+                                echo apply_filters('the_content', stripslashes($video)); // we apply the_content filter so oembed works also;
1647 1647
                                 break;
1648 1648
                             case 'special_offers':
1649 1649
                                 echo apply_filters('gd_special_offers_content', wpautop(stripslashes($special_offers)));
@@ -1681,7 +1681,7 @@  discard block
 block discarded – undo
1681 1681
                          * @since 1.0.0
1682 1682
                          * @todo do we need this if we have the hook above? 'geodir_after_tab_content'
1683 1683
                          */
1684
-                        do_action('geodir_after_' . $tab_index . '_tab_content');
1684
+                        do_action('geodir_after_'.$tab_index.'_tab_content');
1685 1685
                         ?> </li>
1686 1686
                     <?php
1687 1687
                     /**
@@ -1689,7 +1689,7 @@  discard block
 block discarded – undo
1689 1689
                      *
1690 1690
                      * @since 1.0.0
1691 1691
                      */
1692
-                    $arr_detail_page_tabs[$tab_index]['tab_content'] = apply_filters("geodir_modify_" . $detail_page_tab['tab_content'] . "_tab_content", ob_get_clean());
1692
+                    $arr_detail_page_tabs[$tab_index]['tab_content'] = apply_filters("geodir_modify_".$detail_page_tab['tab_content']."_tab_content", ob_get_clean());
1693 1693
                 } // end of if for is_display
1694 1694
             }// end of foreach
1695 1695
 
@@ -1701,8 +1701,8 @@  discard block
 block discarded – undo
1701 1701
              */
1702 1702
             do_action('geodir_after_tab_list');
1703 1703
             ?>
1704
-            <?php if(!$tab_list){?></dl><?php }?>
1705
-        <ul class="geodir-tabs-content entry-content <?php if($tab_list){?>geodir-tabs-list<?php }?>" style="position:relative;">
1704
+            <?php if (!$tab_list) {?></dl><?php }?>
1705
+        <ul class="geodir-tabs-content entry-content <?php if ($tab_list) {?>geodir-tabs-list<?php }?>" style="position:relative;">
1706 1706
             <?php
1707 1707
             foreach ($arr_detail_page_tabs as $detail_page_tab) {
1708 1708
                 if ($detail_page_tab['is_display'] && !empty($detail_page_tab['tab_content'])) {
@@ -1719,7 +1719,7 @@  discard block
 block discarded – undo
1719 1719
         </ul>
1720 1720
         <!--gd-tabs-content ul end-->
1721 1721
     </div>
1722
-    <?php if(!$tab_list){ ?>
1722
+    <?php if (!$tab_list) { ?>
1723 1723
     <script>
1724 1724
         if (window.location.hash && window.location.hash.indexOf('&') === -1 && jQuery(window.location.hash + 'Tab').length) {
1725 1725
             hashVal = window.location.hash;
@@ -1774,7 +1774,7 @@  discard block
 block discarded – undo
1774 1774
     if ($mime_type == 'image/jpeg' && function_exists('exif_read_data')) {
1775 1775
         try {
1776 1776
             $exif = exif_read_data($file_path);
1777
-        } catch(Exception $e) {
1777
+        } catch (Exception $e) {
1778 1778
             $exif = array();
1779 1779
         }
1780 1780
     }
@@ -1784,7 +1784,7 @@  discard block
 block discarded – undo
1784 1784
     $modify = false;
1785 1785
     $orientation = 0;
1786 1786
     if (!empty($exif) && isset($exif['Orientation'])) {
1787
-        switch ((int)$exif['Orientation']) {
1787
+        switch ((int) $exif['Orientation']) {
1788 1788
             case 1:
1789 1789
                 // do nothing
1790 1790
                 break;
@@ -1860,7 +1860,7 @@  discard block
 block discarded – undo
1860 1860
         }
1861 1861
         
1862 1862
         if ($quality !== null) {
1863
-            $image->set_quality((int)$quality);
1863
+            $image->set_quality((int) $quality);
1864 1864
         }
1865 1865
         
1866 1866
        $result = $image->save($file_path);
@@ -1932,7 +1932,7 @@  discard block
 block discarded – undo
1932 1932
 
1933 1933
         $comment_content = preg_replace('#(\\[img\\]).+(\\[\\/img\\])#', '', $comment_content);
1934 1934
 
1935
-        $permalink = get_permalink($comment->ID) . "#comment-" . $comment->comment_ID;
1935
+        $permalink = get_permalink($comment->ID)."#comment-".$comment->comment_ID;
1936 1936
         $comment_author_email = $comment->comment_author_email;
1937 1937
         $comment_post_ID = $comment->post_id;
1938 1938
 
@@ -1947,12 +1947,12 @@  discard block
 block discarded – undo
1947 1947
 
1948 1948
         $post_title = get_the_title($comment_post_ID);
1949 1949
         $permalink = get_permalink($comment_post_ID);
1950
-        $comment_permalink = $permalink . "#comment-" . $comment->comment_ID;
1951
-        $read_more = '<a class="comment_excerpt" href="' . $comment_permalink . '">' . __('Read more', 'geodirectory') . '</a>';
1950
+        $comment_permalink = $permalink."#comment-".$comment->comment_ID;
1951
+        $read_more = '<a class="comment_excerpt" href="'.$comment_permalink.'">'.__('Read more', 'geodirectory').'</a>';
1952 1952
 
1953 1953
         $comment_content_length = strlen($comment_content);
1954 1954
         if ($comment_content_length > $comment_lenth) {
1955
-            $comment_excerpt = mb_substr($comment_content, 0, $comment_lenth) . '... ' . $read_more;
1955
+            $comment_excerpt = mb_substr($comment_content, 0, $comment_lenth).'... '.$read_more;
1956 1956
         } else {
1957 1957
             $comment_excerpt = $comment_content;
1958 1958
         }
@@ -1965,37 +1965,37 @@  discard block
 block discarded – undo
1965 1965
 
1966 1966
         if ($comment_id && $na) {
1967 1967
             $comments_echo .= '<li class="clearfix">';
1968
-            $comments_echo .= "<span class=\"li" . $comment_id . " geodir_reviewer_image\">";
1968
+            $comments_echo .= "<span class=\"li".$comment_id." geodir_reviewer_image\">";
1969 1969
             if (function_exists('get_avatar')) {
1970 1970
                 if (!isset($comment->comment_type)) {
1971 1971
                     if ($user_profile_url) {
1972
-                        $comments_echo .= '<a href="' . $user_profile_url . '">';
1972
+                        $comments_echo .= '<a href="'.$user_profile_url.'">';
1973 1973
                     }
1974
-                    $comments_echo .= get_avatar($comment->comment_author_email, $g_size, geodir_plugin_url() . '/geodirectory-assets/images/gravatar2.png');
1974
+                    $comments_echo .= get_avatar($comment->comment_author_email, $g_size, geodir_plugin_url().'/geodirectory-assets/images/gravatar2.png');
1975 1975
                     if ($user_profile_url) {
1976 1976
                         $comments_echo .= '</a>';
1977 1977
                     }
1978 1978
                 } elseif ((isset($comment->comment_type) && $comment->comment_type == 'trackback') || (isset($comment->comment_type) && $comment->comment_type == 'pingback')) {
1979 1979
                     if ($user_profile_url) {
1980
-                        $comments_echo .= '<a href="' . $user_profile_url . '">';
1980
+                        $comments_echo .= '<a href="'.$user_profile_url.'">';
1981 1981
                     }
1982
-                    $comments_echo .= get_avatar($comment->comment_author_url, $g_size, geodir_plugin_url() . '/geodirectory-assets/images/gravatar2.png');
1982
+                    $comments_echo .= get_avatar($comment->comment_author_url, $g_size, geodir_plugin_url().'/geodirectory-assets/images/gravatar2.png');
1983 1983
                 }
1984 1984
             } elseif (function_exists('gravatar')) {
1985 1985
                 if ($user_profile_url) {
1986
-                    $comments_echo .= '<a href="' . $user_profile_url . '">';
1986
+                    $comments_echo .= '<a href="'.$user_profile_url.'">';
1987 1987
                 }
1988 1988
                 $comments_echo .= "<img src=\"";
1989 1989
                 if ('' == $comment->comment_type) {
1990
-                    $comments_echo .= gravatar($comment->comment_author_email, $g_size, geodir_plugin_url() . '/geodirectory-assets/images/gravatar2.png');
1990
+                    $comments_echo .= gravatar($comment->comment_author_email, $g_size, geodir_plugin_url().'/geodirectory-assets/images/gravatar2.png');
1991 1991
                     if ($user_profile_url) {
1992 1992
                         $comments_echo .= '</a>';
1993 1993
                     }
1994 1994
                 } elseif (('trackback' == $comment->comment_type) || ('pingback' == $comment->comment_type)) {
1995 1995
                     if ($user_profile_url) {
1996
-                        $comments_echo .= '<a href="' . $user_profile_url . '">';
1996
+                        $comments_echo .= '<a href="'.$user_profile_url.'">';
1997 1997
                     }
1998
-                    $comments_echo .= gravatar($comment->comment_author_url, $g_size, geodir_plugin_url() . '/geodirectory-assets/images/gravatar2.png');
1998
+                    $comments_echo .= gravatar($comment->comment_author_url, $g_size, geodir_plugin_url().'/geodirectory-assets/images/gravatar2.png');
1999 1999
                     if ($user_profile_url) {
2000 2000
                         $comments_echo .= '</a>';
2001 2001
                     }
@@ -2006,13 +2006,13 @@  discard block
 block discarded – undo
2006 2006
             $comments_echo .= "</span>\n";
2007 2007
 
2008 2008
             $comments_echo .= '<span class="geodir_reviewer_content">';
2009
-            if($comment->user_id){$comments_echo .= '<a href="'.get_author_posts_url( $comment->user_id ).'">';}
2010
-            $comments_echo .= '<span class="geodir_reviewer_author">' . $comment->comment_author . '</span> ';
2011
-            if($comment->user_id){$comments_echo .= '</a>';}
2012
-            $comments_echo .= '<span class="geodir_reviewer_reviewed">' . __('reviewed', 'geodirectory') . '</span> ';
2013
-            $comments_echo .= '<a href="' . $permalink . '" class="geodir_reviewer_title">' . $post_title . '</a>';
2009
+            if ($comment->user_id) {$comments_echo .= '<a href="'.get_author_posts_url($comment->user_id).'">'; }
2010
+            $comments_echo .= '<span class="geodir_reviewer_author">'.$comment->comment_author.'</span> ';
2011
+            if ($comment->user_id) {$comments_echo .= '</a>'; }
2012
+            $comments_echo .= '<span class="geodir_reviewer_reviewed">'.__('reviewed', 'geodirectory').'</span> ';
2013
+            $comments_echo .= '<a href="'.$permalink.'" class="geodir_reviewer_title">'.$post_title.'</a>';
2014 2014
             $comments_echo .= geodir_get_rating_stars($comment->overall_rating, $comment_post_ID);
2015
-            $comments_echo .= '<p class="geodir_reviewer_text">' . $comment_excerpt . '';
2015
+            $comments_echo .= '<p class="geodir_reviewer_text">'.$comment_excerpt.'';
2016 2016
             //echo preg_replace('#(\\[img\\]).+(\\[\\/img\\])#', '', $comment_excerpt);
2017 2017
             $comments_echo .= '</p>';
2018 2018
 
@@ -2039,19 +2039,19 @@  discard block
 block discarded – undo
2039 2039
     if (!empty($post_types)) {
2040 2040
         foreach ($post_types as $key => $post_type) {
2041 2041
             $cpt_name = __($post_type->labels->singular_name, 'geodirectory');
2042
-            $post_type_name =   sprintf(__('%s Categories', 'geodirectory'),$cpt_name);
2042
+            $post_type_name = sprintf(__('%s Categories', 'geodirectory'), $cpt_name);
2043 2043
             $taxonomies = geodir_get_taxonomies($key);
2044 2044
             $cat_taxonomy = !empty($taxonomies[0]) ? $taxonomies[0] : NULL;
2045 2045
             $cat_terms = $cat_taxonomy ? get_terms($cat_taxonomy) : NULL;
2046 2046
 
2047 2047
             if (!empty($cat_terms)) {
2048
-                $return['optgroup_start-' . $key] = $post_type_name;
2048
+                $return['optgroup_start-'.$key] = $post_type_name;
2049 2049
 
2050 2050
                 foreach ($cat_terms as $cat_term) {
2051
-                    $return[$key . '_' . $cat_term->term_id] = $cat_term->name;
2051
+                    $return[$key.'_'.$cat_term->term_id] = $cat_term->name;
2052 2052
                 }
2053 2053
 
2054
-                $return['optgroup_end-' . $key] = $post_type_name;
2054
+                $return['optgroup_end-'.$key] = $post_type_name;
2055 2055
             }
2056 2056
         }
2057 2057
     }
@@ -2143,10 +2143,10 @@  discard block
 block discarded – undo
2143 2143
             stWidget.addEntry({
2144 2144
                 "service": "sharethis",
2145 2145
                 "element": document.getElementById('st_sharethis'),
2146
-                "url": "<?php echo geodir_curPageURL();?>",
2147
-                "title": "<?php echo $post->post_title;?>",
2146
+                "url": "<?php echo geodir_curPageURL(); ?>",
2147
+                "title": "<?php echo $post->post_title; ?>",
2148 2148
                 "type": "chicklet",
2149
-                "text": "<?php _e( 'Share', 'geodirectory' );?>"
2149
+                "text": "<?php _e('Share', 'geodirectory'); ?>"
2150 2150
             });
2151 2151
         </script>
2152 2152
     </div>
@@ -2154,7 +2154,7 @@  discard block
 block discarded – undo
2154 2154
 }
2155 2155
 
2156 2156
 function geodir_listing_bounce_map_pin_on_hover() {
2157
-    if(get_option('geodir_listing_hover_bounce_map_pin',true)) {
2157
+    if (get_option('geodir_listing_hover_bounce_map_pin', true)) {
2158 2158
         ?>
2159 2159
         <script>
2160 2160
             jQuery(function ($) {
@@ -2174,15 +2174,15 @@  discard block
 block discarded – undo
2174 2174
         <?php
2175 2175
     }
2176 2176
 }
2177
-add_action('geodir_after_listing_listview','geodir_listing_bounce_map_pin_on_hover',10);
2177
+add_action('geodir_after_listing_listview', 'geodir_listing_bounce_map_pin_on_hover', 10);
2178 2178
 
2179
-add_action('geodir_after_favorite_html','geodir_output_favourite_html_listings',1,1);
2180
-function geodir_output_favourite_html_listings( $post_id){
2179
+add_action('geodir_after_favorite_html', 'geodir_output_favourite_html_listings', 1, 1);
2180
+function geodir_output_favourite_html_listings($post_id) {
2181 2181
     geodir_favourite_html('', $post_id);
2182 2182
 }
2183 2183
 
2184
-add_action( 'geodir_listing_after_pinpoint', 'geodir_output_pinpoint_html_listings', 1, 2);
2185
-function geodir_output_pinpoint_html_listings( $post_id, $post){
2184
+add_action('geodir_listing_after_pinpoint', 'geodir_output_pinpoint_html_listings', 1, 2);
2185
+function geodir_output_pinpoint_html_listings($post_id, $post) {
2186 2186
     global $wp_query;
2187 2187
 
2188 2188
     $show_pin_point = $wp_query->is_main_query();
Please login to merge, or discard this patch.