Passed
Push — master ( 28da55...e7ab79 )
by Stiofan
22:52
created
geodirectory_template_actions.php 1 patch
Spacing   +156 added lines, -156 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 
283 283
     //php
284 284
     if (!empty($tc['geodir_theme_compat_code'])) {
285
-        include_once('geodirectory-functions/compatibility/' . $tc['geodir_theme_compat_code'] . '.php');
285
+        include_once('geodirectory-functions/compatibility/'.$tc['geodir_theme_compat_code'].'.php');
286 286
     }
287 287
 
288 288
     //geodir_full_page_class
@@ -452,13 +452,13 @@  discard block
 block discarded – undo
452 452
 function geodir_action_wrapper_content_open($type = '', $id = '', $class = '')
453 453
 {
454 454
     if ($type == 'home-page' && $width = get_option('geodir_width_home_contant_section')) {
455
-        $width_css = 'style="width:' . $width . '%;"';
455
+        $width_css = 'style="width:'.$width.'%;"';
456 456
     } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_contant_section')) {
457
-        $width_css = 'style="width:' . $width . '%;"';
457
+        $width_css = 'style="width:'.$width.'%;"';
458 458
     } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_contant_section')) {
459
-        $width_css = 'style="width:' . $width . '%;"';
459
+        $width_css = 'style="width:'.$width.'%;"';
460 460
     } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_contant_section')) {
461
-        $width_css = 'style="width:' . $width . '%;"';
461
+        $width_css = 'style="width:'.$width.'%;"';
462 462
     } else {
463 463
         $width_css = '';
464 464
     }
@@ -572,13 +572,13 @@  discard block
 block discarded – undo
572 572
 function geodir_action_sidebar_right_open($type = '', $id = '', $class = '', $itemtype = '')
573 573
 {
574 574
     if ($type == 'home-page' && $width = get_option('geodir_width_home_right_section')) {
575
-        $width_css = 'style="width:' . $width . '%;"';
575
+        $width_css = 'style="width:'.$width.'%;"';
576 576
     } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_right_section')) {
577
-        $width_css = 'style="width:' . $width . '%;"';
577
+        $width_css = 'style="width:'.$width.'%;"';
578 578
     } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_right_section')) {
579
-        $width_css = 'style="width:' . $width . '%;"';
579
+        $width_css = 'style="width:'.$width.'%;"';
580 580
     } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_right_section')) {
581
-        $width_css = 'style="width:' . $width . '%;"';
581
+        $width_css = 'style="width:'.$width.'%;"';
582 582
     } else {
583 583
         $width_css = '';
584 584
     }
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
         }
677 677
     }
678 678
 
679
-    $post = (object)$_REQUEST;
679
+    $post = (object) $_REQUEST;
680 680
 
681 681
 
682 682
     if (isset($post->video)) {
@@ -735,10 +735,10 @@  discard block
 block discarded – undo
735 735
 
736 736
     $json = '{';
737 737
     $json .= '"post_preview": "1",';
738
-    $json .= '"t": "' . $json_title . '",';
739
-    $json .= '"lt": "' . $post_latitude . '",';
740
-    $json .= '"ln": "' . $post_longitude . '",';
741
-    $json .= '"i":"' . $term_icon . '"';
738
+    $json .= '"t": "'.$json_title.'",';
739
+    $json .= '"lt": "'.$post_latitude.'",';
740
+    $json .= '"ln": "'.$post_longitude.'",';
741
+    $json .= '"i":"'.$term_icon.'"';
742 742
     $json .= '}';
743 743
 
744 744
     $post->marker_json = $json;
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
      * @param string $class The class to use. Default is 'entry-header'.
966 966
      */
967 967
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
968
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' . stripslashes(get_the_title()) . '</h1></header>';
968
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.stripslashes(get_the_title()).'</h1></header>';
969 969
 }
970 970
 
971 971
 
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
                     $height = !empty($sizes) && isset($sizes[1]) ? $sizes[1] : 0;
1020 1020
 
1021 1021
                     if ($image && $width && $height) {
1022
-                        $image = (object)array('src' => $image, 'width' => $width, 'height' => $height);
1022
+                        $image = (object) array('src' => $image, 'width' => $width, 'height' => $height);
1023 1023
                     }
1024 1024
 
1025 1025
                     if (isset($image->src)) {
@@ -1031,9 +1031,9 @@  discard block
 block discarded – undo
1031 1031
 
1032 1032
                         $image_title = isset($image->title) ? $image->title : '';
1033 1033
 
1034
-                        $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;" />';
1035
-                        $main_slides .= '<img src="' . $image->src . '" alt="' . $image_title . '" title="' . $image_title . '" style="max-height:400px;margin:0 auto;" /></li>';
1036
-                        $nav_slides .= '<li><img src="' . $image->src . '" alt="' . $image_title . '" title="' . $image_title . '" style="max-height:48px;margin:0 auto;" /></li>';
1034
+                        $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;" />';
1035
+                        $main_slides .= '<img src="'.$image->src.'" alt="'.$image_title.'" title="'.$image_title.'" style="max-height:400px;margin:0 auto;" /></li>';
1036
+                        $nav_slides .= '<li><img src="'.$image->src.'" alt="'.$image_title.'" title="'.$image_title.'" style="max-height:48px;margin:0 auto;" /></li>';
1037 1037
                         $slides++;
1038 1038
                     }
1039 1039
                 }
@@ -1052,10 +1052,10 @@  discard block
 block discarded – undo
1052 1052
                 } else {
1053 1053
                     $spacer_height = ((400 - $image->height) / 2);
1054 1054
                 }
1055
-                $caption = '';//(!empty($image->caption)) ? '<p class="flex-caption">'.$image->caption.'</p>' : '';
1056
-                $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;" />';
1057
-                $main_slides .= '<img src="' . $image->src . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:400px;margin:0 auto;" />'.$caption.'</li>';
1058
-                $nav_slides .= '<li><img src="' . $image->src . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:48px;margin:0 auto;" /></li>';
1055
+                $caption = ''; //(!empty($image->caption)) ? '<p class="flex-caption">'.$image->caption.'</p>' : '';
1056
+                $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;" />';
1057
+                $main_slides .= '<img src="'.$image->src.'" alt="'.$image->title.'" title="'.$image->title.'" style="max-height:400px;margin:0 auto;" />'.$caption.'</li>';
1058
+                $nav_slides .= '<li><img src="'.$image->src.'" alt="'.$image->title.'" title="'.$image->title.'" style="max-height:48px;margin:0 auto;" /></li>';
1059 1059
                 $slides++;
