Passed
Pull Request — master (#253)
by Viruthagiri
15:37
created
geodirectory_template_actions.php 1 patch
Spacing   +158 added lines, -158 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
@@ -1138,8 +1138,8 @@  discard block
 block discarded – undo
1138 1138
                 $post_term = trim($post_term);
1139 1139
 
1140 1140
                 $priority_location = false;
1141
-                if ($insert_term = term_exists($post_term, $post_type . '_tags')) {
1142
-                    $term = get_term_by('id', $insert_term['term_id'], $post_type . '_tags');
1141
+                if ($insert_term = term_exists($post_term, $post_type.'_tags')) {
1142
+                    $term = get_term_by('id', $insert_term['term_id'], $post_type.'_tags');
1143 1143
                 } else {
1144 1144
                     $post_country = isset($_REQUEST['post_country']) && $_REQUEST['post_country'] != '' ? sanitize_text_field($_REQUEST['post_country']) : NULL;
1145 1145
                     $post_region = isset($_REQUEST['post_region']) && $_REQUEST['post_region'] != '' ? sanitize_text_field($_REQUEST['post_region']) : NULL;
@@ -1149,10 +1149,10 @@  discard block
 block discarded – undo
1149 1149
                     $match_city = $post_city && sanitize_title($post_term) == sanitize_title($post_city) ? true : false;
1150 1150
                     if ($match_country || $match_region || $match_city) {
1151 1151
                         $priority_location = true;
1152
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1152
+                        $term = get_term_by('name', $post_term, $post_type.'_tags');
1153 1153
                     } else {
1154
-                        $insert_term = wp_insert_term($post_term, $post_type . '_tags');
1155
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1154
+                        $insert_term = wp_insert_term($post_term, $post_type.'_tags');
1155
+                        $term = get_term_by('name', $post_term, $post_type.'_tags');
1156 1156
                     }
1157 1157
                 }
1158 1158
 
@@ -1169,12 +1169,12 @@  discard block
 block discarded – undo
1169 1169
                          * @param string $tag_link The tag link html.
1170 1170
                          * @param object $term The tag term object.
1171 1171
                          */
1172
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1172
+                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
1173 1173
                         $links[] = $tag_link;
1174 1174
                     } else {
1175
-                        $tag_link = "<a href='" . esc_attr(get_term_link($term->term_id, $term->taxonomy)) . "'>$term->name</a>";
1175
+                        $tag_link = "<a href='".esc_attr(get_term_link($term->term_id, $term->taxonomy))."'>$term->name</a>";
1176 1176
                         /** This action is documented in geodirectory-template_actions.php */
1177
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1177
+                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
1178 1178
                         $links[] = $tag_link;
1179 1179
                     }
1180 1180
                     $terms[] = $term;
@@ -1184,7 +1184,7 @@  discard block
 block discarded – undo
1184 1184
             if (!isset($listing_label)) {
1185 1185
                 $listing_label = '';
1186 1186
             }
1187
-            $taxonomies[$post_type . '_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1187
+            $taxonomies[$post_type.'_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
1188 1188
         endif;
1189 1189
 
1190 1190
     }
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
                     $term = get_term_by('id', $post_term, $post_taxonomy);
1213 1213
 
1214 1214
                     if (is_object($term)) {
1215
-                        $term_link = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>$term->name</a>";
1215
+                        $term_link = "<a href='".esc_attr(get_term_link($term, $post_taxonomy))."'>$term->name</a>";
1216 1216
                         /**
1217 1217
                          * Filter the category name on the details page.
1218 1218
                          *
@@ -1220,7 +1220,7 @@  discard block
 block discarded – undo
1220 1220
                          * @param string $term_link The link html to the category.
1221 1221
                          * @param object $term The category term object.
1222 1222
                          */
1223
-                        $term_link = apply_filters('geodir_details_taxonomies_cat_link',$term_link,$term);
1223
+                        $term_link = apply_filters('geodir_details_taxonomies_cat_link', $term_link, $term);
1224 1224
                         $links[] = $term_link;
1225 1225
                         $terms[] = $term;
1226 1226
                     }
@@ -1238,7 +1238,7 @@  discard block
 block discarded – undo
1238 1238
         if (!isset($listing_label)) {
1239 1239
             $listing_label = '';
1240 1240
         }
1241
-        $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1241
+        $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
1242 1242
 
1243 1243
     }
1244 1244
 
@@ -1251,14 +1251,14 @@  discard block
 block discarded – undo
1251 1251
      * @param string $listing_label The post type label.
1252 1252
      * @param string $listing_label The post type label with ucwords function.
1253 1253
      */
1254
-    $taxonomies = apply_filters('geodir_details_taxonomies_output',$taxonomies,$post_type,$listing_label,geodir_ucwords($listing_label));
1254
+    $taxonomies = apply_filters('geodir_details_taxonomies_output', $taxonomies, $post_type, $listing_label, geodir_ucwords($listing_label));
1255 1255
 
1256 1256
     if (isset($taxonomies[$post_taxonomy])) {
1257
-        echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
1257
+        echo '<span class="geodir-category">'.$taxonomies[$post_taxonomy].'</span>';
1258 1258
     }
1259 1259
 
1260
-    if (isset($taxonomies[$post_type . '_tags']))
1261
-        echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
1260
+    if (isset($taxonomies[$post_type.'_tags']))
1261
+        echo '<span class="geodir-tags">'.$taxonomies[$post_type.'_tags'].'</span>';
1262 1262
 
1263 1263
     ?>
1264 1264
     </p><?php
@@ -1279,11 +1279,11 @@  discard block
 block discarded – undo
1279 1279
  * @param object $post Optional. The post object or blank.
1280 1280
  * @package GeoDirectory
1281 1281
  */
1282
-function geodir_action_details_micordata($post='')
1282
+function geodir_action_details_micordata($post = '')
1283 1283
 {
1284 1284
 
1285 1285
     global $preview;
1286
-    if(empty($post)){global $post;}
1286
+    if (empty($post)) {global $post; }
1287 1287
     if ($preview || !geodir_is_page('detail')) {
1288 1288
         return;
1289 1289
     }
@@ -1304,7 +1304,7 @@  discard block
 block discarded – undo
1304 1304
                 "description" => $review->comment_content,
1305 1305
                 "reviewRating" => array(
1306 1306
                     "@type" => "Rating",
1307
-                    "bestRating" => "5",// @todo this will need to be filtered for review manager if user changes the score.
1307
+                    "bestRating" => "5", // @todo this will need to be filtered for review manager if user changes the score.
1308 1308
                     "ratingValue" => geodir_get_commentoverall($review->comment_ID),
1309 1309
                     "worstRating" => "1"
1310 1310
                 )
@@ -1332,13 +1332,13 @@  discard block
 block discarded – undo
1332 1332
     }
1333 1333
     //print_r($post);
1334 1334
     // external links
1335
-    $external_links =  array();
1335
+    $external_links = array();
1336 1336
     $external_links[] = $post->geodir_website;
1337 1337
     $external_links[] = $post->geodir_twitter;
1338 1338
     $external_links[] = $post->geodir_facebook;
1339 1339
     $external_links = array_filter($external_links);
1340 1340
 
1341
-    if(!empty($external_links)){
1341
+    if (!empty($external_links)) {
1342 1342
         $external_links = array_values($external_links);
1343 1343
     }
1344 1344
 
@@ -1348,17 +1348,17 @@  discard block
 block discarded – undo
1348 1348
 
1349 1349
     // schema type
1350 1350
     $schema_type = 'LocalBusiness';
1351
-    if(isset($post->default_category) && $post->default_category){
1351
+    if (isset($post->default_category) && $post->default_category) {
1352 1352
         $cat_schema = get_tax_meta($post->default_category, 'ct_cat_schema', false, $post->post_type);
1353
-        if($cat_schema){$schema_type = $cat_schema;}
1354
-        if(!$schema_type && $post->post_type=='gd_event'){$schema_type = 'Event';}
1353
+        if ($cat_schema) {$schema_type = $cat_schema; }
1354
+        if (!$schema_type && $post->post_type == 'gd_event') {$schema_type = 'Event'; }
1355 1355
     }
1356 1356
 
1357 1357
     $schema = array();
1358 1358
     $schema['@context'] = "http://schema.org";
1359 1359
     $schema['@type'] = $schema_type;
1360 1360
     $schema['name'] = $post->post_name;
1361
-    $schema['description'] = wp_strip_all_tags( $post->post_content, true );
1361
+    $schema['description'] = wp_strip_all_tags($post->post_content, true);
1362 1362
     $schema['telephone'] = $post->geodir_contact;
1363 1363
     $schema['url'] = $c_url;
1364 1364
     $schema['sameAs'] = $external_links;
@@ -1372,7 +1372,7 @@  discard block
 block discarded – undo
1372 1372
         "postalCode" => $post->post_zip
1373 1373
     );
1374 1374
 
1375
-    if($post->post_latitude && $post->post_longitude) {
1375
+    if ($post->post_latitude && $post->post_longitude) {
1376 1376
         $schema['geo'] = array(
1377 1377
             "@type" => "GeoCoordinates",
1378 1378
             "latitude" => $post->post_latitude,
@@ -1380,7 +1380,7 @@  discard block
 block discarded – undo
1380 1380
         );
1381 1381
     }
1382 1382
 
1383
-    if($post_avgratings) {
1383
+    if ($post_avgratings) {
1384 1384
         $schema['aggregateRating'] = array(
1385 1385
             "@type" => "AggregateRating",
1386 1386
             "ratingValue" => $post_avgratings,
@@ -1399,10 +1399,10 @@  discard block
 block discarded – undo
1399 1399
      * @param array $schema The array of schema data to be filtered.
1400 1400
      * @param object $post The post object.
1401 1401
      */
1402
-    $schema = apply_filters('geodir_details_schema', $schema,$post);
1402
+    $schema = apply_filters('geodir_details_schema', $schema, $post);
1403 1403
 
1404 1404
 
1405
-    echo '<script type="application/ld+json">' . json_encode($schema) . '</script>';
1405
+    echo '<script type="application/ld+json">'.json_encode($schema).'</script>';
1406 1406
 
1407 1407
 }
1408 1408
 
@@ -1423,9 +1423,9 @@  discard block
 block discarded – undo
1423 1423
     ?>
1424 1424
     <div class="geodir-pos_navigation clearfix">
1425 1425
     <div
1426
-        class="geodir-post_left"><?php previous_post_link('%link', '' . __('Previous', 'geodirectory'), false) ?></div>
1426
+        class="geodir-post_left"><?php previous_post_link('%link', ''.__('Previous', 'geodirectory'), false) ?></div>
1427 1427
     <div
1428
-        class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory') . '', false) ?></div>
1428
+        class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory').'', false) ?></div>
1429 1429
     </div><?php
1430 1430
 }
1431 1431
 
@@ -1494,12 +1494,12 @@  discard block
 block discarded – undo
1494 1494
     $gd_post_type = geodir_get_current_posttype();
1495 1495
     $post_type_info = get_post_type_object($gd_post_type);
1496 1496
 
1497
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
1497
+    $add_string_in_title = __('All', 'geodirectory').' ';
1498 1498
     if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1499
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
1499
+        $add_string_in_title = __('My Favorite', 'geodirectory').' ';
1500 1500
     }
1501 1501
 
1502
-    $list_title = $add_string_in_title . __(ucfirst($post_type_info->labels->name), 'geodirectory');
1502
+    $list_title = $add_string_in_title.__(ucfirst($post_type_info->labels->name), 'geodirectory');
1503 1503
     $single_name = $post_type_info->labels->singular_name;
1504 1504
 
1505 1505
     $taxonomy = geodir_get_taxonomies($gd_post_type, true);
@@ -1527,12 +1527,12 @@  discard block
 block discarded – undo
1527 1527
         $current_term = get_term_by('slug', $term, $taxonomy[0]);
1528 1528
         if (!empty($current_term)) {
1529 1529
             $current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1530
-            if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1530
+            if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
1531 1531
                 $location_last_char = substr($location_name, -1);
1532 1532
                 $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1533
-                $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1533
+                $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
1534 1534
             } else {
1535
-                $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1535
+                $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
1536 1536
             }
1537 1537
         } else {
1538 1538
             if (count($taxonomy) > 1) {
@@ -1540,12 +1540,12 @@  discard block
 block discarded – undo
1540 1540
 
1541 1541
                 if (!empty($current_term)) {
1542 1542
                     $current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1543
-                    if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1543
+                    if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
1544 1544
                         $location_last_char = substr($location_name, -1);
1545 1545
                         $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1546
-                        $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1546
+                        $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
1547 1547
                     } else {
1548
-                        $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1548
+                        $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
1549 1549
                     }
1550 1550
                 }
1551 1551
             }
@@ -1573,7 +1573,7 @@  discard block
 block discarded – undo
1573 1573
                 $gd_city = __(geodir_ucwords($gd_city), 'geodirectory');
1574 1574
             }
1575 1575
 
1576
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_city . "'";
1576
+            $list_title .= __(' in', 'geodirectory')." '".$gd_city."'";
1577 1577
         } else if ($gd_region != '') {
1578 1578
             if ($gd_region_actual != '') {
1579 1579
                 $gd_region = $gd_region_actual;
@@ -1583,7 +1583,7 @@  discard block
 block discarded – undo
1583 1583
                 $gd_region = __(geodir_ucwords($gd_region), 'geodirectory');
1584 1584
             }
1585 1585
 
1586
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_region . "'";
1586
+            $list_title .= __(' in', 'geodirectory')." '".$gd_region."'";
1587 1587
         } else if ($gd_country != '') {
1588 1588
             if ($gd_country_actual != '') {
1589 1589
                 $gd_country = $gd_country_actual;
@@ -1593,12 +1593,12 @@  discard block
 block discarded – undo
1593 1593
                 $gd_country = __(geodir_ucwords($gd_country), 'geodirectory');
1594 1594
             }
1595 1595
 
1596
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_country . "'";
1596
+            $list_title .= __(' in', 'geodirectory')." '".$gd_country."'";
1597 1597
         }
