Test Failed
Push — master ( 01cd99...42481c )
by Stiofan
19:58
created
geodirectory_template_actions.php 1 patch
Spacing   +184 added lines, -184 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
     //php
285 285
     if (!empty($tc['geodir_theme_compat_code'])) {
286
-        include_once('geodirectory-functions/compatibility/' . $tc['geodir_theme_compat_code'] . '.php');
286
+        include_once('geodirectory-functions/compatibility/'.$tc['geodir_theme_compat_code'].'.php');
287 287
     }
288 288
 
289 289
     //geodir_full_page_class
@@ -453,13 +453,13 @@  discard block
 block discarded – undo
453 453
 function geodir_action_wrapper_content_open($type = '', $id = '', $class = '')
454 454
 {
455 455
     if ($type == 'home-page' && $width = get_option('geodir_width_home_contant_section')) {
456
-        $width_css = 'style="width:' . $width . '%;"';
456
+        $width_css = 'style="width:'.$width.'%;"';
457 457
     } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_contant_section')) {
458
-        $width_css = 'style="width:' . $width . '%;"';
458
+        $width_css = 'style="width:'.$width.'%;"';
459 459
     } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_contant_section')) {
460
-        $width_css = 'style="width:' . $width . '%;"';
460
+        $width_css = 'style="width:'.$width.'%;"';
461 461
     } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_contant_section')) {
462
-        $width_css = 'style="width:' . $width . '%;"';
462
+        $width_css = 'style="width:'.$width.'%;"';
463 463
     } else {
464 464
         $width_css = '';
465 465
     }
@@ -573,13 +573,13 @@  discard block
 block discarded – undo
573 573
 function geodir_action_sidebar_right_open($type = '', $id = '', $class = '', $itemtype = '')
574 574
 {
575 575
     if ($type == 'home-page' && $width = get_option('geodir_width_home_right_section')) {
576
-        $width_css = 'style="width:' . $width . '%;"';
576
+        $width_css = 'style="width:'.$width.'%;"';
577 577
     } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_right_section')) {
578
-        $width_css = 'style="width:' . $width . '%;"';
578
+        $width_css = 'style="width:'.$width.'%;"';
579 579
     } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_right_section')) {
580
-        $width_css = 'style="width:' . $width . '%;"';
580
+        $width_css = 'style="width:'.$width.'%;"';
581 581
     } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_right_section')) {
582
-        $width_css = 'style="width:' . $width . '%;"';
582
+        $width_css = 'style="width:'.$width.'%;"';
583 583
     } else {
584 584
         $width_css = '';
585 585
     }
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
         }
678 678
     }
679 679
 
680
-    $post = (object)$_REQUEST;
680
+    $post = (object) $_REQUEST;
681 681
 
682 682
 
683 683
     if (isset($post->video)) {
@@ -736,10 +736,10 @@  discard block
 block discarded – undo
736 736
 
737 737
     $json = '{';
738 738
     $json .= '"post_preview": "1",';
739
-    $json .= '"t": "' . $json_title . '",';
740
-    $json .= '"lt": "' . $post_latitude . '",';
741
-    $json .= '"ln": "' . $post_longitude . '",';
742
-    $json .= '"i":"' . $term_icon . '"';
739
+    $json .= '"t": "'.$json_title.'",';
740
+    $json .= '"lt": "'.$post_latitude.'",';
741
+    $json .= '"ln": "'.$post_longitude.'",';
742
+    $json .= '"i":"'.$term_icon.'"';
743 743
     $json .= '}';
744 744
 
745 745
     $post->marker_json = $json;
@@ -966,7 +966,7 @@  discard block
 block discarded – undo
966 966
      * @param string $class The class to use. Default is 'entry-header'.
967 967
      */
968 968
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
969
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' . stripslashes(get_the_title()) . '</h1></header>';
969
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.stripslashes(get_the_title()).'</h1></header>';
970 970
 }
971 971
 
972 972
 
@@ -1020,7 +1020,7 @@  discard block
 block discarded – undo
1020 1020
                     $height = !empty($sizes) && isset($sizes[1]) ? $sizes[1] : 0;
1021 1021
 
1022 1022
                     if ($image && $width && $height) {
1023
-                        $image = (object)array('src' => $image, 'width' => $width, 'height' => $height);
1023
+                        $image = (object) array('src' => $image, 'width' => $width, 'height' => $height);
1024 1024
                     }
1025 1025
 
1026 1026
                     if (isset($image->src)) {
@@ -1032,9 +1032,9 @@  discard block
 block discarded – undo
1032 1032
 
1033 1033
                         $image_title = isset($image->title) ? $image->title : '';
1034 1034
 
1035
-                        $main_slides .= '<li><img src="' . geodir_plugin_url() . "/geodirectory-assets/images/spacer.gif" . '" alt="' . $image_title . '" title="' . $image_title . '" style="max-height:' . $spacer_height . 'px;margin:0 auto;" />';
1036
-                        $main_slides .= '<img src="' . $image->src . '" alt="' . $image_title . '" title="' . $image_title . '" style="max-height:400px;margin:0 auto;" /></li>';
1037
-                        $nav_slides .= '<li><img src="' . $image->src . '" alt="' . $image_title . '" title="' . $image_title . '" style="max-height:48px;margin:0 auto;" /></li>';
1035
+                        $main_slides .= '<li><img src="'.geodir_plugin_url()."/geodirectory-assets/images/spacer.gif".'" alt="'.$image_title.'" title="'.$image_title.'" style="max-height:'.$spacer_height.'px;margin:0 auto;" />';
1036
+                        $main_slides .= '<img src="'.$image->src.'" alt="'.$image_title.'" title="'.$image_title.'" style="max-height:400px;margin:0 auto;" /></li>';
1037
+                        $nav_slides .= '<li><img src="'.$image->src.'" alt="'.$image_title.'" title="'.$image_title.'" style="max-height:48px;margin:0 auto;" /></li>';
1038 1038
                         $slides++;
1039 1039
                     }
1040 1040
                 }
@@ -1060,10 +1060,10 @@  discard block
 block discarded – undo
1060 1060
                 } else {
1061 1061
                     $spacer_height = ((400 - $image->height) / 2);
1062 1062
                 }
1063
-                $caption = '';//(!empty($image->caption)) ? '<p class="flex-caption">'.$image->caption.'</p>' : '';
1064
-                $main_slides .= '<li><img src="' . geodir_plugin_url() . "/geodirectory-assets/images/spacer.gif" . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:' . $spacer_height . 'px;margin:0 auto;" />';
1065
-                $main_slides .= '<img src="' . $image->src . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:400px;margin:0 auto;" />'.$caption.'</li>';
1066
-                $nav_slides .= '<li><img src="' . $image->src . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:48px;margin:0 auto;" /></li>';
1063
+                $caption = ''; //(!empty($image->caption)) ? '<p class="flex-caption">'.$image->caption.'</p>' : '';
1064
+                $main_slides .= '<li><img src="'.geodir_plugin_url()."/geodirectory-assets/images/spacer.gif".'" alt="'.$image->title.'" title="'.$image->title.'" style="max-height:'.$spacer_height.'px;margin:0 auto;" />';
1065
+                $main_slides .= '<img src="'.$image->src.'" alt="'.$image->title.'" title="'.$image->title.'" style="max-height:400px;margin:0 auto;" />'.$caption.'</li>';
1066
+                $nav_slides .= '<li><img src="'.$image->src.'" alt="'.$image->title.'" title="'.$image->title.'" style="max-height:48px;margin:0 auto;" /></li>';
1067 1067
                 $slides++;