1060 1060
             }
1061 1061
         }// endfore
@@ -1090,7 +1090,7 @@  discard block
 block discarded – undo
1090 1090
  */
1091 1091
 function geodir_action_details_taxonomies()
1092 1092
 {
1093
-    global $preview, $post;?>
1093
+    global $preview, $post; ?>
1094 1094
     <p class="geodir_post_taxomomies clearfix">
1095 1095
     <?php
1096 1096
     $taxonomies = array();
@@ -1099,11 +1099,11 @@  discard block
 block discarded – undo
1099 1099
 
1100 1100
     if ($preview && !$is_backend_preview) {
1101 1101
         $post_type = $post->listing_type;
1102
-        $post_taxonomy = $post_type . 'category';
1102
+        $post_taxonomy = $post_type.'category';
1103 1103
         $post->{$post_taxonomy} = $post->post_category[$post_taxonomy];
1104 1104
     } else {
1105 1105
         $post_type = $post->post_type;
1106
-        $post_taxonomy = $post_type . 'category';
1106
+        $post_taxonomy = $post_type.'category';
1107 1107
     }
1108 1108
 //{	
1109 1109
     $post_type_info = get_post_type_object($post_type);
@@ -1111,7 +1111,7 @@  discard block
 block discarded – undo
1111 1111
 
1112 1112
     if (!empty($post->post_tags)) {
1113 1113
 
1114
-        if (taxonomy_exists($post_type . '_tags')):
1114
+        if (taxonomy_exists($post_type.'_tags')):
1115 1115
             $links = array();
1116 1116
             $terms = array();
1117 1117
             // to limit post tags
@@ -1137,8 +1137,8 @@  discard block
 block discarded – undo
1137 1137
                 $post_term = trim($post_term);
1138 1138
 
1139 1139
                 $priority_location = false;
1140
-                if ($insert_term = term_exists($post_term, $post_type . '_tags')) {
1141
-                    $term = get_term_by('name', $post_term, $post_type . '_tags');
1140
+                if ($insert_term = term_exists($post_term, $post_type.'_tags')) {
1141
+                    $term = get_term_by('name', $post_term, $post_type.'_tags');
1142 1142
                 } else {
1143 1143
                     $post_country = isset($_REQUEST['post_country']) && $_REQUEST['post_country'] != '' ? sanitize_text_field($_REQUEST['post_country']) : NULL;
1144 1144
                     $post_region = isset($_REQUEST['post_region']) && $_REQUEST['post_region'] != '' ? sanitize_text_field($_REQUEST['post_region']) : NULL;
@@ -1148,10 +1148,10 @@  discard block
 block discarded – undo
1148 1148
                     $match_city = $post_city && sanitize_title($post_term) == sanitize_title($post_city) ? true : false;
1149 1149
                     if ($match_country || $match_region || $match_city) {
1150 1150
                         $priority_location = true;
1151
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1151
+                        $term = get_term_by('name', $post_term, $post_type.'_tags');
1152 1152
                     } else {
1153
-                        $insert_term = wp_insert_term($post_term, $post_type . '_tags');
1154
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1153
+                        $insert_term = wp_insert_term($post_term, $post_type.'_tags');
1154
+                        $term = get_term_by('name', $post_term, $post_type.'_tags');
1155 1155
                     }
1156 1156
                 }
1157 1157
 
@@ -1168,12 +1168,12 @@  discard block
 block discarded – undo
1168 1168
                          * @param string $tag_link The tag link html.
1169 1169
                          * @param object $term The tag term object.
1170 1170
                          */
1171
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1171
+                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
1172 1172
                         $links[] = $tag_link;
1173 1173
                     } else {
1174
-                        $tag_link = "<a href='" . esc_attr(get_term_link($term->term_id, $term->taxonomy)) . "'>$term->name</a>";
1174
+                        $tag_link = "<a href='".esc_attr(get_term_link($term->term_id, $term->taxonomy))."'>$term->name</a>";
1175 1175
                         /** This action is documented in geodirectory-template_actions.php */
1176
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1176
+                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
1177 1177
                         $links[] = $tag_link;
1178 1178
                     }
1179 1179
                     $terms[] = $term;
@@ -1183,7 +1183,7 @@  discard block
 block discarded – undo
1183 1183
             if (!isset($listing_label)) {
1184 1184
                 $listing_label = '';
1185 1185
             }
1186
-            $taxonomies[$post_type . '_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1186
+            $taxonomies[$post_type.'_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
1187 1187
         endif;
1188 1188
 
1189 1189
     }
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
                     $term = get_term_by('id', $post_term, $post_taxonomy);
1212 1212
 
1213 1213
                     if (is_object($term)) {
1214
-                        $term_link = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>$term->name</a>";
1214
+                        $term_link = "<a href='".esc_attr(get_term_link($term, $post_taxonomy))."'>$term->name</a>";
1215 1215
                         /**
1216 1216
                          * Filter the category name on the details page.
1217 1217
                          *
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
                          * @param string $term_link The link html to the category.
1220 1220
                          * @param object $term The category term object.
1221 1221
                          */
1222
-                        $term_link = apply_filters('geodir_details_taxonomies_cat_link',$term_link,$term);
1222
+                        $term_link = apply_filters('geodir_details_taxonomies_cat_link', $term_link, $term);
1223 1223
                         $links[] = $term_link;
1224 1224
                         $terms[] = $term;
1225 1225
                     }
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
         if (!isset($listing_label)) {
1238 1238
             $listing_label = '';
1239 1239
         }
1240
-        $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1240
+        $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
1241 1241
 
1242 1242
     }
1243 1243
 
@@ -1250,14 +1250,14 @@  discard block
 block discarded – undo
1250 1250
      * @param string $listing_label The post type label.
1251 1251
      * @param string $listing_label The post type label with ucwords function.
1252 1252
      */
1253
-    $taxonomies = apply_filters('geodir_details_taxonomies_output',$taxonomies,$post_type,$listing_label,geodir_ucwords($listing_label));
1253
+    $taxonomies = apply_filters('geodir_details_taxonomies_output', $taxonomies, $post_type, $listing_label, geodir_ucwords($listing_label));
1254 1254
 
1255 1255
     if (isset($taxonomies[$post_taxonomy])) {
1256
-        echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
1256
+        echo '<span class="geodir-category">'.$taxonomies[$post_taxonomy].'</span>';
1257 1257
     }
1258 1258
 
1259
-    if (isset($taxonomies[$post_type . '_tags']))
1260
-        echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
1259
+    if (isset($taxonomies[$post_type.'_tags']))
1260
+        echo '<span class="geodir-tags">'.$taxonomies[$post_type.'_tags'].'</span>';
1261 1261
 
1262 1262
     ?>
1263 1263
     </p><?php
@@ -1278,11 +1278,11 @@  discard block
 block discarded – undo
1278 1278
  * @param object $post Optional. The post object or blank.
1279 1279
  * @package GeoDirectory
1280 1280
  */
1281
-function geodir_action_details_micordata($post='')
1281
+function geodir_action_details_micordata($post = '')
1282 1282
 {
1283 1283
 
1284 1284
     global $preview;
1285
-    if(empty($post)){global $post;}
1285
+    if (empty($post)) {global $post; }
1286 1286
     if ($preview || !geodir_is_page('detail')) {
1287 1287
         return;
1288 1288
     }
@@ -1303,7 +1303,7 @@  discard block
 block discarded – undo
1303 1303
                 "description" => $review->comment_content,
1304 1304
                 "reviewRating" => array(
1305 1305
                     "@type" => "Rating",
1306
-                    "bestRating" => "5",// @todo this will need to be filtered for review manager if user changes the score.
1306
+                    "bestRating" => "5", // @todo this will need to be filtered for review manager if user changes the score.
1307 1307
                     "ratingValue" => geodir_get_commentoverall($review->comment_ID),
1308 1308
                     "worstRating" => "1"
1309 1309
                 )
@@ -1331,13 +1331,13 @@  discard block
 block discarded – undo
1331 1331
     }
1332 1332
     //print_r($post);
1333 1333
     // external links
1334
-    $external_links =  array();
1334
+    $external_links = array();
1335 1335
     $external_links[] = $post->geodir_website;
1336 1336
     $external_links[] = $post->geodir_twitter;
1337 1337
     $external_links[] = $post->geodir_facebook;
1338 1338
     $external_links = array_filter($external_links);
1339 1339
 
1340
-    if(!empty($external_links)){
1340
+    if (!empty($external_links)) {
1341 1341
         $external_links = array_values($external_links);
1342 1342
     }
1343 1343
 
@@ -1347,16 +1347,16 @@  discard block
 block discarded – undo
1347 1347
 
1348 1348
     // schema type
1349 1349
     $schema_type = 'LocalBusiness';
1350
-    if(isset($post->default_category) && $post->default_category){
1350
+    if (isset($post->default_category) && $post->default_category) {
1351 1351
         $schema_type = get_tax_meta($post->default_category, 'ct_cat_schema', false, $post->post_type);
1352
-        if(!$schema_type && $post->post_type=='gd_event'){$schema_type = 'Event';}
1352
+        if (!$schema_type && $post->post_type == 'gd_event') {$schema_type = 'Event'; }
1353 1353
     }
1354 1354
 
1355 1355
     $schema = array();
1356 1356
     $schema['@context'] = "http://schema.org";
1357 1357
     $schema['@type'] = $schema_type;
1358 1358
     $schema['name'] = $post->post_name;
1359
-    $schema['description'] = wp_strip_all_tags( $post->post_content, true );
1359
+    $schema['description'] = wp_strip_all_tags($post->post_content, true);
1360 1360
     $schema['telephone'] = $post->geodir_contact;
1361 1361
     $schema['url'] = $c_url;
1362 1362
     $schema['sameAs'] = $external_links;
@@ -1370,7 +1370,7 @@  discard block
 block discarded – undo
1370 1370
         "postalCode" => $post->post_zip
1371 1371
     );
1372 1372
 
1373
-    if($post->post_latitude && $post->post_longitude) {
1373
+    if ($post->post_latitude && $post->post_longitude) {
1374 1374
         $schema['geo'] = array(
1375 1375
             "@type" => "GeoCoordinates",
1376 1376
             "latitude" => $post->post_latitude,
@@ -1378,7 +1378,7 @@  discard block
 block discarded – undo
1378 1378
         );
1379 1379
     }
1380 1380
 
1381
-    if($post_avgratings) {
1381
+    if ($post_avgratings) {
1382 1382
         $schema['aggregateRating'] = array(
1383 1383
             "@type" => "AggregateRating",
1384 1384
             "ratingValue" => $post_avgratings,
@@ -1397,10 +1397,10 @@  discard block
 block discarded – undo
1397 1397
      * @param array $schema The array of schema data to be filtered.
1398 1398
      * @param object $post The post object.
1399 1399
      */
1400
-    $schema = apply_filters('geodir_details_schema', $schema,$post);
1400
+    $schema = apply_filters('geodir_details_schema', $schema, $post);
1401 1401
 
1402 1402
 
1403
-    echo '<script type="application/ld+json">' . json_encode($schema) . '</script>';
1403
+    echo '<script type="application/ld+json">'.json_encode($schema).'</script>';
1404 1404
 
1405 1405
 }
1406 1406
 
@@ -1421,9 +1421,9 @@  discard block
 block discarded – undo
1421 1421
     ?>
1422 1422
     <div class="geodir-pos_navigation clearfix">
1423 1423
     <div
1424
-        class="geodir-post_left"><?php previous_post_link('%link', '' . __('Previous', 'geodirectory'), false) ?></div>
1424
+        class="geodir-post_left"><?php previous_post_link('%link', ''.__('Previous', 'geodirectory'), false) ?></div>
1425 1425
     <div
1426
-        class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory') . '', false) ?></div>
1426
+        class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory').'', false) ?></div>
1427 1427
     </div><?php
1428 1428
 }
1429 1429
 
@@ -1492,12 +1492,12 @@  discard block
 block discarded – undo
1492 1492
     $gd_post_type = geodir_get_current_posttype();
1493 1493
     $post_type_info = get_post_type_object($gd_post_type);
1494 1494
 
1495
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
1495
+    $add_string_in_title = __('All', 'geodirectory').' ';
1496 1496
     if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1497
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
1497
+        $add_string_in_title = __('My Favorite', 'geodirectory').' ';
1498 1498
     }
1499 1499
 
1500
-    $list_title = $add_string_in_title . __(ucfirst($post_type_info->labels->name), 'geodirectory');
1500
+    $list_title = $add_string_in_title.__(ucfirst($post_type_info->labels->name), 'geodirectory');
1501 1501
     $single_name = $post_type_info->labels->singular_name;
1502 1502
 
1503 1503
     $taxonomy = geodir_get_taxonomies($gd_post_type, true);
@@ -1525,12 +1525,12 @@  discard block
 block discarded – undo
1525 1525
         $current_term = get_term_by('slug', $term, $taxonomy[0]);
1526 1526
         if (!empty($current_term)) {
1527 1527
             $current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1528
-            if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1528
+            if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
1529 1529
                 $location_last_char = substr($location_name, -1);
1530 1530
                 $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1531
-                $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1531
+                $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
1532 1532
             } else {
1533
-                $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1533
+                $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
1534 1534
             }
1535 1535
         } else {
1536 1536
             if (count($taxonomy) > 1) {
@@ -1538,12 +1538,12 @@  discard block
 block discarded – undo
1538 1538
 
1539 1539
                 if (!empty($current_term)) {
1540 1540
                     $current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1541
-                    if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1541
+                    if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
1542 1542
                         $location_last_char = substr($location_name, -1);
1543 1543
                         $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1544
-                        $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1544
+                        $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
1545 1545
                     } else {
1546
-                        $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1546
+                        $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
1547 1547
                     }
1548 1548
                 }
1549 1549
             }
@@ -1571,7 +1571,7 @@  discard block
 block discarded – undo
1571 1571
                 $gd_city = __(geodir_ucwords($gd_city), 'geodirectory');
1572 1572
             }
1573 1573
 
1574
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_city . "'";
1574
+            $list_title .= __(' in', 'geodirectory')." '".$gd_city."'";
1575 1575
         } else if ($gd_region != '') {
1576 1576
             if ($gd_region_actual != '') {
1577 1577
                 $gd_region = $gd_region_actual;
@@ -1581,7 +1581,7 @@  discard block
 block discarded – undo
1581 1581
                 $gd_region = __(geodir_ucwords($gd_region), 'geodirectory');
1582 1582
             }
1583 1583
 
1584
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_region . "'";
1584
+            $list_title .= __(' in', 'geodirectory')." '".$gd_region."'";
1585 1585
         } else if ($gd_country != '') {
1586 1586
             if ($gd_country_actual != '') {
1587 1587
                 $gd_country = $gd_country_actual;
@@ -1591,12 +1591,12 @@  discard block
 block discarded – undo
1591 1591
                 $gd_country = __(geodir_ucwords($gd_country), 'geodirectory');
1592 1592
             }
1593 1593
 
1594
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_country . "'";
1594
+            $list_title .= __(' in', 'geodirectory')." '".$gd_country."'";
1595 1595
         }
1596 1596
     }