1598 1598
     }
1599 1599
 
1600 1600
     if (is_search()) {
1601
-        $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
1601
+        $list_title = __('Search', 'geodirectory').' '.__(ucfirst($post_type_info->labels->name), 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
1602 1602
     }
1603 1603
     /** This action is documented in geodirectory_template_actions.php */
1604 1604
     $class = apply_filters('geodir_page_title_class', 'entry-title fn');
@@ -1607,26 +1607,26 @@  discard block
 block discarded – undo
1607 1607
 
1608 1608
 
1609 1609
     $title = $list_title;
1610
-    if(geodir_is_page('pt')){
1610
+    if (geodir_is_page('pt')) {
1611 1611
         $gd_page = 'pt';
1612
-        $title  = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1612
+        $title = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1613 1613
     }
1614
-    elseif(geodir_is_page('listing')){
1614
+    elseif (geodir_is_page('listing')) {
1615 1615
         $gd_page = 'listing';
1616 1616
         global $wp_query;
1617 1617
         $current_term = $wp_query->get_queried_object();
1618
-        if (strpos($current_term->taxonomy,'_tags') !== false) {
1618
+        if (strpos($current_term->taxonomy, '_tags') !== false) {
1619 1619
             $title = (get_option('geodir_page_title_tag-listing')) ? get_option('geodir_page_title_tag-listing') : $title;
1620
-        }else{
1620
+        } else {
1621 1621
             $title = (get_option('geodir_page_title_cat-listing')) ? get_option('geodir_page_title_cat-listing') : $title;
1622 1622
         }
1623 1623
 
1624 1624
     }
1625
-    elseif(geodir_is_page('author')){
1625
+    elseif (geodir_is_page('author')) {
1626 1626
         $gd_page = 'author';
1627
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
1627
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1628 1628
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
1629
-        }else{
1629
+        } else {
1630 1630
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
1631 1631
         }
1632 1632
 
@@ -1640,16 +1640,16 @@  discard block
 block discarded – undo
1640 1640
      * @param string $title The page title including variables.
1641 1641
      * @param string $gd_page The GeoDirectory page type if any.
1642 1642
      */
1643
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1643
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1644 1644
 
1645
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
1645
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
1646 1646
         /**
1647 1647
          * Filter the listing page title.
1648 1648
          *
1649 1649
          * @since 1.0.0
1650 1650
          * @param string $list_title The title for the category page.
1651 1651
          */
1652
-        apply_filters('geodir_listing_page_title', $title) . '</h1></header>';
1652
+        apply_filters('geodir_listing_page_title', $title).'</h1></header>';
1653 1653
 }
1654 1654
 
1655 1655
 add_action('geodir_listings_page_description', 'geodir_action_listings_description', 10);
@@ -1668,7 +1668,7 @@  discard block
 block discarded – undo
1668 1668
     $gd_post_type = geodir_get_current_posttype();
1669 1669
     if (isset($current_term->term_id) && $current_term->term_id != '') {
1670 1670
 
1671
-        $term_desc = term_description($current_term->term_id, $gd_post_type . '_tags');
1671
+        $term_desc = term_description($current_term->term_id, $gd_post_type.'_tags');
1672 1672
         $saved_data = stripslashes(get_tax_meta($current_term->term_id, 'ct_cat_top_desc', false, $gd_post_type));
1673 1673
         if ($term_desc && !$saved_data) {
1674 1674
             $saved_data = $term_desc;
@@ -1685,7 +1685,7 @@  discard block
 block discarded – undo
1685 1685
         if ($cat_description) {
1686 1686
             ?>
1687 1687
 
1688
-            <div class="term_description"><?php echo $cat_description;?></div> <?php
1688
+            <div class="term_description"><?php echo $cat_description; ?></div> <?php
1689 1689
         }
1690 1690
 
1691 1691
     }
@@ -1735,13 +1735,13 @@  discard block
 block discarded – undo
1735 1735
 function geodir_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '')
1736 1736
 {
1737 1737
     if ($type == 'home-page' && $width = get_option('geodir_width_home_left_section')) {
1738
-        $width_css = 'style="width:' . $width . '%;"';
1738
+        $width_css = 'style="width:'.$width.'%;"';
1739 1739
     } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_left_section')) {
1740
-        $width_css = 'style="width:' . $width . '%;"';
1740
+        $width_css = 'style="width:'.$width.'%;"';
1741 1741
     } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_left_section')) {
1742
-        $width_css = 'style="width:' . $width . '%;"';
1742
+        $width_css = 'style="width:'.$width.'%;"';
1743 1743
     } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_left_section')) {
1744
-        $width_css = 'style="width:' . $width . '%;"';
1744
+        $width_css = 'style="width:'.$width.'%;"';
1745 1745
     } else {
1746 1746
         $width_css = '';
1747 1747
     }
@@ -2046,11 +2046,11 @@  discard block
 block discarded – undo
2046 2046
 
2047 2047
     $title = apply_filters('geodir_add_listing_page_title_text', get_the_title());
2048 2048
 
2049
-    if(geodir_is_page('add-listing')){
2049
+    if (geodir_is_page('add-listing')) {
2050 2050
         $gd_page = 'add-listing';
2051
-        if(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){
2051
+        if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2052 2052
             $title = (get_option('geodir_page_title_edit-listing')) ? get_option('geodir_page_title_edit-listing') : $title;
2053
-        }elseif(isset($listing_type)){
2053
+        }elseif (isset($listing_type)) {
2054 2054
             $title = (get_option('geodir_page_title_add-listing')) ? get_option('geodir_page_title_add-listing') : $title;
2055 2055
         }
2056 2056
 
@@ -2064,9 +2064,9 @@  discard block
 block discarded – undo
2064 2064
      * @param string $title The page title including variables.
2065 2065
      * @param string $gd_page The GeoDirectory page type if any.
2066 2066
      */
2067
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2067
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2068 2068
 
2069
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">';
2069
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">';
2070 2070
     echo $title;
2071 2071
     echo '</h1></header>';
2072 2072
 }
@@ -2080,7 +2080,7 @@  discard block
 block discarded – undo
2080 2080
  */
2081 2081
 function geodir_action_add_listing_page_mandatory()
2082 2082
 {?>
2083
-    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT;?></p>
2083
+    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT; ?></p>
2084 2084
 <?php
2085 2085
 }
2086 2086
 
@@ -2115,7 +2115,7 @@  discard block
 block discarded – undo
2115 2115
 
2116 2116
     if (isset($_REQUEST['backandedit'])) {
2117 2117
         global $post;
2118
-        $post = (object)$gd_session->get('listing');
2118
+        $post = (object) $gd_session->get('listing');
2119 2119
         $listing_type = $post->listing_type;
2120 2120
         $title = $post->post_title;
2121 2121
         $desc = $post->post_desc;
@@ -2130,7 +2130,7 @@  discard block
 block discarded – undo
2130 2130
         $thumb_img_arr = geodir_get_images($post->ID);
2131 2131
         if ($thumb_img_arr) {
2132 2132
             foreach ($thumb_img_arr as $post_img) {
2133
-                $curImages .= $post_img->src . ',';
2133
+                $curImages .= $post_img->src.',';
2134 2134
             }
2135 2135
         }
2136 2136
 
@@ -2138,7 +2138,7 @@  discard block
 block discarded – undo
2138 2138
         $title = $post->post_title;
2139 2139
         $desc = $post->post_content;
2140 2140
         $kw_tags = $post->post_tags;
2141
-        $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type . '_tags', array('fields' => 'names')));
2141
+        $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type.'_tags', array('fields' => 'names')));
2142 2142
     } else {
2143 2143
         $listing_type = sanitize_text_field($_REQUEST['listing_type']);
2144 2144
     }