1068 1068
             }
1069 1069
         }// endfore
@@ -1098,7 +1098,7 @@  discard block
 block discarded – undo
1098 1098
  */
1099 1099
 function geodir_action_details_taxonomies()
1100 1100
 {
1101
-    global $preview, $post;?>
1101
+    global $preview, $post; ?>
1102 1102
     <p class="geodir_post_taxomomies clearfix">
1103 1103
     <?php
1104 1104
     $taxonomies = array();
@@ -1107,11 +1107,11 @@  discard block
 block discarded – undo
1107 1107
 
1108 1108
     if ($preview && !$is_backend_preview) {
1109 1109
         $post_type = $post->listing_type;
1110
-        $post_taxonomy = $post_type . 'category';
1110
+        $post_taxonomy = $post_type.'category';
1111 1111
         $post->{$post_taxonomy} = $post->post_category[$post_taxonomy];
1112 1112
     } else {
1113 1113
         $post_type = $post->post_type;
1114
-        $post_taxonomy = $post_type . 'category';
1114
+        $post_taxonomy = $post_type.'category';
1115 1115
     }
1116 1116
 //{	
1117 1117
     $post_type_info = get_post_type_object($post_type);
@@ -1119,7 +1119,7 @@  discard block
 block discarded – undo
1119 1119
 
1120 1120
     if (!empty($post->post_tags)) {
1121 1121
 
1122
-        if (taxonomy_exists($post_type . '_tags')):
1122
+        if (taxonomy_exists($post_type.'_tags')):
1123 1123
             $links = array();
1124 1124
             $terms = array();
1125 1125
             // to limit post tags
@@ -1146,8 +1146,8 @@  discard block
 block discarded – undo
1146 1146
                 $post_term = trim($post_term);
1147 1147
 
1148 1148
                 $priority_location = false;
1149
-                if ($insert_term = term_exists($post_term, $post_type . '_tags')) {
1150
-                    $term = get_term_by('id', $insert_term['term_id'], $post_type . '_tags');
1149
+                if ($insert_term = term_exists($post_term, $post_type.'_tags')) {
1150
+                    $term = get_term_by('id', $insert_term['term_id'], $post_type.'_tags');
1151 1151
                 } else {
1152 1152
                     $post_country = isset($_REQUEST['post_country']) && $_REQUEST['post_country'] != '' ? sanitize_text_field($_REQUEST['post_country']) : NULL;
1153 1153
                     $post_region = isset($_REQUEST['post_region']) && $_REQUEST['post_region'] != '' ? sanitize_text_field($_REQUEST['post_region']) : NULL;
@@ -1157,10 +1157,10 @@  discard block
 block discarded – undo
1157 1157
                     $match_city = $post_city && sanitize_title($post_term) == sanitize_title($post_city) ? true : false;
1158 1158
                     if ($match_country || $match_region || $match_city) {
1159 1159
                         $priority_location = true;
1160
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1160
+                        $term = get_term_by('name', $post_term, $post_type.'_tags');
1161 1161
                     } else {
1162
-                        $insert_term = wp_insert_term($post_term, $post_type . '_tags');
1163
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1162
+                        $insert_term = wp_insert_term($post_term, $post_type.'_tags');
1163
+                        $term = get_term_by('name', $post_term, $post_type.'_tags');
1164 1164
                     }
1165 1165
                 }
1166 1166
 
@@ -1177,12 +1177,12 @@  discard block
 block discarded – undo
1177 1177
                          * @param string $tag_link The tag link html.
1178 1178
                          * @param object $term The tag term object.
1179 1179
                          */
1180
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1180
+                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
1181 1181
                         $links[] = $tag_link;
1182 1182
                     } else {
1183
-                        $tag_link = "<a href='" . esc_attr(get_term_link($term->term_id, $term->taxonomy)) . "'>$term->name</a>";
1183
+                        $tag_link = "<a href='".esc_attr(get_term_link($term->term_id, $term->taxonomy))."'>$term->name</a>";
1184 1184
                         /** This action is documented in geodirectory-template_actions.php */
1185
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1185
+                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
1186 1186
                         $links[] = $tag_link;
1187 1187
                     }
1188 1188
                     $terms[] = $term;
@@ -1192,7 +1192,7 @@  discard block
 block discarded – undo
1192 1192
             if (!isset($listing_label)) {
1193 1193
                 $listing_label = '';
1194 1194
             }
1195
-            $taxonomies[$post_type . '_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1195
+            $taxonomies[$post_type.'_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
1196 1196
         endif;
1197 1197
 
1198 1198
     }
@@ -1220,7 +1220,7 @@  discard block
 block discarded – undo
1220 1220
                     $term = get_term_by('id', $post_term, $post_taxonomy);
1221 1221
 
1222 1222
                     if (is_object($term)) {
1223
-                        $term_link = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>$term->name</a>";
1223
+                        $term_link = "<a href='".esc_attr(get_term_link($term, $post_taxonomy))."'>$term->name</a>";
1224 1224
                         /**
1225 1225
                          * Filter the category name on the details page.
1226 1226
                          *
@@ -1228,7 +1228,7 @@  discard block
 block discarded – undo
1228 1228
                          * @param string $term_link The link html to the category.
1229 1229
                          * @param object $term The category term object.
1230 1230
                          */
1231
-                        $term_link = apply_filters('geodir_details_taxonomies_cat_link',$term_link,$term);
1231
+                        $term_link = apply_filters('geodir_details_taxonomies_cat_link', $term_link, $term);
1232 1232
                         $links[] = $term_link;
1233 1233
                         $terms[] = $term;
1234 1234
                     }
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
         if (!isset($listing_label)) {
1247 1247
             $listing_label = '';
1248 1248
         }
1249
-        $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1249
+        $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
1250 1250
 
1251 1251
     }
1252 1252
 
@@ -1259,14 +1259,14 @@  discard block
 block discarded – undo
1259 1259
      * @param string $listing_label The post type label.
1260 1260
      * @param string $listing_label The post type label with ucwords function.
1261 1261
      */
1262
-    $taxonomies = apply_filters('geodir_details_taxonomies_output',$taxonomies,$post_type,$listing_label,geodir_ucwords($listing_label));
1262
+    $taxonomies = apply_filters('geodir_details_taxonomies_output', $taxonomies, $post_type, $listing_label, geodir_ucwords($listing_label));
1263 1263
 
1264 1264
     if (isset($taxonomies[$post_taxonomy])) {
1265
-        echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
1265
+        echo '<span class="geodir-category">'.$taxonomies[$post_taxonomy].'</span>';
1266 1266
     }
1267 1267
 
1268
-    if (isset($taxonomies[$post_type . '_tags']))
1269
-        echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
1268
+    if (isset($taxonomies[$post_type.'_tags']))
1269
+        echo '<span class="geodir-tags">'.$taxonomies[$post_type.'_tags'].'</span>';
1270 1270
 
1271 1271
     ?>
1272 1272
     </p><?php
@@ -1287,11 +1287,11 @@  discard block
 block discarded – undo
1287 1287
  * @param object $post Optional. The post object or blank.
1288 1288
  * @package GeoDirectory
1289 1289
  */
1290
-function geodir_action_details_micordata($post='')
1290
+function geodir_action_details_micordata($post = '')
1291 1291
 {
1292 1292
 
1293 1293
     global $preview;
1294
-    if(empty($post)){global $post;}
1294
+    if (empty($post)) {global $post; }
1295 1295
     if ($preview || !geodir_is_page('detail')) {
1296 1296
         return;
1297 1297
     }
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
     } else {
1307 1307
         foreach ($post_reviews as $review) {
1308 1308
 
1309
-            if($rating_value = geodir_get_commentoverall($review->comment_ID)){
1309
+            if ($rating_value = geodir_get_commentoverall($review->comment_ID)) {
1310 1310
                 $reviews[] = array(
1311 1311
                     "@type" => "Review",
1312 1312
                     "author" => $review->comment_author,
@@ -1314,7 +1314,7 @@  discard block
 block discarded – undo
1314 1314
                     "description" => $review->comment_content,
1315 1315
                     "reviewRating" => array(
1316 1316
                         "@type" => "Rating",
1317
-                        "bestRating" => "5",// @todo this will need to be filtered for review manager if user changes the score.
1317
+                        "bestRating" => "5", // @todo this will need to be filtered for review manager if user changes the score.
1318 1318
                         "ratingValue" => $rating_value,
1319 1319
                         "worstRating" => "1"
1320 1320
                     )
@@ -1344,13 +1344,13 @@  discard block
 block discarded – undo
1344 1344
     }
1345 1345
     //print_r($post);
1346 1346
     // external links
1347
-    $external_links =  array();
1347
+    $external_links = array();
1348 1348
     $external_links[] = $post->geodir_website;
1349 1349
     $external_links[] = $post->geodir_twitter;
1350 1350
     $external_links[] = $post->geodir_facebook;
1351 1351
     $external_links = array_filter($external_links);
1352 1352
 
1353
-    if(!empty($external_links)){
1353
+    if (!empty($external_links)) {
1354 1354
         $external_links = array_values($external_links);
1355 1355
     }
1356 1356
 
@@ -1360,17 +1360,17 @@  discard block
 block discarded – undo
1360 1360
 
1361 1361
     // schema type
1362 1362
     $schema_type = 'LocalBusiness';
1363
-    if(isset($post->default_category) && $post->default_category){
1363
+    if (isset($post->default_category) && $post->default_category) {
1364 1364
         $cat_schema = geodir_get_tax_meta($post->default_category, 'ct_cat_schema', false, $post->post_type);
1365
-        if($cat_schema){$schema_type = $cat_schema;}
1366
-        if(!$cat_schema && $schema_type=='LocalBusiness' && $post->post_type=='gd_event'){$schema_type = 'Event';}
1365
+        if ($cat_schema) {$schema_type = $cat_schema; }
1366
+        if (!$cat_schema && $schema_type == 'LocalBusiness' && $post->post_type == 'gd_event') {$schema_type = 'Event'; }
1367 1367
     }
1368 1368
 
1369 1369
     $schema = array();
1370 1370
     $schema['@context'] = "https://schema.org";
1371 1371
     $schema['@type'] = $schema_type;
1372 1372
     $schema['name'] = $post->post_title;
1373
-    $schema['description'] = wp_strip_all_tags( $post->post_content, true );
1373
+    $schema['description'] = wp_strip_all_tags($post->post_content, true);
1374 1374
     $schema['telephone'] = $post->geodir_contact;
1375 1375
     $schema['url'] = $c_url;
1376 1376
     $schema['sameAs'] = $external_links;
@@ -1384,7 +1384,7 @@  discard block
 block discarded – undo
1384 1384
         "postalCode" => $post->post_zip
1385 1385
     );
1386 1386
 
1387
-    if($post->post_latitude && $post->post_longitude) {
1387
+    if ($post->post_latitude && $post->post_longitude) {
1388 1388
         $schema['geo'] = array(
1389 1389
             "@type" => "GeoCoordinates",
1390 1390
             "latitude" => $post->post_latitude,
@@ -1392,7 +1392,7 @@  discard block
 block discarded – undo
1392 1392
         );
1393 1393
     }
1394 1394
 
1395
-    if($post_avgratings) {
1395
+    if ($post_avgratings) {
1396 1396
         $schema['aggregateRating'] = array(
1397 1397
             "@type" => "AggregateRating",
1398 1398
             "ratingValue" => $post_avgratings,
@@ -1411,10 +1411,10 @@  discard block
 block discarded – undo
1411 1411
      * @param array $schema The array of schema data to be filtered.
1412 1412
      * @param object $post The post object.
1413 1413
      */
1414
-    $schema = apply_filters('geodir_details_schema', $schema,$post);
1414
+    $schema = apply_filters('geodir_details_schema', $schema, $post);
1415 1415
 
1416 1416
 
1417
-    echo '<script type="application/ld+json">' . json_encode($schema) . '</script>';
1417
+    echo '<script type="application/ld+json">'.json_encode($schema).'</script>';
1418 1418
 
1419 1419
 
1420 1420
     $uploads = wp_upload_dir();
@@ -1427,7 +1427,7 @@  discard block
 block discarded – undo
1427 1427
      * @param string $facebook_og The open graph html to be filtered.
1428 1428
      * @param object $post The post object.
1429 1429
      */
1430
-    echo apply_filters('geodir_details_facebook_og', $facebook_og,$post);
1430
+    echo apply_filters('geodir_details_facebook_og', $facebook_og, $post);
1431 1431
 
1432 1432
 
1433 1433
 
@@ -1450,9 +1450,9 @@  discard block
 block discarded – undo
1450 1450
     ?>
1451 1451
     <div class="geodir-pos_navigation clearfix">
1452 1452
     <div
1453
-        class="geodir-post_left"><?php previous_post_link('%link', '' . __('Previous', 'geodirectory'), false) ?></div>
1453
+        class="geodir-post_left"><?php previous_post_link('%link', ''.__('Previous', 'geodirectory'), false) ?></div>
1454 1454
     <div
1455
-        class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory') . '', false) ?></div>
1455
+        class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory').'', false) ?></div>
1456 1456
     </div><?php
1457 1457
 }
1458 1458
 
@@ -1521,12 +1521,12 @@  discard block
 block discarded – undo
1521 1521
     $gd_post_type = geodir_get_current_posttype();
1522 1522
     $post_type_info = get_post_type_object($gd_post_type);
1523 1523
 
1524
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
1524
+    $add_string_in_title = __('All', 'geodirectory').' ';
1525 1525
     if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1526
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
1526
+        $add_string_in_title = __('My Favorite', 'geodirectory').' ';
1527 1527
     }
1528 1528
 
1529
-    $list_title = $add_string_in_title . __($post_type_info->labels->name, 'geodirectory');
1529
+    $list_title = $add_string_in_title.__($post_type_info->labels->name, 'geodirectory');
1530 1530
     $single_name = $post_type_info->labels->singular_name;
1531 1531
 
1532 1532
     $taxonomy = geodir_get_taxonomies($gd_post_type, true);
@@ -1554,12 +1554,12 @@  discard block
 block discarded – undo
1554 1554
         $current_term = get_term_by('slug', $term, $taxonomy[0]);
1555 1555
         if (!empty($current_term)) {
1556 1556
             $current_term_name = __(geodir_utf8_ucfirst($current_term->name), 'geodirectory');
1557
-            if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1557
+            if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
1558 1558
                 $location_last_char = substr($location_name, -1);
1559 1559
                 $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1560
-                $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1560
+                $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
1561 1561
             } else {
1562
-                $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1562
+                $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
1563 1563
             }
1564 1564
         } else {
1565 1565
             if (count($taxonomy) > 1) {
@@ -1567,12 +1567,12 @@  discard block
 block discarded – undo
1567 1567
 
1568 1568
                 if (!empty($current_term)) {
1569 1569
                     $current_term_name = __(geodir_utf8_ucfirst($current_term->name), 'geodirectory');
1570
-                    if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1570
+                    if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
1571 1571
                         $location_last_char = substr($location_name, -1);
1572 1572
                         $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1573
-                        $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1573
+                        $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
1574 1574
                     } else {
1575
-                        $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1575
+                        $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
1576 1576
                     }
1577 1577
                 }
1578 1578
             }
@@ -1600,7 +1600,7 @@  discard block
 block discarded – undo
1600 1600
                 $gd_city = __(geodir_ucwords($gd_city), 'geodirectory');
1601 1601
             }
1602 1602
 
1603
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_city . "'";
1603
+            $list_title .= __(' in', 'geodirectory')." '".$gd_city."'";
1604 1604
         } else if ($gd_region != '') {
1605 1605
             if ($gd_region_actual != '') {
1606 1606
                 $gd_region = $gd_region_actual;
@@ -1610,7 +1610,7 @@  discard block
 block discarded – undo
1610 1610
                 $gd_region = __(geodir_ucwords($gd_region), 'geodirectory');
1611 1611
             }
1612 1612
 
1613
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_region . "'";
1613
+            $list_title .= __(' in', 'geodirectory')." '".$gd_region."'";
1614 1614
         } else if ($gd_country != '') {
1615 1615
             if ($gd_country_actual != '') {
1616 1616
                 $gd_country = $gd_country_actual;
@@ -1620,12 +1620,12 @@  discard block
 block discarded – undo
1620 1620
                 $gd_country = __(geodir_ucwords($gd_country), 'geodirectory');
1621 1621
             }
1622 1622
 
1623
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_country . "'";
1623
+            $list_title .= __(' in', 'geodirectory')." '".$gd_country."'";
1624 1624
         }
1625 1625
     }
1626 1626
 
1627 1627
     if (is_search()) {
1628
-        $list_title = __('Search', 'geodirectory') . ' ' . __(geodir_utf8_ucfirst($post_type_info->labels->name), 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
1628
+        $list_title = __('Search', 'geodirectory').' '.__(geodir_utf8_ucfirst($post_type_info->labels->name), 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
1629 1629
     }
1630 1630
     /** This action is documented in geodirectory_template_actions.php */
1631 1631
     $class = apply_filters('geodir_page_title_class', 'entry-title fn');
@@ -1635,26 +1635,26 @@  discard block
 block discarded – undo
1635 1635
 
1636 1636
     $title = $list_title;
1637 1637
     $gd_page = '';
1638
-    if(geodir_is_page('pt')){
1638
+    if (geodir_is_page('pt')) {
1639 1639
         $gd_page = 'pt';
1640
-        $title  = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1640
+        $title = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1641 1641
     }
1642
-    elseif(geodir_is_page('listing')){
1642
+    elseif (geodir_is_page('listing')) {
1643 1643
         $gd_page = 'listing';
1644 1644
         global $wp_query;
1645 1645
         $current_term = $wp_query->get_queried_object();
1646
-        if (strpos($current_term->taxonomy,'_tags') !== false) {
1646
+        if (strpos($current_term->taxonomy, '_tags') !== false) {
1647 1647
             $title = (get_option('geodir_page_title_tag-listing')) ? get_option('geodir_page_title_tag-listing') : $title;
1648
-        }else{
1648
+        } else {
1649 1649
             $title = (get_option('geodir_page_title_cat-listing')) ? get_option('geodir_page_title_cat-listing') : $title;
1650 1650
         }
1651 1651
 
1652 1652
     }
1653
-    elseif(geodir_is_page('author')){
1653
+    elseif (geodir_is_page('author')) {
1654 1654
         $gd_page = 'author';
1655
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
1655
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1656 1656
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
1657
-        }else{
1657
+        } else {
1658 1658
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
1659 1659
         }
1660 1660
 
@@ -1668,16 +1668,16 @@  discard block
 block discarded – undo
1668 1668
      * @param string $title The page title including variables.
1669 1669
      * @param string $gd_page The GeoDirectory page type if any.
1670 1670
      */
1671
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1671
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1672 1672
 
1673
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
1673
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
1674 1674
         /**
1675 1675
          * Filter the listing page title.
1676 1676
          *
1677 1677
          * @since 1.0.0
1678 1678
          * @param string $list_title The title for the category page.
1679 1679
          */
1680
-        apply_filters('geodir_listing_page_title', $title) . '</h1></header>';
1680
+        apply_filters('geodir_listing_page_title', $title).'</h1></header>';
1681 1681
 }
1682 1682
 
1683 1683
 add_action('geodir_listings_page_description', 'geodir_action_listings_description', 10);
@@ -1696,16 +1696,16 @@  discard block
 block discarded – undo
1696 1696
     $gd_post_type = geodir_get_current_posttype();
1697 1697
     if (isset($current_term->term_id) && $current_term->term_id != '') {
1698 1698
 
1699
-        $term_desc = term_description($current_term->term_id, $gd_post_type . '_tags');
1699
+        $term_desc = term_description($current_term->term_id, $gd_post_type.'_tags');
1700 1700
         $saved_data = stripslashes(geodir_get_tax_meta($current_term->term_id, 'ct_cat_top_desc', false, $gd_post_type));
1701 1701
         if ($term_desc && !$saved_data) {
1702 1702
             $saved_data = $term_desc;
1703 1703
         }
1704 1704
 
1705 1705
         // stop payment manager filtering content length
1706
-        $filter_priority = has_filter( 'the_content', 'geodir_payments_the_content' );
1707
-        if ( false !== $filter_priority ) {
1708
-            remove_filter( 'the_content', 'geodir_payments_the_content', $filter_priority );
1706
+        $filter_priority = has_filter('the_content', 'geodir_payments_the_content');
1707
+        if (false !== $filter_priority) {
1708
+            remove_filter('the_content', 'geodir_payments_the_content', $filter_priority);
1709 1709
         }
1710 1710
 
1711 1711
         /**
@@ -1719,14 +1719,14 @@  discard block
 block discarded – undo
1719 1719
         $cat_description = apply_filters('the_content', $saved_data);
1720 1720
 
1721 1721
 
1722
-        if ( false !== $filter_priority ) {
1723
-            add_filter( 'the_content', 'geodir_payments_the_content', $filter_priority );
1722
+        if (false !== $filter_priority) {
1723
+            add_filter('the_content', 'geodir_payments_the_content', $filter_priority);
1724 1724
         }
1725 1725
 
1726 1726
         if ($cat_description) {
1727 1727
             ?>
1728 1728
 
1729
-            <div class="term_description"><?php echo $cat_description;?></div> <?php
1729
+            <div class="term_description"><?php echo $cat_description; ?></div> <?php
1730 1730
         }
1731 1731
 
1732 1732
     }
@@ -1776,13 +1776,13 @@  discard block
 block discarded – undo
1776 1776
 function geodir_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '')
1777 1777
 {
1778 1778
     if ($type == 'home-page' && $width = get_option('geodir_width_home_left_section')) {
1779
-        $width_css = 'style="width:' . $width . '%;"';
1779
+        $width_css = 'style="width:'.$width.'%;"';
1780 1780
     } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_left_section')) {
1781
-        $width_css = 'style="width:' . $width . '%;"';
1781
+        $width_css = 'style="width:'.$width.'%;"';
1782 1782
     } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_left_section')) {
1783
-        $width_css = 'style="width:' . $width . '%;"';
1783
+        $width_css = 'style="width:'.$width.'%;"';
1784 1784
     } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_left_section')) {
1785
-        $width_css = 'style="width:' . $width . '%;"';
1785
+        $width_css = 'style="width:'.$width.'%;"';
1786 1786
     } else {
1787 1787
         $width_css = '';
1788 1788
     }
@@ -2087,11 +2087,11 @@  discard block
 block discarded – undo
2087 2087
 
2088 2088
     $title = apply_filters('geodir_add_listing_page_title_text', get_the_title());
2089 2089
 
2090
-    if(geodir_is_page('add-listing')){
2090
+    if (geodir_is_page('add-listing')) {
2091 2091
         $gd_page = 'add-listing';
2092
-        if(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){
2092
+        if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2093 2093
             $title = (get_option('geodir_page_title_edit-listing')) ? get_option('geodir_page_title_edit-listing') : $title;
2094
-        }elseif(isset($listing_type)){
2094
+        }elseif (isset($listing_type)) {
2095 2095
             $title = (get_option('geodir_page_title_add-listing')) ? get_option('geodir_page_title_add-listing') : $title;
2096 2096
         }
2097 2097
 
@@ -2105,9 +2105,9 @@  discard block
 block discarded – undo
2105 2105
      * @param string $title The page title including variables.
2106 2106
      * @param string $gd_page The GeoDirectory page type if any.
2107 2107
      */
2108
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2108
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2109 2109
 
2110
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">';
2110
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">';
2111 2111
     echo $title;
2112 2112
     echo '</h1></header>';
2113 2113
 }
@@ -2121,7 +2121,7 @@  discard block
 block discarded – undo
2121 2121
  */
2122 2122
 function geodir_action_add_listing_page_mandatory()
2123 2123
 {?>
2124
-    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT;?></p>
2124
+    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT; ?></p>
2125 2125
 <?php
2126 2126
 }
2127 2127
 
@@ -2156,7 +2156,7 @@  discard block
 block discarded – undo
2156 2156
 
2157 2157
     if (isset($_REQUEST['backandedit'])) {
2158 2158
         global $post;
2159
-        $post = (object)$gd_session->get('listing');
2159
+        $post = (object) $gd_session->get('listing');
2160 2160
         $listing_type = $post->listing_type;
2161 2161
         $title = $post->post_title;
2162 2162
         $desc = $post->post_desc;
@@ -2171,7 +2171,7 @@  discard block
 block discarded – undo
2171 2171
         $thumb_img_arr = geodir_get_images($post->ID);
2172 2172
         if ($thumb_img_arr) {
2173 2173
             foreach ($thumb_img_arr as $post_img) {
2174
-                $curImages .= $post_img->src . ',';
2174
+                $curImages .= $post_img->src.',';
2175 2175
             }
2176 2176
         }
2177 2177
 
@@ -2179,7 +2179,7 @@  discard block
 block discarded – undo
2179 2179
         $title = $post->post_title;
2180 2180
         $desc = $post->post_content;
2181 2181
         $kw_tags = $post->post_tags;
2182
-        $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type . '_tags', array('fields' => 'names')));
2182
+        $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type.'_tags', array('fields' => 'names')));
2183 2183
     } else {
2184 2184
         $listing_type = sanitize_text_field($_REQUEST['listing_type']);
2185 2185
     }
@@ -2190,20 +2190,20 @@  discard block
 block discarded – undo
2190 2190
 
2191 2191
     $post_type_info = geodir_get_posttype_info($listing_type);
2192 2192
 
2193
-    $cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? __($post_type_info['labels']['singular_name'], 'geodirectory') : __('Listing','geodirectory');
2193
+    $cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? __($post_type_info['labels']['singular_name'], 'geodirectory') : __('Listing', 'geodirectory');
2194 2194
     
2195 2195
     $package_info = array();
2196 2196
     $package_info = geodir_post_package_info($package_info, $post);
2197 2197
     ?>
2198
-    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id());?>" method="post" enctype="multipart/form-data">
2199
-        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type);?>"/>
2200
-        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type);?>"/>
2198
+    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id()); ?>" method="post" enctype="multipart/form-data">
2199
+        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2200
+        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2201 2201
         <?php if ($page_id) { ?>
2202
-        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id;?>"/>
2202
+        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id; ?>"/>
2203 2203
         <?php } if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { ?>
2204
-            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']);?>"/>
2204
+            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']); ?>"/>
2205 2205
         <?php } if (isset($_REQUEST['backandedit'])) { ?>
2206
-            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']);?>"/>
2206
+            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']); ?>"/>
2207 2207
         <?php
2208 2208
         } 
2209 2209
         /**
@@ -2215,7 +2215,7 @@  discard block
 block discarded – undo
2215 2215
          */
2216 2216
         do_action('geodir_before_detail_fields');
2217 2217
         ?>
2218
-        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT;?></h5>
2218
+        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT; ?></h5>
2219 2219
         <?php
2220 2220
         /**
2221 2221
          * Called at the top of the add listing page form for frontend.
@@ -2236,10 +2236,10 @@  discard block
 block discarded – undo
2236 2236
                  * @param string $cpt_singular_name The singular title of the curent CPT.
2237 2237
                  * @param string $listing_type The CPT being requested. ie: gd_place.
2238 2238
                  */
2239
-                echo apply_filters('geodir_add_listing_title_label', sprintf( __('%s Title', 'geodirectory'), $cpt_singular_name ),$cpt_singular_name,$listing_type); ?><span>*</span> </label>
2239
+                echo apply_filters('geodir_add_listing_title_label', sprintf(__('%s Title', 'geodirectory'), $cpt_singular_name), $cpt_singular_name, $listing_type); ?><span>*</span> </label>
2240 2240
             <input type="text" field_type="text" name="post_title" id="post_title" class="geodir_textfield"
2241 2241
                    value="<?php echo esc_attr(stripslashes($title)); ?>"/>
2242
-            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory');?></span>
2242
+            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory'); ?></span>
2243 2243
         </div>
2244 2244
         <?php
2245 2245
         $show_editor = get_option('geodir_tiny_editor_on_add_listing');
@@ -2285,7 +2285,7 @@  discard block
 block discarded – undo
2285 2285
         $desc_limit_msg = apply_filters('geodir_description_field_desc_limit_msg', $desc_limit_msg, $desc_limit);
2286 2286
         
2287 2287
         $desc_class = '';
2288
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2288
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2289 2289
             /**
2290 2290
              * Called on the add listing page form for frontend just before the description field.
2291 2291
              *
@@ -2298,7 +2298,7 @@  discard block
 block discarded – undo
2298 2298
             $desc_class = ' hidden';
2299 2299
         }
2300 2300
         ?>
2301
-        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class;?>">
2301
+        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class; ?>">
2302 2302
             <label><?php
2303 2303
                 /**
2304 2304
                  * Filter the add listing page description input label.
@@ -2308,7 +2308,7 @@  discard block
 block discarded – undo
2308 2308
                  * @param string $cpt_singular_name The singular title of the curent CPT.
2309 2309
                  * @param string $listing_type The CPT being requested. ie: gd_place.
2310 2310
                  */
2311
-                echo apply_filters('geodir_add_listing_description_label',sprintf( __('%s Description', 'geodirectory'), $cpt_singular_name ),$cpt_singular_name,$listing_type); ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2311
+                echo apply_filters('geodir_add_listing_description_label', sprintf(__('%s Description', 'geodirectory'), $cpt_singular_name), $cpt_singular_name, $listing_type); ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2312 2312
             <?php
2313 2313
             if ($show_editor) {
2314 2314
                 $editor_settings = array('media_buttons' => false, 'textarea_rows' => 10);
@@ -2317,16 +2317,16 @@  discard block
 block discarded – undo
2317 2317
                     <?php wp_editor($desc, "post_desc", $editor_settings); ?>
2318 2318
                 </div>
2319 2319
             <?php if ($desc_limit != '') { ?>
2320
-                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit;?>");</script>
2320
+                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit; ?>");</script>
2321 2321
             <?php } } else { ?>
2322 2322
                 <textarea field_type="textarea" name="post_desc" id="post_desc" class="geodir_textarea" maxlength="<?php echo $desc_limit; ?>"><?php echo $desc; ?></textarea>
2323 2323
             <?php } if ($desc_limit_msg != '') { ?>
2324 2324
                 <span class="geodir_message_note"><?php echo $desc_limit_msg; ?></span>
2325 2325
             <?php } ?>
2326
-            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory');?></span>
2326
+            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory'); ?></span>
2327 2327
         </div>
2328 2328
         <?php
2329
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2329
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2330 2330
             /**
2331 2331
              * Called on the add listing page form for frontend just after the description field.
2332 2332
              *
@@ -2365,7 +2365,7 @@  discard block
 block discarded – undo
2365 2365
         $kw_tags_msg = apply_filters('geodir_listing_tags_field_tags_msg', $kw_tags_msg, $kw_tags_count);
2366 2366
         
2367 2367
         $tags_class = '';
2368
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2368
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2369 2369
             /**
2370 2370
              * Called on the add listing page form for frontend just before the tags field.
2371 2371
              *
@@ -2376,14 +2376,14 @@  discard block
 block discarded – undo
2376 2376
             $tags_class = ' hidden';
2377 2377
         }
2378 2378
         ?>
2379
-        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class;?>">
2379
+        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class; ?>">
2380 2380
             <label><?php echo TAGKW_TEXT; ?></label>
2381 2381
             <input name="post_tags" id="post_tags" value="<?php echo $kw_tags; ?>" type="text" class="geodir_textfield"
2382
-                   maxlength="<?php echo $kw_tags_count;?>"/>
2383
-            <span class="geodir_message_note"><?php echo $kw_tags_msg;?></span>
2382
+                   maxlength="<?php echo $kw_tags_count; ?>"/>
2383
+            <span class="geodir_message_note"><?php echo $kw_tags_msg; ?></span>
2384 2384
         </div>
2385 2385
         <?php
2386
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2386
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2387 2387
             /**
2388 2388
              * Called on the add listing page form for frontend just after the tags field.
2389 2389
              *
@@ -2409,7 +2409,7 @@  discard block
 block discarded – undo
2409 2409
         $thumb_img_arr = array();
2410 2410
         $totImg = 0;
2411 2411
         if (isset($_REQUEST['backandedit']) && empty($_REQUEST['pid'])) {
2412
-            $post = (object)$gd_session->get('listing');
2412
+            $post = (object) $gd_session->get('listing');
2413 2413
             if (isset($post->post_images))
2414 2414
                 $curImages = trim($post->post_images, ",");
2415 2415
 
@@ -2422,7 +2422,7 @@  discard block
 block discarded – undo
2422 2422
             $listing_type = $post->listing_type;
2423 2423
 
2424 2424
         } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2425
-            $post = geodir_get_post_info((int)$_REQUEST['pid']);
2425
+            $post = geodir_get_post_info((int) $_REQUEST['pid']);
2426 2426
             $listing_type = $post->post_type;
2427 2427
             $thumb_img_arr = geodir_get_images($_REQUEST['pid']);
2428 2428
 
@@ -2436,7 +2436,7 @@  discard block
 block discarded – undo
2436 2436
                 //$curImages = $img->src.",";
2437 2437
             }
2438 2438
 
2439
-            $totImg = count((array)$thumb_img_arr);
2439
+            $totImg = count((array) $thumb_img_arr);
2440 2440
         }
2441 2441
 
2442 2442
         if ($curImages != '')
@@ -2457,15 +2457,15 @@  discard block
 block discarded – undo
2457 2457
         if ($show_image_input_box) {
2458 2458
             ?>
2459 2459
 
2460
-            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT;?>
2460
+            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT; ?>
2461 2461
                 <?php if ($image_limit == 1) {
2462
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('image with this package', 'geodirectory') . ')</small>';
2462
+                    echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('image with this package', 'geodirectory').')</small>';
2463 2463
                 } ?>
2464 2464
                 <?php if ($image_limit > 1) {
2465
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('images with this package', 'geodirectory') . ')</small>';
2465
+                    echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('images with this package', 'geodirectory').')</small>';
2466 2466
                 } ?>
2467 2467
                 <?php if ($image_limit == '') {
2468
-                    echo '<br /><small>(' . __('You can upload unlimited images with this package', 'geodirectory') . ')</small>';
2468
+                    echo '<br /><small>('.__('You can upload unlimited images with this package', 'geodirectory').')</small>';
2469 2469
                 } ?>
2470 2470
             </h5>
2471 2471
 
@@ -2480,11 +2480,11 @@  discard block
 block discarded – undo
2480 2480
                 <div
2481 2481
                     class="plupload-upload-uic hide-if-no-js <?php if ($multiple): ?>plupload-upload-uic-multiple<?php endif; ?>"
2482 2482
                     id="<?php echo $id; ?>plupload-upload-ui">
2483
-                    <h4><?php _e('Drop files to upload', 'geodirectory');?></h4><br/>
2483
+                    <h4><?php _e('Drop files to upload', 'geodirectory'); ?></h4><br/>
2484 2484
                     <input id="<?php echo $id; ?>plupload-browse-button" type="button"
2485 2485
                            value="<?php esc_attr_e('Select Files', 'geodirectory'); ?>" class="geodir_button"/>
2486 2486
                     <span class="ajaxnonceplu"
2487
-                          id="ajaxnonceplu<?php echo wp_create_nonce($id . 'pluploadan'); ?>"></span>
2487
+                          id="ajaxnonceplu<?php echo wp_create_nonce($id.'pluploadan'); ?>"></span>
2488 2488
                     <?php if ($width && $height): ?>
2489 2489
                         <span class="plupload-resize"></span>
2490 2490
                         <span class="plupload-width" id="plupload-width<?php echo $width; ?>"></span>
@@ -2497,7 +2497,7 @@  discard block
 block discarded – undo
2497 2497
                      id="<?php echo $id; ?>plupload-thumbs" style="border-top:1px solid #ccc; padding-top:10px;">
2498 2498
                 </div>
2499 2499
                 <span
2500
-                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory');?></span>
2500
+                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory'); ?></span>
2501 2501
                 <span id="<?php echo $id; ?>upload-error" style="display:none"></span>
2502 2502
             </div>
2503 2503
 
@@ -2509,7 +2509,7 @@  discard block
 block discarded – undo
2509 2509
          *
2510 2510
          * @since 1.0.0
2511 2511
          */
2512
-        do_action('geodir_after_main_form_fields');?>
2512
+        do_action('geodir_after_main_form_fields'); ?>
2513 2513
 
2514 2514
 
2515 2515
         <!-- add captcha code -->
@@ -2520,7 +2520,7 @@  discard block
 block discarded – undo
2520 2520
         </script>
2521 2521
         <noscript>
2522 2522
             <div>
2523
-                <label><?php _e('Type 64 into this box', 'geodirectory');?></label>
2523
+                <label><?php _e('Type 64 into this box', 'geodirectory'); ?></label>
2524 2524
                 <input type="text" id="geodir_spamblocker_top_form" name="geodir_spamblocker" value="" maxlength="10"/>
2525 2525
             </div>
2526 2526
         </noscript>
@@ -2530,10 +2530,10 @@  discard block
 block discarded – undo
2530 2530
         <!-- end captcha code -->
2531 2531
 
2532 2532
         <div id="geodir-add-listing-submit" class="geodir_form_row clear_both" style="padding:2px;text-align:center;">
2533
-            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON;?>"
2534
-                   class="geodir_button" <?php echo $submit_button;?>/>
2533
+            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON; ?>"
2534
+                   class="geodir_button" <?php echo $submit_button; ?>/>
2535 2535
             <span class="geodir_message_note"
2536
-                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory');?></span>
2536
+                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory'); ?></span>
2537 2537
         </div>
2538 2538
 
2539 2539
     </form>
@@ -2595,7 +2595,7 @@  discard block
 block discarded – undo
2595 2595
         class="<?php
2596 2596
         /** This action is documented in geodirectory_template_actions.php */
2597 2597
         echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'Reg/Login Top Section'); ?>">
2598
-        <?php dynamic_sidebar('Reg/Login Top Section');?>
2598
+        <?php dynamic_sidebar('Reg/Login Top Section'); ?>
2599 2599
     </div><!-- clearfix ends here-->
2600 2600
 <?php
2601 2601
 }
@@ -2615,11 +2615,11 @@  discard block
 block discarded – undo
2615 2615
 
2616 2616
     global $user_login;
2617 2617
     
2618
-    $is_enable_signup = get_option( 'users_can_register' );
2618
+    $is_enable_signup = get_option('users_can_register');
2619 2619
     
2620 2620
     ?>
2621 2621
     <script type="text/javascript">
2622
-        <?php if ( $user_login ) { ?>
2622
+        <?php if ($user_login) { ?>
2623 2623
         setTimeout(function () {
2624 2624
             try {
2625 2625
                 d = document.getElementById('user_pass');
@@ -2636,7 +2636,7 @@  discard block
 block discarded – undo
2636 2636
         <?php } ?>
2637 2637
     </script>
2638 2638
     <script type="text/javascript">
2639
-        <?php if ( $user_login ) { ?>
2639
+        <?php if ($user_login) { ?>
2640 2640
         setTimeout(function () {
2641 2641
             try {
2642 2642
                 d = document.getElementById('user_pass');
@@ -2661,7 +2661,7 @@  discard block
 block discarded – undo
2661 2661
         foreach ($errors as $errorsObj) {
2662 2662
             foreach ($errorsObj as $key => $val) {
2663 2663
                 for ($i = 0; $i < count($val); $i++) {
2664
-                    echo "<div class=error_msg_fix>" . $val[$i] . '</div>';
2664
+                    echo "<div class=error_msg_fix>".$val[$i].'</div>';
2665 2665
                     $registration_error_msg = 1;
2666 2666
                 }
2667 2667
             }
@@ -2678,10 +2678,10 @@  discard block
 block discarded – undo
2678 2678
              *
2679 2679
              * @since 1.0.0
2680 2680
              */
2681
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2681
+            include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
2682 2682
         </div>
2683 2683
 
2684
-    <?php } elseif (isset($_REQUEST['page']) && $_REQUEST['page'] == 'login' && isset($_REQUEST['page1']) && $_REQUEST['page1'] == 'sign_up' && $is_enable_signup ) { ?>
2684
+    <?php } elseif (isset($_REQUEST['page']) && $_REQUEST['page'] == 'login' && isset($_REQUEST['page1']) && $_REQUEST['page1'] == 'sign_up' && $is_enable_signup) { ?>
2685 2685
 
2686 2686
         <div class="registration_form">
2687 2687
             <?php
@@ -2690,7 +2690,7 @@  discard block
 block discarded – undo
2690 2690
              *
2691 2691
              * @since 1.0.0
2692 2692
              */
2693
-            include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2693
+            include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
2694 2694
         </div>
2695 2695
 
2696 2696
     <?php } else { ?>
@@ -2702,10 +2702,10 @@  discard block
 block discarded – undo
2702 2702
              *
2703 2703
              * @since 1.0.0
2704 2704
              */
2705
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2705
+            include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
2706 2706
         </div>
2707 2707
         
2708
-        <?php if ( $is_enable_signup ) { ?>
2708
+        <?php if ($is_enable_signup) { ?>
2709 2709
             <div class="registration_form_r">
2710 2710
                 <?php
2711 2711
                 /**
@@ -2713,7 +2713,7 @@  discard block
 block discarded – undo
2713 2713
                  *
2714 2714
                  * @since 1.0.0
2715 2715
                  */
2716
-                include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2716
+                include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
2717 2717
             </div>
2718 2718
         <?php } ?>
2719 2719
 
@@ -2750,12 +2750,12 @@  discard block
 block discarded – undo
2750 2750
     $gd_post_type = geodir_get_current_posttype();
2751 2751
     $post_type_info = get_post_type_object($gd_post_type);
2752 2752
 
2753
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
2753
+    $add_string_in_title = __('All', 'geodirectory').' ';
2754 2754
     if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2755
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
2755
+        $add_string_in_title = __('My Favorite', 'geodirectory').' ';
2756 2756
     }
2757 2757
 
2758
-    $list_title = $add_string_in_title . $post_type_info->labels->name;
2758
+    $list_title = $add_string_in_title.$post_type_info->labels->name;
2759 2759
     $single_name = $post_type_info->labels->singular_name;
2760 2760
 
2761 2761
     $taxonomy = geodir_get_taxonomies($gd_post_type);
@@ -2763,12 +2763,12 @@  discard block
 block discarded – undo
2763 2763
     if (!empty($term)) {
2764 2764
         $current_term = get_term_by('slug', $term, $taxonomy[0]);
2765 2765
         if (!empty($current_term))
2766
-            $list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'";
2766
+            $list_title .= __(' in', 'geodirectory')." '".geodir_ucwords($current_term->name)."'";
2767 2767
     }
2768 2768
 
2769 2769
 
2770 2770
     if (is_search()) {
2771
-        $list_title = __('Search', 'geodirectory') . ' ' . __($post_type_info->labels->name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2771
+        $list_title = __('Search', 'geodirectory').' '.__($post_type_info->labels->name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
2772 2772
 
2773 2773
     }
2774 2774
     /** This action is documented in geodirectory_template_actions.php */
@@ -2777,11 +2777,11 @@  discard block
 block discarded – undo
2777 2777
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2778 2778
 
2779 2779
     $title = $list_title;
2780
-    if(geodir_is_page('author')){
2780
+    if (geodir_is_page('author')) {
2781 2781
         $gd_page = 'author';
2782
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
2782
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2783 2783
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
2784
-        }else{
2784
+        } else {
2785 2785
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
2786 2786
         }
2787 2787
 
@@ -2795,16 +2795,16 @@  discard block
 block discarded – undo
2795 2795
      * @param string $title The page title including variables.
2796 2796
      * @param string $gd_page The GeoDirectory page type if any.
2797 2797
      */
2798
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2798
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2799 2799
 
2800
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2800
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
2801 2801
         /**
2802 2802
          * Filter the author page title text.
2803 2803
          *
2804 2804
          * @since 1.0.0
2805 2805
          * @param string $list_title The title for the page.
2806 2806
          */
2807
-        apply_filters('geodir_author_page_title_text', $title) . '</h1></header>';
2807
+        apply_filters('geodir_author_page_title_text', $title).'</h1></header>';
2808 2808
 }
2809 2809
 
2810 2810
 
@@ -3009,19 +3009,19 @@  discard block
 block discarded – undo
3009 3009
     $post_type_info = get_post_type_object($gd_post_type);
3010 3010
 
3011 3011
     $pt_name = '';
3012
-    if(isset($post_type_info->labels->name)){$pt_name=$post_type_info->labels->name;}
3012
+    if (isset($post_type_info->labels->name)) {$pt_name = $post_type_info->labels->name; }
3013 3013
 
3014 3014
     if (is_search()) {
3015
-        $list_title = __('Search', 'geodirectory') . ' ' . __($pt_name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
3015
+        $list_title = __('Search', 'geodirectory').' '.__($pt_name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
3016 3016
 
3017 3017
     }
3018 3018
     /** This action is documented in geodirectory_template_actions.php */
3019 3019
     $class = apply_filters('geodir_page_title_class', 'entry-title fn');
3020 3020
     /** This action is documented in geodirectory_template_actions.php */
3021 3021
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
3022
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
3022
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
3023 3023
         /** This action is documented in geodirectory_template_actions.php */
3024
-        apply_filters('geodir_listing_page_title', wptexturize($list_title)) . '</h1></header>';
3024
+        apply_filters('geodir_listing_page_title', wptexturize($list_title)).'</h1></header>';
3025 3025
 }
3026 3026
 
3027 3027
 // action for adding the listings page top widget area
@@ -3425,7 +3425,7 @@  discard block
 block discarded – undo
3425 3425
         $gd_post_type = geodir_get_current_posttype();
3426 3426
         $post_type_info = get_post_type_object($gd_post_type);
3427 3427
 
3428
-        $list_title = __('Search', 'geodirectory') . ' ' . __(geodir_utf8_ucfirst($post_type_info->labels->name), 'geodirectory') . __(' :', 'geodirectory');
3428
+        $list_title = __('Search', 'geodirectory').' '.__(geodir_utf8_ucfirst($post_type_info->labels->name), 'geodirectory').__(' :', 'geodirectory');
3429 3429
     }
3430 3430
     return $list_title;
3431 3431
 }
@@ -3441,7 +3441,7 @@  discard block
 block discarded – undo
3441 3441
  * @param string $position Position to add the post content. 'before' or 'after'. Default 'before'.
3442 3442
  * @param string $gd_page The geodirectory page type. Default null.
3443 3443
  */
3444
-function geodir_add_page_content( $position = 'before', $gd_page = '' ) {
3444
+function geodir_add_page_content($position = 'before', $gd_page = '') {
3445 3445
     global $post;
3446 3446
 
3447 3447
     $gd_page_id = NULL;
@@ -3517,17 +3517,17 @@  discard block
 block discarded – undo
3517 3517
  * @param WP_Post $post           WP_Post object.
3518 3518
  * @return string Filtered SQL JOIN clause.
3519 3519
  */
3520
-function geodir_previous_next_post_join( $join, $in_same_term, $excluded_terms, $taxonomy, $post ) {
3520
+function geodir_previous_next_post_join($join, $in_same_term, $excluded_terms, $taxonomy, $post) {
3521 3521
     global $plugin_prefix;
3522 3522
 
3523
-    if ( !empty($post->post_type) && in_array( $post->post_type, geodir_get_posttypes() ) ) {
3524
-        $join .= " INNER JOIN " . $plugin_prefix . $post->post_type . "_detail AS gd ON gd.post_id = p.ID";
3523
+    if (!empty($post->post_type) && in_array($post->post_type, geodir_get_posttypes())) {
3524
+        $join .= " INNER JOIN ".$plugin_prefix.$post->post_type."_detail AS gd ON gd.post_id = p.ID";
3525 3525
     }
3526 3526
     
3527 3527
     return $join;
3528 3528
 }
3529
-add_filter( 'get_previous_post_join', 'geodir_previous_next_post_join', 10, 5 );
3530
-add_filter( 'get_next_post_join', 'geodir_previous_next_post_join', 10, 5 );
3529
+add_filter('get_previous_post_join', 'geodir_previous_next_post_join', 10, 5);
3530
+add_filter('get_next_post_join', 'geodir_previous_next_post_join', 10, 5);
3531 3531
 
3532 3532
 /**
3533 3533
  * Filters the WHERE clause in the SQL for an adjacent post query.
@@ -3545,32 +3545,32 @@  discard block
 block discarded – undo
3545 3545
  * @param WP_Post $post          WP_Post object.
3546 3546
  * @return string Filtered SQL WHERE clause.
3547 3547
  */
3548
-function geodir_previous_next_post_where( $where, $in_same_term, $excluded_terms, $taxonomy, $post ) {
3548
+function geodir_previous_next_post_where($where, $in_same_term, $excluded_terms, $taxonomy, $post) {
3549 3549
     global $wpdb, $plugin_prefix;
3550 3550
 
3551
-    if ( !empty($post->post_type) && ( !empty( $post->country_slug ) || !empty( $post->region_slug ) || !empty( $post->city_slug ) ) && in_array( $post->post_type, geodir_get_posttypes() ) ) {
3551
+    if (!empty($post->post_type) && (!empty($post->country_slug) || !empty($post->region_slug) || !empty($post->city_slug)) && in_array($post->post_type, geodir_get_posttypes())) {
3552 3552
         $post_locations = '';
3553 3553
         $post_locations_var = array();
3554 3554
         
3555
-        if ( !empty( $post->country_slug ) ) {
3555
+        if (!empty($post->country_slug)) {
3556 3556
             $post_locations .= " AND post_locations LIKE %s";
3557
-            $post_locations_var[] = "%,[" . $post->country_slug . "]";
3557
+            $post_locations_var[] = "%,[".$post->country_slug."]";
3558 3558
         }
3559 3559
 
3560
-        if ( !empty( $post->region_slug ) ) {
3560
+        if (!empty($post->region_slug)) {
3561 3561
             $post_locations .= " AND post_locations LIKE %s";
3562
-            $post_locations_var[] = "%,[" . $post->region_slug . "],%";
3562
+            $post_locations_var[] = "%,[".$post->region_slug."],%";
3563 3563
         }
3564 3564
 
3565
-        if ( !empty( $post->city_slug ) ) {
3565
+        if (!empty($post->city_slug)) {
3566 3566
             $post_locations .= " AND post_locations LIKE %s";
3567
-            $post_locations_var[] = "[" . $post->city_slug . "],%";
3567
+            $post_locations_var[] = "[".$post->city_slug."],%";
3568 3568
         }
3569 3569
         
3570
-        $where .= $wpdb->prepare( $post_locations, $post_locations_var );
3570
+        $where .= $wpdb->prepare($post_locations, $post_locations_var);
3571 3571
     }
3572 3572
     
3573 3573
     return $where;
3574 3574
 }
3575
-add_filter( 'get_previous_post_where', 'geodir_previous_next_post_where', 10, 5 );
3576
-add_filter( 'get_next_post_where', 'geodir_previous_next_post_where', 10, 5 );
3577 3575
\ No newline at end of file
3576
+add_filter('get_previous_post_where', 'geodir_previous_next_post_where', 10, 5);
3577
+add_filter('get_next_post_where', 'geodir_previous_next_post_where', 10, 5);
3578 3578
\ No newline at end of file
Please login to merge, or discard this patch.