1597 1597
 
1598 1598
     if (is_search()) {
1599
-        $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
1599
+        $list_title = __('Search', 'geodirectory').' '.__(ucfirst($post_type_info->labels->name), 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
1600 1600
     }
1601 1601
     /** This action is documented in geodirectory_template_actions.php */
1602 1602
     $class = apply_filters('geodir_page_title_class', 'entry-title fn');
@@ -1605,26 +1605,26 @@  discard block
 block discarded – undo
1605 1605
 
1606 1606
 
1607 1607
     $title = $list_title;
1608
-    if(geodir_is_page('pt')){
1608
+    if (geodir_is_page('pt')) {
1609 1609
         $gd_page = 'pt';
1610
-        $title  = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1610
+        $title = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1611 1611
     }
1612
-    elseif(geodir_is_page('listing')){
1612
+    elseif (geodir_is_page('listing')) {
1613 1613
         $gd_page = 'listing';
1614 1614
         global $wp_query;
1615 1615
         $current_term = $wp_query->get_queried_object();
1616
-        if (strpos($current_term->taxonomy,'_tags') !== false) {
1616
+        if (strpos($current_term->taxonomy, '_tags') !== false) {
1617 1617
             $title = (get_option('geodir_page_title_tag-listing')) ? get_option('geodir_page_title_tag-listing') : $title;
1618
-        }else{
1618
+        } else {
1619 1619
             $title = (get_option('geodir_page_title_cat-listing')) ? get_option('geodir_page_title_cat-listing') : $title;
1620 1620
         }
1621 1621
 
1622 1622
     }
1623
-    elseif(geodir_is_page('author')){
1623
+    elseif (geodir_is_page('author')) {
1624 1624
         $gd_page = 'author';
1625
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
1625
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1626 1626
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
1627
-        }else{
1627
+        } else {
1628 1628
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
1629 1629
         }
1630 1630
 
@@ -1638,16 +1638,16 @@  discard block
 block discarded – undo
1638 1638
      * @param string $title The page title including variables.
1639 1639
      * @param string $gd_page The GeoDirectory page type if any.
1640 1640
      */
1641
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1641
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1642 1642
 
1643
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
1643
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
1644 1644
         /**
1645 1645
          * Filter the listing page title.
1646 1646
          *
1647 1647
          * @since 1.0.0
1648 1648
          * @param string $list_title The title for the category page.
1649 1649
          */
1650
-        apply_filters('geodir_listing_page_title', $title) . '</h1></header>';
1650
+        apply_filters('geodir_listing_page_title', $title).'</h1></header>';
1651 1651
 }
1652 1652
 
1653 1653
 add_action('geodir_listings_page_description', 'geodir_action_listings_description', 10);
@@ -1666,7 +1666,7 @@  discard block
 block discarded – undo
1666 1666
     $gd_post_type = geodir_get_current_posttype();
1667 1667
     if (isset($current_term->term_id) && $current_term->term_id != '') {
1668 1668
 
1669
-        $term_desc = term_description($current_term->term_id, $gd_post_type . '_tags');
1669
+        $term_desc = term_description($current_term->term_id, $gd_post_type.'_tags');
1670 1670
         $saved_data = stripslashes(get_tax_meta($current_term->term_id, 'ct_cat_top_desc', false, $gd_post_type));
1671 1671
         if ($term_desc && !$saved_data) {
1672 1672
             $saved_data = $term_desc;
@@ -1683,7 +1683,7 @@  discard block
 block discarded – undo
1683 1683
         if ($cat_description) {
1684 1684
             ?>
1685 1685
 
1686
-            <div class="term_description"><?php echo $cat_description;?></div> <?php
1686
+            <div class="term_description"><?php echo $cat_description; ?></div> <?php
1687 1687
         }
1688 1688
 
1689 1689
     }
@@ -1733,13 +1733,13 @@  discard block
 block discarded – undo
1733 1733
 function geodir_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '')
1734 1734
 {
1735 1735
     if ($type == 'home-page' && $width = get_option('geodir_width_home_left_section')) {
1736
-        $width_css = 'style="width:' . $width . '%;"';
1736
+        $width_css = 'style="width:'.$width.'%;"';
1737 1737
     } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_left_section')) {
1738
-        $width_css = 'style="width:' . $width . '%;"';
1738
+        $width_css = 'style="width:'.$width.'%;"';
1739 1739
     } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_left_section')) {
1740
-        $width_css = 'style="width:' . $width . '%;"';
1740
+        $width_css = 'style="width:'.$width.'%;"';
1741 1741
     } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_left_section')) {
1742
-        $width_css = 'style="width:' . $width . '%;"';
1742
+        $width_css = 'style="width:'.$width.'%;"';
1743 1743
     } else {
1744 1744
         $width_css = '';
1745 1745
     }
@@ -2044,11 +2044,11 @@  discard block
 block discarded – undo
2044 2044
 
2045 2045
     $title = apply_filters('geodir_add_listing_page_title_text', get_the_title());
2046 2046
 
2047
-    if(geodir_is_page('add-listing')){
2047
+    if (geodir_is_page('add-listing')) {
2048 2048
         $gd_page = 'add-listing';
2049
-        if(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){
2049
+        if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2050 2050
             $title = (get_option('geodir_page_title_edit-listing')) ? get_option('geodir_page_title_edit-listing') : $title;
2051
-        }elseif(isset($listing_type)){
2051
+        }elseif (isset($listing_type)) {
2052 2052
             $title = (get_option('geodir_page_title_add-listing')) ? get_option('geodir_page_title_add-listing') : $title;
2053 2053
         }
2054 2054
 
@@ -2062,9 +2062,9 @@  discard block
 block discarded – undo
2062 2062
      * @param string $title The page title including variables.
2063 2063
      * @param string $gd_page The GeoDirectory page type if any.
2064 2064
      */
2065
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2065
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2066 2066
 
2067
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">';
2067
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">';
2068 2068
     echo $title;
2069 2069
     echo '</h1></header>';
2070 2070
 }
@@ -2078,7 +2078,7 @@  discard block
 block discarded – undo
2078 2078
  */
2079 2079
 function geodir_action_add_listing_page_mandatory()
2080 2080
 {?>
2081
-    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT;?></p>
2081
+    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT; ?></p>
2082 2082
 <?php
2083 2083
 }
2084 2084
 
@@ -2113,7 +2113,7 @@  discard block
 block discarded – undo
2113 2113
 
2114 2114
     if (isset($_REQUEST['backandedit'])) {
2115 2115
         global $post;
2116
-        $post = (object)$gd_session->get('listing');
2116
+        $post = (object) $gd_session->get('listing');
2117 2117
         $listing_type = $post->listing_type;
2118 2118
         $title = $post->post_title;
2119 2119
         $desc = $post->post_desc;
@@ -2128,7 +2128,7 @@  discard block
 block discarded – undo
2128 2128
         $thumb_img_arr = geodir_get_images($post->ID);
2129 2129
         if ($thumb_img_arr) {
2130 2130
             foreach ($thumb_img_arr as $post_img) {
2131
-                $curImages .= $post_img->src . ',';
2131
+                $curImages .= $post_img->src.',';
2132 2132
             }
2133 2133
         }
2134 2134
 
@@ -2136,7 +2136,7 @@  discard block
 block discarded – undo
2136 2136
         $title = $post->post_title;
2137 2137
         $desc = $post->post_content;
2138 2138
         $kw_tags = $post->post_tags;
2139
-        $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type . '_tags', array('fields' => 'names')));
2139
+        $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type.'_tags', array('fields' => 'names')));
2140 2140
     } else {
2141 2141
         $listing_type = sanitize_text_field($_REQUEST['listing_type']);
2142 2142
     }