@@ -2149,18 +2149,18 @@  discard block
 block discarded – undo
2149 2149
 
2150 2150
     $post_type_info = geodir_get_posttype_info($listing_type);
2151 2151
 
2152
-    $cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? $post_type_info['labels']['singular_name'] : __('Listing','geodirectory');
2152
+    $cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? $post_type_info['labels']['singular_name'] : __('Listing', 'geodirectory');
2153 2153
 
2154 2154
     ?>
2155
-    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id());?>" method="post" enctype="multipart/form-data">
2156
-        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type);?>"/>
2157
-        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type);?>"/>
2155
+    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id()); ?>" method="post" enctype="multipart/form-data">
2156
+        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2157
+        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2158 2158
         <?php if ($page_id) { ?>
2159
-        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id;?>"/>
2159
+        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id; ?>"/>
2160 2160
         <?php } if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { ?>
2161
-            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']);?>"/>
2161
+            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']); ?>"/>
2162 2162
         <?php } if (isset($_REQUEST['backandedit'])) { ?>
2163
-            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']);?>"/>
2163
+            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']); ?>"/>
2164 2164
         <?php
2165 2165
         } 
2166 2166
         /**
@@ -2172,7 +2172,7 @@  discard block
 block discarded – undo
2172 2172
          */