@@ -2145,15 +2145,15 @@  discard block
 block discarded – undo
2145 2145
         $user_login = true;
2146 2146
     }
2147 2147
     ?>
2148
-    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id());?>" method="post" enctype="multipart/form-data">
2149
-        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type);?>"/>
2150
-        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type);?>"/>
2148
+    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id()); ?>" method="post" enctype="multipart/form-data">
2149
+        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2150
+        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2151 2151
         <?php if ($page_id) { ?>
2152
-        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id;?>"/>
2152
+        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id; ?>"/>
2153 2153
         <?php } if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { ?>
2154
-            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']);?>"/>
2154
+            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']); ?>"/>
2155 2155
         <?php } if (isset($_REQUEST['backandedit'])) { ?>
2156
-            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']);?>"/>
2156
+            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']); ?>"/>
2157 2157
         <?php
2158 2158
         } 
2159 2159
         /**
@@ -2165,7 +2165,7 @@  discard block
 block discarded – undo
2165 2165
          */
2166 2166
         do_action('geodir_before_detail_fields');
2167 2167
         ?>
2168
-        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT;?></h5>
2168
+        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT; ?></h5>
2169 2169
         <?php
2170 2170
         /**
2171 2171
          * Called at the top of the add listing page form for frontend.
@@ -2177,10 +2177,10 @@  discard block
 block discarded – undo
2177 2177
         do_action('geodir_before_main_form_fields');
2178 2178
         ?>
2179 2179
         <div id="geodir_post_title_row" class="required_field geodir_form_row clearfix gd-fieldset-details">
2180
-            <label><?php echo PLACE_TITLE_TEXT;?><span>*</span> </label>
2180
+            <label><?php echo PLACE_TITLE_TEXT; ?><span>*</span> </label>
2181 2181
             <input type="text" field_type="text" name="post_title" id="post_title" class="geodir_textfield"
2182 2182
                    value="<?php echo esc_attr(stripslashes($title)); ?>"/>
2183
-            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory');?></span>
2183
+            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory'); ?></span>
2184 2184
         </div>
2185 2185
         <?php
2186 2186
         $show_editor = get_option('geodir_tiny_editor_on_add_listing');
@@ -2215,7 +2215,7 @@  discard block
 block discarded – undo
2215 2215
         $desc_limit_msg = apply_filters('geodir_description_field_desc_limit_msg', $desc_limit_msg, $desc_limit);
2216 2216
         
2217 2217
         $desc_class = '';
2218
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2218
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2219 2219
             /**
2220 2220
              * Called on the add listing page form for frontend just before the description field.
2221 2221
              *
@@ -2228,8 +2228,8 @@  discard block
 block discarded – undo
2228 2228
             $desc_class = ' hidden';
2229 2229
         }
2230 2230
         ?>
2231
-        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class;?>">
2232
-            <label><?php echo PLACE_DESC_TEXT;?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2231
+        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class; ?>">
2232
+            <label><?php echo PLACE_DESC_TEXT; ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2233 2233
             <?php
2234 2234
             if (!empty($show_editor) && in_array($listing_type, $show_editor)) {
2235 2235
                 $editor_settings = array('media_buttons' => false, 'textarea_rows' => 10);
@@ -2238,16 +2238,16 @@  discard block
 block discarded – undo
2238 2238
                     <?php wp_editor($desc, "post_desc", $editor_settings); ?>
2239 2239
                 </div>
2240 2240
             <?php if ($desc_limit != '') { ?>
2241
-                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit;?>");</script>
2241
+                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit; ?>");</script>
2242 2242
             <?php } } else { ?>
2243 2243
                 <textarea field_type="textarea" name="post_desc" id="post_desc" class="geodir_textarea" maxlength="<?php echo $desc_limit; ?>"><?php echo $desc; ?></textarea>
2244 2244
             <?php } if ($desc_limit_msg != '') { ?>
2245 2245
                 <span class="geodir_message_note"><?php echo $desc_limit_msg; ?></span>
2246 2246
             <?php } ?>
2247
-            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory');?></span>
2247
+            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory'); ?></span>
2248 2248
         </div>
2249 2249
         <?php
2250
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2250
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2251 2251
             /**
2252 2252
              * Called on the add listing page form for frontend just after the description field.
2253 2253
              *
@@ -2286,7 +2286,7 @@  discard block
 block discarded – undo
2286 2286
         $kw_tags_msg = apply_filters('geodir_listing_tags_field_tags_msg', $kw_tags_msg, $kw_tags_count);
2287 2287
         
2288 2288
         $tags_class = '';
2289
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2289
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2290 2290
             /**
2291 2291
              * Called on the add listing page form for frontend just before the tags field.
2292 2292
              *
@@ -2297,14 +2297,14 @@  discard block
 block discarded – undo
2297 2297
             $tags_class = ' hidden';
2298 2298
         }
2299 2299
         ?>
2300
-        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class;?>">
2300
+        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class; ?>">
2301 2301
             <label><?php echo TAGKW_TEXT; ?></label>
2302 2302
             <input name="post_tags" id="post_tags" value="<?php echo $kw_tags; ?>" type="text" class="geodir_textfield"
2303
-                   maxlength="<?php echo $kw_tags_count;?>"/>
2304
-            <span class="geodir_message_note"><?php echo $kw_tags_msg;?></span>
2303
+                   maxlength="<?php echo $kw_tags_count; ?>"/>
2304
+            <span class="geodir_message_note"><?php echo $kw_tags_msg; ?></span>
2305 2305
         </div>
2306 2306
         <?php
2307
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2307
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2308 2308
             /**
2309 2309
              * Called on the add listing page form for frontend just after the tags field.
2310 2310
              *
@@ -2330,7 +2330,7 @@  discard block
 block discarded – undo
2330 2330
         $thumb_img_arr = array();
2331 2331
         $totImg = 0;
2332 2332
         if (isset($_REQUEST['backandedit']) && empty($_REQUEST['pid'])) {
2333
-            $post = (object)$gd_session->get('listing');
2333
+            $post = (object) $gd_session->get('listing');
2334 2334
             if (isset($post->post_images))
2335 2335
                 $curImages = trim($post->post_images, ",");
2336 2336
 
@@ -2343,7 +2343,7 @@  discard block
 block discarded – undo
2343 2343
             $listing_type = $post->listing_type;
2344 2344
 
2345 2345
         } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2346
-            $post = geodir_get_post_info((int)$_REQUEST['pid']);
2346
+            $post = geodir_get_post_info((int) $_REQUEST['pid']);
2347 2347
             $listing_type = $post->post_type;
2348 2348
             $thumb_img_arr = geodir_get_images($_REQUEST['pid']);
2349 2349
 
@@ -2357,7 +2357,7 @@  discard block
 block discarded – undo
2357 2357
                 //$curImages = $img->src.",";
2358 2358
             }
2359 2359
 
2360
-            $totImg = count((array)$thumb_img_arr);
2360
+            $totImg = count((array) $thumb_img_arr);
2361 2361
         }
2362 2362
 
2363 2363
         if ($curImages != '')
@@ -2378,15 +2378,15 @@  discard block
 block discarded – undo
2378 2378
         if ($show_image_input_box) {
2379 2379
             ?>
2380 2380
 
2381
-            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT;?>
2381
+            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT; ?>
2382 2382
                 <?php if ($image_limit == 1) {
2383
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('image with this package', 'geodirectory') . ')</small>';
2383
+                    echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('image with this package', 'geodirectory').')</small>';
2384 2384
                 } ?>
2385 2385
                 <?php if ($image_limit > 1) {
2386
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('images with this package', 'geodirectory') . ')</small>';
2386
+                    echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('images with this package', 'geodirectory').')</small>';
2387 2387
                 } ?>
2388 2388
                 <?php if ($image_limit == '') {
2389
-                    echo '<br /><small>(' . __('You can upload unlimited images with this package', 'geodirectory') . ')</small>';
2389
+                    echo '<br /><small>('.__('You can upload unlimited images with this package', 'geodirectory').')</small>';
2390 2390
                 } ?>
2391 2391
             </h5>
2392 2392
 
@@ -2401,11 +2401,11 @@  discard block
 block discarded – undo
2401 2401
                 <div
2402 2402
                     class="plupload-upload-uic hide-if-no-js <?php if ($multiple): ?>plupload-upload-uic-multiple<?php endif; ?>"
2403 2403
                     id="<?php echo $id; ?>plupload-upload-ui">
2404
-                    <h4><?php _e('Drop files to upload', 'geodirectory');?></h4><br/>
2404
+                    <h4><?php _e('Drop files to upload', 'geodirectory'); ?></h4><br/>
2405 2405
                     <input id="<?php echo $id; ?>plupload-browse-button" type="button"
2406 2406
                            value="<?php esc_attr_e('Select Files', 'geodirectory'); ?>" class="geodir_button"/>
2407 2407
                     <span class="ajaxnonceplu"
2408
-                          id="ajaxnonceplu<?php echo wp_create_nonce($id . 'pluploadan'); ?>"></span>
2408
+                          id="ajaxnonceplu<?php echo wp_create_nonce($id.'pluploadan'); ?>"></span>
2409 2409
                     <?php if ($width && $height): ?>
2410 2410
                         <span class="plupload-resize"></span>
2411 2411
                         <span class="plupload-width" id="plupload-width<?php echo $width; ?>"></span>
@@ -2418,7 +2418,7 @@  discard block
 block discarded – undo
2418 2418
                      id="<?php echo $id; ?>plupload-thumbs" style="border-top:1px solid #ccc; padding-top:10px;">
2419 2419
                 </div>
2420 2420
                 <span
2421
-                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory');?></span>
2421
+                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory'); ?></span>
2422 2422
                 <span id="<?php echo $id; ?>upload-error" style="display:none"></span>
2423 2423
             </div>
2424 2424
 
@@ -2430,7 +2430,7 @@  discard block
 block discarded – undo
2430 2430
          *
2431 2431
          * @since 1.0.0
2432 2432
          */