2173 2173
         do_action('geodir_before_detail_fields');
2174 2174
         ?>
2175
-        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT;?></h5>
2175
+        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT; ?></h5>
2176 2176
         <?php
2177 2177
         /**
2178 2178
          * Called at the top of the add listing page form for frontend.
@@ -2184,10 +2184,10 @@  discard block
 block discarded – undo
2184 2184
         do_action('geodir_before_main_form_fields');
2185 2185
         ?>
2186 2186
         <div id="geodir_post_title_row" class="required_field geodir_form_row clearfix gd-fieldset-details">
2187
-            <label><?php echo sprintf( __('%s Title', 'geodirectory'), $cpt_singular_name ); ?><span>*</span> </label>
2187
+            <label><?php echo sprintf(__('%s Title', 'geodirectory'), $cpt_singular_name); ?><span>*</span> </label>
2188 2188
             <input type="text" field_type="text" name="post_title" id="post_title" class="geodir_textfield"
2189 2189
                    value="<?php echo esc_attr(stripslashes($title)); ?>"/>
2190
-            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory');?></span>
2190
+            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory'); ?></span>
2191 2191
         </div>
2192 2192
         <?php
2193 2193
         $show_editor = get_option('geodir_tiny_editor_on_add_listing');
@@ -2222,7 +2222,7 @@  discard block
 block discarded – undo
2222 2222
         $desc_limit_msg = apply_filters('geodir_description_field_desc_limit_msg', $desc_limit_msg, $desc_limit);
2223 2223
         
2224 2224
         $desc_class = '';
2225
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2225
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2226 2226
             /**
2227 2227
              * Called on the add listing page form for frontend just before the description field.
2228 2228
              *
@@ -2235,8 +2235,8 @@  discard block
 block discarded – undo
2235 2235
             $desc_class = ' hidden';
2236 2236
         }
2237 2237
         ?>
2238
-        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class;?>">
2239
-            <label><?php echo sprintf( __('%s Description', 'geodirectory'), $cpt_singular_name ); ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2238
+        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class; ?>">
2239
+            <label><?php echo sprintf(__('%s Description', 'geodirectory'), $cpt_singular_name); ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2240 2240
             <?php
2241 2241
             if (!empty($show_editor) && in_array($listing_type, $show_editor)) {
2242 2242
                 $editor_settings = array('media_buttons' => false, 'textarea_rows' => 10);
@@ -2245,16 +2245,16 @@  discard block
 block discarded – undo
2245 2245
                     <?php wp_editor($desc, "post_desc", $editor_settings); ?>
2246 2246
                 </div>
2247 2247
             <?php if ($desc_limit != '') { ?>
2248
-                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit;?>");</script>
2248
+                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit; ?>");</script>
2249 2249
             <?php } } else { ?>
2250 2250
                 <textarea field_type="textarea" name="post_desc" id="post_desc" class="geodir_textarea" maxlength="<?php echo $desc_limit; ?>"><?php echo $desc; ?></textarea>
2251 2251
             <?php } if ($desc_limit_msg != '') { ?>
2252 2252
                 <span class="geodir_message_note"><?php echo $desc_limit_msg; ?></span>
2253 2253
             <?php } ?>
2254
-            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory');?></span>
2254
+            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory'); ?></span>
2255 2255
         </div>
2256 2256
         <?php
2257
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2257
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2258 2258
             /**
2259 2259
              * Called on the add listing page form for frontend just after the description field.
2260 2260
              *
@@ -2293,7 +2293,7 @@  discard block
 block discarded – undo
2293 2293
         $kw_tags_msg = apply_filters('geodir_listing_tags_field_tags_msg', $kw_tags_msg, $kw_tags_count);
2294 2294
         
2295 2295
         $tags_class = '';
2296
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2296
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2297 2297
             /**
2298 2298
              * Called on the add listing page form for frontend just before the tags field.
2299 2299
              *
@@ -2304,14 +2304,14 @@  discard block
 block discarded – undo
2304 2304
             $tags_class = ' hidden';
2305 2305
         }
2306 2306
         ?>
2307
-        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class;?>">
2307
+        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class; ?>">
2308 2308
             <label><?php echo TAGKW_TEXT; ?></label>
2309 2309
             <input name="post_tags" id="post_tags" value="<?php echo $kw_tags; ?>" type="text" class="geodir_textfield"
2310
-                   maxlength="<?php echo $kw_tags_count;?>"/>
2311
-            <span class="geodir_message_note"><?php echo $kw_tags_msg;?></span>
2310
+                   maxlength="<?php echo $kw_tags_count; ?>"/>
2311
+            <span class="geodir_message_note"><?php echo $kw_tags_msg; ?></span>
2312 2312
         </div>
2313 2313
         <?php
2314
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2314
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2315 2315
             /**
2316 2316
              * Called on the add listing page form for frontend just after the tags field.
2317 2317
              *
@@ -2337,7 +2337,7 @@  discard block
 block discarded – undo
2337 2337
         $thumb_img_arr = array();
2338 2338
         $totImg = 0;
2339 2339
         if (isset($_REQUEST['backandedit']) && empty($_REQUEST['pid'])) {
2340
-            $post = (object)$gd_session->get('listing');
2340
+            $post = (object) $gd_session->get('listing');
2341 2341
             if (isset($post->post_images))
2342 2342
                 $curImages = trim($post->post_images, ",");
2343 2343
 
@@ -2350,7 +2350,7 @@  discard block
 block discarded – undo
2350 2350
             $listing_type = $post->listing_type;
2351 2351
 
2352 2352
         } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2353
-            $post = geodir_get_post_info((int)$_REQUEST['pid']);
2353
+            $post = geodir_get_post_info((int) $_REQUEST['pid']);
2354 2354
             $listing_type = $post->post_type;
2355 2355
             $thumb_img_arr = geodir_get_images($_REQUEST['pid']);
2356 2356
 
@@ -2364,7 +2364,7 @@  discard block
 block discarded – undo
2364 2364
                 //$curImages = $img->src.",";
2365 2365
             }
2366 2366
 
2367
-            $totImg = count((array)$thumb_img_arr);
2367
+            $totImg = count((array) $thumb_img_arr);
2368 2368
         }
2369 2369
 
2370 2370
         if ($curImages != '')
@@ -2385,15 +2385,15 @@  discard block
 block discarded – undo
2385 2385
         if ($show_image_input_box) {
2386 2386
             ?>
2387 2387
 
2388
-            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT;?>
2388
+            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT; ?>
2389 2389
                 <?php if ($image_limit == 1) {
2390
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('image with this package', 'geodirectory') . ')</small>';
2390
+                    echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('image with this package', 'geodirectory').')</small>';
2391 2391
                 } ?>
2392 2392
                 <?php if ($image_limit > 1) {
2393
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('images with this package', 'geodirectory') . ')</small>';
2393
+                    echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('images with this package', 'geodirectory').')</small>';
2394 2394
                 } ?>
2395 2395
                 <?php if ($image_limit == '') {
2396
-                    echo '<br /><small>(' . __('You can upload unlimited images with this package', 'geodirectory') . ')</small>';
2396
+                    echo '<br /><small>('.__('You can upload unlimited images with this package', 'geodirectory').')</small>';
2397 2397
                 } ?>
2398 2398
             </h5>
2399 2399
 
@@ -2408,11 +2408,11 @@  discard block
 block discarded – undo
2408 2408
                 <div
2409 2409
                     class="plupload-upload-uic hide-if-no-js <?php if ($multiple): ?>plupload-upload-uic-multiple<?php endif; ?>"
2410 2410
                     id="<?php echo $id; ?>plupload-upload-ui">
2411
-                    <h4><?php _e('Drop files to upload', 'geodirectory');?></h4><br/>
2411
+                    <h4><?php _e('Drop files to upload', 'geodirectory'); ?></h4><br/>
2412 2412
                     <input id="<?php echo $id; ?>plupload-browse-button" type="button"
2413 2413
                            value="<?php esc_attr_e('Select Files', 'geodirectory'); ?>" class="geodir_button"/>
2414 2414
                     <span class="ajaxnonceplu"
2415
-                          id="ajaxnonceplu<?php echo wp_create_nonce($id . 'pluploadan'); ?>"></span>
2415
+                          id="ajaxnonceplu<?php echo wp_create_nonce($id.'pluploadan'); ?>"></span>
2416 2416
                     <?php if ($width && $height): ?>
2417 2417
                         <span class="plupload-resize"></span>
2418 2418
                         <span class="plupload-width" id="plupload-width<?php echo $width; ?>"></span>
@@ -2425,7 +2425,7 @@  discard block
 block discarded – undo
2425 2425
                      id="<?php echo $id; ?>plupload-thumbs" style="border-top:1px solid #ccc; padding-top:10px;">
2426 2426
                 </div>
2427 2427
                 <span
2428
-                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory');?></span>
2428
+                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory'); ?></span>
2429 2429
                 <span id="<?php echo $id; ?>upload-error" style="display:none"></span>
2430 2430
             </div>
2431 2431
 
@@ -2437,7 +2437,7 @@  discard block
 block discarded – undo
2437 2437
          *
2438 2438
          * @since 1.0.0
2439 2439
          */
2440
-        do_action('geodir_after_main_form_fields');?>
2440
+        do_action('geodir_after_main_form_fields'); ?>
2441 2441
 
2442 2442
 
2443 2443
         <!-- add captcha code -->
@@ -2448,7 +2448,7 @@  discard block
 block discarded – undo
2448 2448
         </script>
2449 2449
         <noscript>
2450 2450
             <div>
2451
-                <label><?php _e('Type 64 into this box', 'geodirectory');?></label>
2451
+                <label><?php _e('Type 64 into this box', 'geodirectory'); ?></label>
2452 2452
                 <input type="text" id="geodir_spamblocker_top_form" name="geodir_spamblocker" value="" maxlength="10"/>
2453 2453
             </div>
2454 2454
         </noscript>
@@ -2458,10 +2458,10 @@  discard block
 block discarded – undo
2458 2458
         <!-- end captcha code -->
2459 2459
 
2460 2460
         <div id="geodir-add-listing-submit" class="geodir_form_row clear_both" style="padding:2px;text-align:center;">
2461
-            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON;?>"
2462
-                   class="geodir_button" <?php echo $submit_button;?>/>
2461
+            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON; ?>"
2462
+                   class="geodir_button" <?php echo $submit_button; ?>/>
2463 2463
             <span class="geodir_message_note"