2433
-        do_action('geodir_after_main_form_fields');?>
2433
+        do_action('geodir_after_main_form_fields'); ?>
2434 2434
 
2435 2435
 
2436 2436
         <!-- add captcha code -->
@@ -2441,7 +2441,7 @@  discard block
 block discarded – undo
2441 2441
         </script>
2442 2442
         <noscript>
2443 2443
             <div>
2444
-                <label><?php _e('Type 64 into this box', 'geodirectory');?></label>
2444
+                <label><?php _e('Type 64 into this box', 'geodirectory'); ?></label>
2445 2445
                 <input type="text" id="geodir_spamblocker_top_form" name="geodir_spamblocker" value="" maxlength="10"/>
2446 2446
             </div>
2447 2447
         </noscript>
@@ -2451,10 +2451,10 @@  discard block
 block discarded – undo
2451 2451
         <!-- end captcha code -->
2452 2452
 
2453 2453
         <div id="geodir-add-listing-submit" class="geodir_form_row clear_both" style="padding:2px;text-align:center;">
2454
-            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON;?>"
2455
-                   class="geodir_button" <?php echo $submit_button;?>/>
2454
+            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON; ?>"
2455
+                   class="geodir_button" <?php echo $submit_button; ?>/>
2456 2456
             <span class="geodir_message_note"
2457
-                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory');?></span>
2457
+                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory'); ?></span>
2458 2458
         </div>
2459 2459
 
2460 2460
     </form>
@@ -2516,7 +2516,7 @@  discard block
 block discarded – undo
2516 2516
         class="<?php
2517 2517
         /** This action is documented in geodirectory_template_actions.php */
2518 2518
         echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'Reg/Login Top Section'); ?>">
2519
-        <?php dynamic_sidebar('Reg/Login Top Section');?>
2519
+        <?php dynamic_sidebar('Reg/Login Top Section'); ?>
2520 2520
     </div><!-- clearfix ends here-->
2521 2521
 <?php
2522 2522
 }
@@ -2538,7 +2538,7 @@  discard block
 block discarded – undo
2538 2538
 
2539 2539
     ?>
2540 2540
     <script type="text/javascript">
2541
-        <?php if ( $user_login ) { ?>
2541
+        <?php if ($user_login) { ?>
2542 2542
         setTimeout(function () {
2543 2543
             try {
2544 2544
                 d = document.getElementById('user_pass');
@@ -2555,7 +2555,7 @@  discard block
 block discarded – undo
2555 2555
         <?php } ?>
2556 2556
     </script>
2557 2557
     <script type="text/javascript">
2558
-        <?php if ( $user_login ) { ?>
2558
+        <?php if ($user_login) { ?>
2559 2559
         setTimeout(function () {
2560 2560
             try {
2561 2561
                 d = document.getElementById('user_pass');
@@ -2580,7 +2580,7 @@  discard block
 block discarded – undo
2580 2580
         foreach ($errors as $errorsObj) {
2581 2581
             foreach ($errorsObj as $key => $val) {
2582 2582
                 for ($i = 0; $i < count($val); $i++) {
2583
-                    echo "<div class=sucess_msg>" . $val[$i] . '</div>';
2583
+                    echo "<div class=sucess_msg>".$val[$i].'</div>';
2584 2584
                     $registration_error_msg = 1;
2585 2585
                 }
2586 2586
             }
@@ -2597,7 +2597,7 @@  discard block
 block discarded – undo
2597 2597
              *
2598 2598
              * @since 1.0.0
2599 2599
              */
2600
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2600
+            include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
2601 2601
         </div>
2602 2602
 
2603 2603
     <?php } elseif (isset($_REQUEST['page']) && $_REQUEST['page'] == 'login' && isset($_REQUEST['page1']) && $_REQUEST['page1'] == 'sign_up') { ?>
@@ -2609,7 +2609,7 @@  discard block
 block discarded – undo
2609 2609
              *
2610 2610
              * @since 1.0.0
2611 2611
              */
2612
-            include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2612
+            include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
2613 2613
         </div>
2614 2614
 
2615 2615
     <?php } else { ?>
@@ -2621,7 +2621,7 @@  discard block
 block discarded – undo
2621 2621
              *
2622 2622
              * @since 1.0.0
2623 2623
              */
2624
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2624
+            include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
2625 2625
         </div>
2626 2626
         <div class="registration_form_r">
2627 2627
             <?php
@@ -2630,7 +2630,7 @@  discard block
 block discarded – undo
2630 2630
              *
2631 2631
              * @since 1.0.0
2632 2632
              */
2633
-            include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2633
+            include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
2634 2634
         </div>
2635 2635
 
2636 2636
     <?php }?>
@@ -2666,12 +2666,12 @@  discard block
 block discarded – undo
2666 2666
     $gd_post_type = geodir_get_current_posttype();
2667 2667
     $post_type_info = get_post_type_object($gd_post_type);
2668 2668
 
2669
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
2669
+    $add_string_in_title = __('All', 'geodirectory').' ';
2670 2670
     if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2671
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
2671
+        $add_string_in_title = __('My Favorite', 'geodirectory').' ';
2672 2672
     }
2673 2673
 
2674
-    $list_title = $add_string_in_title . $post_type_info->labels->name;
2674
+    $list_title = $add_string_in_title.$post_type_info->labels->name;
2675 2675
     $single_name = $post_type_info->labels->singular_name;
2676 2676
 
2677 2677
     $taxonomy = geodir_get_taxonomies($gd_post_type);
@@ -2679,12 +2679,12 @@  discard block
 block discarded – undo
2679 2679
     if (!empty($term)) {
2680 2680
         $current_term = get_term_by('slug', $term, $taxonomy[0]);
2681 2681
         if (!empty($current_term))
2682
-            $list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'";
2682
+            $list_title .= __(' in', 'geodirectory')." '".geodir_ucwords($current_term->name)."'";
2683 2683
     }
2684 2684
 
2685 2685
 
2686 2686
     if (is_search()) {
2687
-        $list_title = __('Search', 'geodirectory') . ' ' . __($post_type_info->labels->name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2687
+        $list_title = __('Search', 'geodirectory').' '.__($post_type_info->labels->name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
2688 2688
 
2689 2689
     }
2690 2690
     /** This action is documented in geodirectory_template_actions.php */
@@ -2693,11 +2693,11 @@  discard block
 block discarded – undo
2693 2693
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2694 2694
 
2695 2695
     $title = $list_title;
2696
-    if(geodir_is_page('author')){
2696
+    if (geodir_is_page('author')) {
2697 2697
         $gd_page = 'author';
2698
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
2698
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2699 2699
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
2700
-        }else{
2700
+        } else {
2701 2701
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
2702 2702
         }
2703 2703
 
@@ -2711,16 +2711,16 @@  discard block
 block discarded – undo
2711 2711
      * @param string $title The page title including variables.
2712 2712
      * @param string $gd_page The GeoDirectory page type if any.
2713 2713
      */
2714
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2714
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2715 2715
 
2716
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2716
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
2717 2717
         /**
2718 2718
          * Filter the author page title text.
2719 2719
          *
2720 2720
          * @since 1.0.0
2721 2721
          * @param string $list_title The title for the page.
2722 2722
          */
2723
-        apply_filters('geodir_author_page_title_text', $title) . '</h1></header>';
2723
+        apply_filters('geodir_author_page_title_text', $title).'</h1></header>';
2724 2724
 }
2725 2725
 
2726 2726
 
@@ -2925,19 +2925,19 @@  discard block
 block discarded – undo
2925 2925
     $post_type_info = get_post_type_object($gd_post_type);
2926 2926
 
2927 2927
     $pt_name = '';
2928
-    if(isset($post_type_info->labels->name)){$pt_name=$post_type_info->labels->name;}
2928
+    if (isset($post_type_info->labels->name)) {$pt_name = $post_type_info->labels->name; }
2929 2929
 
2930 2930
     if (is_search()) {
2931
-        $list_title = __('Search', 'geodirectory') . ' ' . __($pt_name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2931
+        $list_title = __('Search', 'geodirectory').' '.__($pt_name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
2932 2932
 
2933 2933
     }
2934 2934
     /** This action is documented in geodirectory_template_actions.php */
2935 2935
     $class = apply_filters('geodir_page_title_class', 'entry-title fn');
2936 2936
     /** This action is documented in geodirectory_template_actions.php */
2937 2937
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2938
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2938
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
2939 2939
         /** This action is documented in geodirectory_template_actions.php */
2940
-        apply_filters('geodir_listing_page_title', wptexturize($list_title)) . '</h1></header>';
2940
+        apply_filters('geodir_listing_page_title', wptexturize($list_title)).'</h1></header>';
2941 2941
 }
2942 2942
 
2943 2943
 // action for adding the listings page top widget area
@@ -3341,7 +3341,7 @@  discard block
 block discarded – undo
3341 3341
         $gd_post_type = geodir_get_current_posttype();
3342 3342
         $post_type_info = get_post_type_object($gd_post_type);
3343 3343
 
3344
-        $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' :', 'geodirectory');
3344
+        $list_title = __('Search', 'geodirectory').' '.__(ucfirst($post_type_info->labels->name), 'geodirectory').__(' :', 'geodirectory');
3345 3345
     }
3346 3346
     return $list_title;
3347 3347
 }
@@ -3357,7 +3357,7 @@  discard block
 block discarded – undo
3357 3357
  * @param string $position Position to add the post content. 'before' or 'after'. Default 'before'.
3358 3358
  * @param string $gd_page The geodirectory page type. Default null.
3359 3359
  */
3360
-function geodir_add_page_content( $position = 'before', $gd_page = '' ) {
3360
+function geodir_add_page_content($position = 'before', $gd_page = '') {
3361 3361
     global $post;
3362 3362
         
3363 3363
     $gd_page_id = NULL;
Please login to merge, or discard this patch.