2464
-                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory');?></span>
2464
+                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory'); ?></span>
2465 2465
         </div>
2466 2466
 
2467 2467
     </form>
@@ -2523,7 +2523,7 @@  discard block
 block discarded – undo
2523 2523
         class="<?php
2524 2524
         /** This action is documented in geodirectory_template_actions.php */
2525 2525
         echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'Reg/Login Top Section'); ?>">
2526
-        <?php dynamic_sidebar('Reg/Login Top Section');?>
2526
+        <?php dynamic_sidebar('Reg/Login Top Section'); ?>
2527 2527
     </div><!-- clearfix ends here-->
2528 2528
 <?php
2529 2529
 }
@@ -2545,7 +2545,7 @@  discard block
 block discarded – undo
2545 2545
 
2546 2546
     ?>
2547 2547
     <script type="text/javascript">
2548
-        <?php if ( $user_login ) { ?>
2548
+        <?php if ($user_login) { ?>
2549 2549
         setTimeout(function () {
2550 2550
             try {
2551 2551
                 d = document.getElementById('user_pass');
@@ -2562,7 +2562,7 @@  discard block
 block discarded – undo
2562 2562
         <?php } ?>
2563 2563
     </script>
2564 2564
     <script type="text/javascript">
2565
-        <?php if ( $user_login ) { ?>
2565
+        <?php if ($user_login) { ?>
2566 2566
         setTimeout(function () {
2567 2567
             try {
2568 2568
                 d = document.getElementById('user_pass');
@@ -2587,7 +2587,7 @@  discard block
 block discarded – undo
2587 2587
         foreach ($errors as $errorsObj) {
2588 2588
             foreach ($errorsObj as $key => $val) {
2589 2589
                 for ($i = 0; $i < count($val); $i++) {
2590
-                    echo "<div class=sucess_msg>" . $val[$i] . '</div>';
2590
+                    echo "<div class=sucess_msg>".$val[$i].'</div>';
2591 2591
                     $registration_error_msg = 1;
2592 2592
                 }
2593 2593
             }
@@ -2604,7 +2604,7 @@  discard block
 block discarded – undo
2604 2604
              *
2605 2605
              * @since 1.0.0
2606 2606
              */
2607
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2607
+            include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
2608 2608
         </div>
2609 2609
 
2610 2610
     <?php } elseif (isset($_REQUEST['page']) && $_REQUEST['page'] == 'login' && isset($_REQUEST['page1']) && $_REQUEST['page1'] == 'sign_up') { ?>
@@ -2616,7 +2616,7 @@  discard block
 block discarded – undo
2616 2616
              *
2617 2617
              * @since 1.0.0
2618 2618
              */
2619
-            include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2619
+            include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
2620 2620
         </div>
2621 2621
 
2622 2622
     <?php } else { ?>
@@ -2628,7 +2628,7 @@  discard block
 block discarded – undo
2628 2628
              *
2629 2629
              * @since 1.0.0
2630 2630
              */
2631
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2631
+            include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
2632 2632
         </div>
2633 2633
         <div class="registration_form_r">
2634 2634
             <?php
@@ -2637,7 +2637,7 @@  discard block
 block discarded – undo
2637 2637
              *
2638 2638
              * @since 1.0.0
2639 2639
              */
2640
-            include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2640
+            include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
2641 2641
         </div>
2642 2642
 
2643 2643
     <?php }?>
@@ -2673,12 +2673,12 @@  discard block
 block discarded – undo
2673 2673
     $gd_post_type = geodir_get_current_posttype();
2674 2674
     $post_type_info = get_post_type_object($gd_post_type);
2675 2675
 
2676
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
2676
+    $add_string_in_title = __('All', 'geodirectory').' ';
2677 2677
     if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2678
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
2678
+        $add_string_in_title = __('My Favorite', 'geodirectory').' ';
2679 2679
     }
2680 2680
 
2681
-    $list_title = $add_string_in_title . $post_type_info->labels->name;
2681
+    $list_title = $add_string_in_title.$post_type_info->labels->name;
2682 2682
     $single_name = $post_type_info->labels->singular_name;
2683 2683
 
2684 2684
     $taxonomy = geodir_get_taxonomies($gd_post_type);
@@ -2686,12 +2686,12 @@  discard block
 block discarded – undo
2686 2686
     if (!empty($term)) {
2687 2687
         $current_term = get_term_by('slug', $term, $taxonomy[0]);
2688 2688
         if (!empty($current_term))
2689
-            $list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'";
2689
+            $list_title .= __(' in', 'geodirectory')." '".geodir_ucwords($current_term->name)."'";
2690 2690
     }
2691 2691
 
2692 2692
 
2693 2693
     if (is_search()) {
2694
-        $list_title = __('Search', 'geodirectory') . ' ' . __($post_type_info->labels->name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2694
+        $list_title = __('Search', 'geodirectory').' '.__($post_type_info->labels->name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
2695 2695
 
2696 2696
     }
2697 2697
     /** This action is documented in geodirectory_template_actions.php */
@@ -2700,11 +2700,11 @@  discard block
 block discarded – undo
2700 2700
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2701 2701
 
2702 2702
     $title = $list_title;
2703
-    if(geodir_is_page('author')){
2703
+    if (geodir_is_page('author')) {
2704 2704
         $gd_page = 'author';
2705
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
2705
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2706 2706
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
2707
-        }else{
2707
+        } else {
2708 2708
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
2709 2709
         }
2710 2710
 
@@ -2718,16 +2718,16 @@  discard block
 block discarded – undo
2718 2718
      * @param string $title The page title including variables.
2719 2719
      * @param string $gd_page The GeoDirectory page type if any.
2720 2720
      */
2721
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2721
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2722 2722
 
2723
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2723
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
2724 2724
         /**
2725 2725
          * Filter the author page title text.
2726 2726
          *
2727 2727
          * @since 1.0.0
2728 2728
          * @param string $list_title The title for the page.
2729 2729
          */
2730
-        apply_filters('geodir_author_page_title_text', $title) . '</h1></header>';
2730
+        apply_filters('geodir_author_page_title_text', $title).'</h1></header>';
2731 2731
 }
2732 2732
 
2733 2733
 
@@ -2932,19 +2932,19 @@  discard block
 block discarded – undo
2932 2932
     $post_type_info = get_post_type_object($gd_post_type);
2933 2933
 
2934 2934
     $pt_name = '';
2935
-    if(isset($post_type_info->labels->name)){$pt_name=$post_type_info->labels->name;}
2935
+    if (isset($post_type_info->labels->name)) {$pt_name = $post_type_info->labels->name; }
2936 2936
 
2937 2937
     if (is_search()) {
2938
-        $list_title = __('Search', 'geodirectory') . ' ' . __($pt_name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2938
+        $list_title = __('Search', 'geodirectory').' '.__($pt_name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
2939 2939
 
2940 2940
     }
2941 2941
     /** This action is documented in geodirectory_template_actions.php */
2942 2942
     $class = apply_filters('geodir_page_title_class', 'entry-title fn');
2943 2943
     /** This action is documented in geodirectory_template_actions.php */
2944 2944
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2945
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2945
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
2946 2946
         /** This action is documented in geodirectory_template_actions.php */
2947
-        apply_filters('geodir_listing_page_title', wptexturize($list_title)) . '</h1></header>';
2947
+        apply_filters('geodir_listing_page_title', wptexturize($list_title)).'</h1></header>';
2948 2948
 }
2949 2949
 
2950 2950
 // action for adding the listings page top widget area
@@ -3348,7 +3348,7 @@  discard block
 block discarded – undo
3348 3348
         $gd_post_type = geodir_get_current_posttype();
3349 3349
         $post_type_info = get_post_type_object($gd_post_type);
3350 3350
 
3351
-        $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' :', 'geodirectory');
3351
+        $list_title = __('Search', 'geodirectory').' '.__(ucfirst($post_type_info->labels->name), 'geodirectory').__(' :', 'geodirectory');
3352 3352
     }
3353 3353
     return $list_title;
3354 3354
 }
@@ -3364,7 +3364,7 @@  discard block
 block discarded – undo
3364 3364
  * @param string $position Position to add the post content. 'before' or 'after'. Default 'before'.
3365 3365
  * @param string $gd_page The geodirectory page type. Default null.
3366 3366
  */
3367
-function geodir_add_page_content( $position = 'before', $gd_page = '' ) {
3367
+function geodir_add_page_content($position = 'before', $gd_page = '') {
3368 3368
     global $post;
3369 3369
         
3370 3370
     $gd_page_id = NULL;
Please login to merge, or discard this patch.