Completed
Pull Request — master (#208)
by Kiran
08:04
created
geodirectory-functions/custom_functions.php 1 patch
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -51,20 +51,20 @@  discard block
 block discarded – undo
51 51
 			jQuery(listSel).children('li').switchClass('gridview_onehalf gridview_onethird gridview_onefourth', 'gridview_onefifth', 600);
52 52
 		}
53 53
 
54
-		jQuery.post("<?php echo geodir_get_ajax_url();?>&gd_listing_view=" + val, function (data) {
54
+		jQuery.post("<?php echo geodir_get_ajax_url(); ?>&gd_listing_view=" + val, function (data) {
55 55
 			//alert(data );
56 56
 		});
57 57
 	}
58 58
     </script>
59 59
     <div class="geodir-list-view-select">
60 60
         <select name="gd_list_view" id="gd_list_view" onchange="geodir_list_view_select(this);">
61
-            <?php $listing_view = (int)$gd_session->get('gd_listing_view'); ?>
62
-            <option value=""><?php _e('View:', 'geodirectory');?></option>
63
-            <option value="1" <?php selected(1, $listing_view);?>><?php _e('View: List', 'geodirectory');?></option>
64
-            <option value="2" <?php selected(2, $listing_view);?>><?php _e('View: Grid 2', 'geodirectory');?></option>
65
-            <option value="3" <?php selected(3, $listing_view);?>><?php _e('View: Grid 3', 'geodirectory');?></option>
66
-            <option value="4" <?php selected(4, $listing_view);?>><?php _e('View: Grid 4', 'geodirectory');?></option>
67
-            <option value="5" <?php selected(5, $listing_view);?>><?php _e('View: Grid 5', 'geodirectory');?></option>
61
+            <?php $listing_view = (int) $gd_session->get('gd_listing_view'); ?>
62
+            <option value=""><?php _e('View:', 'geodirectory'); ?></option>
63
+            <option value="1" <?php selected(1, $listing_view); ?>><?php _e('View: List', 'geodirectory'); ?></option>
64
+            <option value="2" <?php selected(2, $listing_view); ?>><?php _e('View: Grid 2', 'geodirectory'); ?></option>
65
+            <option value="3" <?php selected(3, $listing_view); ?>><?php _e('View: Grid 3', 'geodirectory'); ?></option>
66
+            <option value="4" <?php selected(4, $listing_view); ?>><?php _e('View: Grid 4', 'geodirectory'); ?></option>
67
+            <option value="5" <?php selected(5, $listing_view); ?>><?php _e('View: Grid 5', 'geodirectory'); ?></option>
68 68
         </select>
69 69
     </div>
70 70
 <?php
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      * @param object|string $post The post object.
185 185
      * @param string $post_type The post type.
186 186
      */
187
-    return (object)apply_filters('geodir_post_package_info', $package_info, $post, $post_type);
187
+    return (object) apply_filters('geodir_post_package_info', $package_info, $post, $post_type);
188 188
 
189 189
 }
190 190
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
         // strip slashes message
299 299
         $client_message = stripslashes_deep($client_message);
300 300
 
301
-        geodir_sendEmail($youremail, $yourname, $to_email, $to_name, '', $client_message, $extra = '', 'send_enquiry', $request['pid']);//To client email
301
+        geodir_sendEmail($youremail, $yourname, $to_email, $to_name, '', $client_message, $extra = '', 'send_enquiry', $request['pid']); //To client email
302 302
     }
303 303
 
304 304
     /**
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
      * }
404 404
      */
405 405
     do_action('geodir_before_send_to_friend_email', $request);
406
-    geodir_sendEmail($youremail, $yourname, $to_email, $to_name, $frnd_subject, $frnd_comments, $extra = '', 'send_friend', $request['pid']);//To client email
406
+    geodir_sendEmail($youremail, $yourname, $to_email, $to_name, $frnd_subject, $frnd_comments, $extra = '', 'send_friend', $request['pid']); //To client email
407 407
 
408 408
     /**
409 409
      * Called after the send to friend email is sent.
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
 	 *
588 588
 	 * @since 1.4.4
589 589
 	 */
590
-	if ( is_search() ) {
590
+	if (is_search()) {
591 591
 		return;
592 592
 	}
593 593
 
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
             if ($sort->field_type == 'random') {
612 612
                 $key = $sort->field_type;
613 613
                 ($sort_by == $key || ($sort->is_default == '1' && !isset($_REQUEST['sort_by']))) ? $selected = 'selected="selected"' : $selected = '';
614
-                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url( add_query_arg('sort_by', $key) ) . '">' . __($label, 'geodirectory') . '</option>';
614
+                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url(add_query_arg('sort_by', $key)) . '">' . __($label, 'geodirectory') . '</option>';
615 615
             }
616 616
 
617 617
             if ($sort->htmlvar_name == 'comment_count') {
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
                 if ($sort->asc_title)
625 625
                     $label = $sort->asc_title;
626 626
                 ($sort_by == $key || ($sort->is_default == '1' && $sort->default_order == $key && !isset($_REQUEST['sort_by']))) ? $selected = 'selected="selected"' : $selected = '';
627
-                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url( add_query_arg('sort_by', $key) ) . '">' . __($label, 'geodirectory') . '</option>';
627
+                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url(add_query_arg('sort_by', $key)) . '">' . __($label, 'geodirectory') . '</option>';
628 628
             }
629 629
 
630 630
             if ($sort->sort_desc) {
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
                 if ($sort->desc_title)
634 634
                     $label = $sort->desc_title;
635 635
                 ($sort_by == $key || ($sort->is_default == '1' && $sort->default_order == $key && !isset($_REQUEST['sort_by']))) ? $selected = 'selected="selected"' : $selected = '';
636
-                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url( add_query_arg('sort_by', $key) ) . '">' . __($label, 'geodirectory') . '</option>';
636
+                $sort_field_options .= '<option ' . $selected . ' value="' . esc_url(add_query_arg('sort_by', $key)) . '">' . __($label, 'geodirectory') . '</option>';
637 637
             }
638 638
 
639 639
         }
@@ -648,9 +648,9 @@  discard block
 block discarded – undo
648 648
             <select name="sort_by" id="sort_by" onchange="javascript:window.location=this.value;">
649 649
 
650 650
                 <option
651
-                    value="<?php echo esc_url( add_query_arg('sort_by', '') );?>" <?php if ($sort_by == '') echo 'selected="selected"';?>><?php _e('Sort By', 'geodirectory');?></option><?php
651
+                    value="<?php echo esc_url(add_query_arg('sort_by', '')); ?>" <?php if ($sort_by == '') echo 'selected="selected"'; ?>><?php _e('Sort By', 'geodirectory'); ?></option><?php
652 652
 
653
-                echo $sort_field_options;?>
653
+                echo $sort_field_options; ?>
654 654
 
655 655
             </select>
656 656
 
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
         $category = array();
720 720
 
721 721
         if (isset($_REQUEST['backandedit'])) {
722
-            $post = (object)$gd_session->get('listing');
722
+            $post = (object) $gd_session->get('listing');
723 723
             $post_type = $post->listing_type;
724 724
             if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')
725 725
                 $post_id = $_REQUEST['pid'];
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
             if ($add_location_filter != '0') {
797 797
                 $geodir_add_location_url = '1';
798 798
             }
799
-            $viewall_url = get_term_link((int)$category[0], $post_type . $category_taxonomy);
799
+            $viewall_url = get_term_link((int) $category[0], $post_type . $category_taxonomy);
800 800
             $geodir_add_location_url = NULL;
801 801
         }
802 802
         ob_start();
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
         $geodir_post_category_str = serialize($geodir_post_category_str);
894 894
     }
895 895
 
896
-    $all_var['post_category_array'] = html_entity_decode((string)$geodir_post_category_str, ENT_QUOTES, 'UTF-8');
896
+    $all_var['post_category_array'] = html_entity_decode((string) $geodir_post_category_str, ENT_QUOTES, 'UTF-8');
897 897
     $script = "var post_category_array = " . json_encode($all_var) . ';';
898 898
     echo '<script>';
899 899
     echo $script;
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
     $location_id = NULL;
1027 1027
     if ($geodir_location_manager) {
1028 1028
         $sql = $wpdb->prepare("SELECT location_id FROM " . POST_LOCATION_TABLE . " WHERE city_slug=%s ORDER BY location_id ASC LIMIT 1", array($gd_city));
1029
-        $location_id = (int)$wpdb->get_var($sql);
1029
+        $location_id = (int) $wpdb->get_var($sql);
1030 1030
         $location_type = geodir_what_is_current_location();
1031 1031
         if ($location_type == 'city') {
1032 1032
             $replace_location = geodir_get_current_location(array('what' => 'city', 'echo' => false));
@@ -1087,45 +1087,45 @@  discard block
 block discarded – undo
1087 1087
 
1088 1088
 
1089 1089
     $gd_page = '';
1090
-    if(geodir_is_page('home')){
1090
+    if (geodir_is_page('home')) {
1091 1091
         $gd_page = 'home';
1092 1092
         $meta_desc = (get_option('geodir_meta_desc_homepage')) ? get_option('geodir_meta_desc_homepage') : $meta_desc;
1093 1093
     }
1094
-    elseif(geodir_is_page('detail')){
1094
+    elseif (geodir_is_page('detail')) {
1095 1095
         $gd_page = 'detail';
1096 1096
         $meta_desc = (get_option('geodir_meta_desc_detail')) ? get_option('geodir_meta_desc_detail') : $meta_desc;
1097 1097
     }
1098
-    elseif(geodir_is_page('pt')){
1098
+    elseif (geodir_is_page('pt')) {
1099 1099
         $gd_page = 'pt';
1100 1100
         $meta_desc = (get_option('geodir_meta_desc_pt')) ? get_option('geodir_meta_desc_pt') : $meta_desc;
1101 1101
     }
1102
-    elseif(geodir_is_page('listing')){
1102
+    elseif (geodir_is_page('listing')) {
1103 1103
         $gd_page = 'listing';
1104 1104
         $meta_desc = (get_option('geodir_meta_desc_listing')) ? get_option('geodir_meta_desc_listing') : $meta_desc;
1105 1105
     }
1106
-    elseif(geodir_is_page('location')){
1106
+    elseif (geodir_is_page('location')) {
1107 1107
         $gd_page = 'location';
1108 1108
         $meta_desc = (get_option('geodir_meta_desc_location')) ? get_option('geodir_meta_desc_location') : $meta_desc;
1109 1109
         $meta_desc = apply_filters('geodir_seo_meta_location_description', $meta_desc);
1110 1110
 
1111 1111
     }
1112
-    elseif(geodir_is_page('search')){
1112
+    elseif (geodir_is_page('search')) {
1113 1113
         $gd_page = 'search';
1114 1114
         $meta_desc = (get_option('geodir_meta_desc_search')) ? get_option('geodir_meta_desc_search') : $meta_desc;
1115 1115
     }
1116
-    elseif(geodir_is_page('add-listing')){
1116
+    elseif (geodir_is_page('add-listing')) {
1117 1117
         $gd_page = 'add-listing';
1118 1118
         $meta_desc = (get_option('geodir_meta_desc_add-listing')) ? get_option('geodir_meta_desc_add-listing') : $meta_desc;
1119 1119
     }
1120
-    elseif(geodir_is_page('author')){
1120
+    elseif (geodir_is_page('author')) {
1121 1121
         $gd_page = 'author';
1122 1122
         $meta_desc = (get_option('geodir_meta_desc_author')) ? get_option('geodir_meta_desc_author') : $meta_desc;
1123 1123
     }
1124
-    elseif(geodir_is_page('login')){
1124
+    elseif (geodir_is_page('login')) {
1125 1125
         $gd_page = 'login';
1126 1126
         $meta_desc = (get_option('geodir_meta_desc_login')) ? get_option('geodir_meta_desc_login') : $meta_desc;
1127 1127
     }
1128
-    elseif(geodir_is_page('listing-success')){
1128
+    elseif (geodir_is_page('listing-success')) {
1129 1129
         $gd_page = 'listing-success';
1130 1130
         $meta_desc = (get_option('geodir_meta_desc_listing-success')) ? get_option('geodir_meta_desc_listing-success') : $meta_desc;
1131 1131
     }
@@ -1153,7 +1153,7 @@  discard block
 block discarded – undo
1153 1153
          * @param string $title The page description including variables.
1154 1154
          * @param string $gd_page The GeoDirectory page type if any.
1155 1155
          */
1156
-        $meta_desc = apply_filters('geodir_seo_meta_description_pre', __($meta_desc, 'geodirectory'),$gd_page,'');
1156
+        $meta_desc = apply_filters('geodir_seo_meta_description_pre', __($meta_desc, 'geodirectory'), $gd_page, '');
1157 1157
 
1158 1158
         /**
1159 1159
          * Filter SEO meta description.
@@ -1169,7 +1169,7 @@  discard block
 block discarded – undo
1169 1169
         $place_tags = wp_get_post_terms($post->ID, $post->post_type . '_tags', array("fields" => "names"));
1170 1170
         $place_cats = wp_get_post_terms($post->ID, $post->post_type . 'category', array("fields" => "names"));
1171 1171
 
1172
-        $meta_key .= implode(", ", array_merge((array)$place_cats, (array)$place_tags));
1172
+        $meta_key .= implode(", ", array_merge((array) $place_cats, (array) $place_tags));
1173 1173
     } else {
1174 1174
         $posttags = get_the_tags();
1175 1175
         if ($posttags) {
@@ -1355,8 +1355,8 @@  discard block
 block discarded – undo
1355 1355
 {
1356 1356
     global $post, $post_images, $video, $special_offers, $related_listing, $geodir_post_detail_fields;
1357 1357
 
1358
-    $post_id = !empty($post) && isset($post->ID) ? (int)$post->ID : 0;
1359
-    $request_post_id = !empty($_REQUEST['p']) ? (int)$_REQUEST['p'] : 0;
1358
+    $post_id = !empty($post) && isset($post->ID) ? (int) $post->ID : 0;
1359
+    $request_post_id = !empty($_REQUEST['p']) ? (int) $_REQUEST['p'] : 0;
1360 1360
     $is_backend_preview = (is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p'])) && is_super_admin() ? true : false; // skip if preview from backend
1361 1361
 
1362 1362
     if ($is_backend_preview && !$post_id > 0 && $request_post_id > 0) {
@@ -1390,7 +1390,7 @@  discard block
 block discarded – undo
1390 1390
         if (!empty($post_images)) {
1391 1391
             foreach ($post_images as $image) {
1392 1392
                 $caption = (!empty($image->caption)) ? $image->caption : '';
1393
-                $thumb_image .= '<a href="' . $image->src . '" title="'.$caption.'">';
1393
+                $thumb_image .= '<a href="' . $image->src . '" title="' . $caption . '">';
1394 1394
                 $thumb_image .= geodir_show_image($image, 'thumbnail', true, false);
1395 1395
                 $thumb_image .= '</a>';
1396 1396
             }
@@ -1464,13 +1464,13 @@  discard block
 block discarded – undo
1464 1464
         $map_args['map_class_name'] = 'geodir-map-preview-page';
1465 1465
     }
1466 1466
 
1467
-    $arr_detail_page_tabs = geodir_detail_page_tabs_list();// get this sooner so we can get the active tab for the user
1467
+    $arr_detail_page_tabs = geodir_detail_page_tabs_list(); // get this sooner so we can get the active tab for the user
1468 1468
 
1469 1469
     $active_tab = '';
1470 1470
     $active_tab_name = '';
1471 1471
     $default_tab = '';
1472 1472
     $default_tab_name = '';
1473
-    foreach($arr_detail_page_tabs as $tab_index => $tabs){
1473
+    foreach ($arr_detail_page_tabs as $tab_index => $tabs) {
1474 1474
         if (isset($tabs['is_active_tab']) && $tabs['is_active_tab'] && !empty($tabs['is_display']) && isset($tabs['heading_text']) && $tabs['heading_text']) {
1475 1475
             $active_tab = $tab_index;
1476 1476
             $active_tab_name = __($tabs['heading_text'], 'geodirectory');
@@ -1495,7 +1495,7 @@  discard block
 block discarded – undo
1495 1495
     <div class="geodir-tabs" id="gd-tabs" style="position:relative;">
1496 1496
         <div id="geodir-tab-mobile-menu" >
1497 1497
             <i class="fa fa-bars"></i>
1498
-            <span class="geodir-mobile-active-tab"><?php echo $active_tab_name;?></span>
1498
+            <span class="geodir-mobile-active-tab"><?php echo $active_tab_name; ?></span>
1499 1499
             <i class="fa fa-sort-desc"></i>
1500 1500
         </div>
1501 1501
         <dl class="geodir-tab-head">
@@ -1512,13 +1512,13 @@  discard block
 block discarded – undo
1512 1512
                 if ($detail_page_tab['is_display']) {
1513 1513
                     ?>
1514 1514
                     <dt></dt> <!-- added to comply with validation -->
1515
-                    <dd <?php if ($detail_page_tab['is_active_tab']){ ?>class="geodir-tab-active"<?php }?> ><a data-tab="#<?php echo $tab_index;?>" data-status="enable"><?php _e($detail_page_tab['heading_text'],'geodirectory');?></a>
1515
+                    <dd <?php if ($detail_page_tab['is_active_tab']) { ?>class="geodir-tab-active"<?php }?> ><a data-tab="#<?php echo $tab_index; ?>" data-status="enable"><?php _e($detail_page_tab['heading_text'], 'geodirectory'); ?></a>
1516 1516
                     </dd>
1517 1517
                     <?php
1518 1518
                     ob_start() // start tab content buffering
1519 1519
                     ?>
1520
-                    <li id="<?php echo $tab_index;?>Tab">
1521
-                        <div id="<?php echo $tab_index;?>" class="hash-offset"></div>
1520
+                    <li id="<?php echo $tab_index; ?>Tab">
1521
+                        <div id="<?php echo $tab_index; ?>" class="hash-offset"></div>
1522 1522
                         <?php
1523 1523
                         /**
1524 1524
                          * Called before the details tab content is output per tab.
@@ -1568,7 +1568,7 @@  discard block
 block discarded – undo
1568 1568
                                 break;
1569 1569
                             case 'post_video':
1570 1570
                                 /** This action is documented in geodirectory_template_actions.php */
1571
-                                echo apply_filters('the_content', stripslashes($video));// we apply the_content filter so oembed works also;
1571
+                                echo apply_filters('the_content', stripslashes($video)); // we apply the_content filter so oembed works also;
1572 1572
                                 break;
1573 1573
                             case 'special_offers':
1574 1574
                                 echo wpautop(stripslashes($special_offers));
@@ -1702,7 +1702,7 @@  discard block
 block discarded – undo
1702 1702
     $modify = false;
1703 1703
     $orientation = 0;
1704 1704
     if (!empty($exif) && isset($exif['Orientation'])) {
1705
-        switch ((int)$exif['Orientation']) {
1705
+        switch ((int) $exif['Orientation']) {
1706 1706
             case 1:
1707 1707
                 // do nothing
1708 1708
                 break;
@@ -1779,7 +1779,7 @@  discard block
 block discarded – undo
1779 1779
         }
1780 1780
         
1781 1781
         if ($quality !== null) {
1782
-            $image->set_quality((int)$quality);
1782
+            $image->set_quality((int) $quality);
1783 1783
         }
1784 1784
         
1785 1785
        $result = $image->save($file_path);
@@ -1925,9 +1925,9 @@  discard block
 block discarded – undo
1925 1925
             $comments_echo .= "</span>\n";
1926 1926
 
1927 1927
             $comments_echo .= '<span class="geodir_reviewer_content">';
1928
-            if($comment->user_id){$comments_echo .= '<a href="'.get_author_posts_url( $comment->user_id ).'">';}
1928
+            if ($comment->user_id) {$comments_echo .= '<a href="' . get_author_posts_url($comment->user_id) . '">'; }
1929 1929
             $comments_echo .= '<span class="geodir_reviewer_author">' . $comment->comment_author . '</span> ';
1930
-            if($comment->user_id){$comments_echo .= '</a>';}
1930
+            if ($comment->user_id) {$comments_echo .= '</a>'; }
1931 1931
             $comments_echo .= '<span class="geodir_reviewer_reviewed">' . __('reviewed', 'geodirectory') . '</span> ';
1932 1932
             $comments_echo .= '<a href="' . $permalink . '" class="geodir_reviewer_title">' . $post_title . '</a>';
1933 1933
             $comments_echo .= geodir_get_rating_stars($comment->overall_rating, $comment_post_ID);
@@ -1958,7 +1958,7 @@  discard block
 block discarded – undo
1958 1958
     if (!empty($post_types)) {
1959 1959
         foreach ($post_types as $key => $post_type) {
1960 1960
             $cpt_name = __($post_type->labels->singular_name, 'geodirectory');
1961
-            $post_type_name =   sprintf(__('%s Categories', 'geodirectory'),$cpt_name);
1961
+            $post_type_name = sprintf(__('%s Categories', 'geodirectory'), $cpt_name);
1962 1962
             $taxonomies = geodir_get_taxonomies($key);
1963 1963
             $cat_taxonomy = !empty($taxonomies[0]) ? $taxonomies[0] : NULL;
1964 1964
             $cat_terms = $cat_taxonomy ? get_terms($cat_taxonomy) : NULL;
@@ -2065,10 +2065,10 @@  discard block
 block discarded – undo
2065 2065
             stWidget.addEntry({
2066 2066
                 "service": "sharethis",
2067 2067
                 "element": document.getElementById('st_sharethis'),
2068
-                "url": "<?php echo geodir_curPageURL();?>",
2069
-                "title": "<?php echo $post->post_title;?>",
2068
+                "url": "<?php echo geodir_curPageURL(); ?>",
2069
+                "title": "<?php echo $post->post_title; ?>",
2070 2070
                 "type": "chicklet",
2071
-                "text": "<?php _e( 'Share', 'geodirectory' );?>"
2071
+                "text": "<?php _e('Share', 'geodirectory'); ?>"
2072 2072
             });</script>
2073 2073
 
2074 2074
     </div>
Please login to merge, or discard this patch.
geodirectory_hooks_actions.php 1 patch
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 /* ON TEMPLATE INCLUDE */
137 137
 /////////////////////////
138 138
 
139
-add_filter('template_include', 'geodir_template_loader',9);
139
+add_filter('template_include', 'geodir_template_loader', 9);
140 140
 
141 141
 /////////////////////////
142 142
 /* CATEGORY / TAXONOMY / CUSTOM POST ACTIONS */
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 ////////////////////////
178 178
 
179 179
 add_action('geodir_update_postrating', 'geodir_term_review_count_force_update', 100);
180
-add_action('transition_post_status', 'geodir_term_review_count_force_update', 100,3);
180
+add_action('transition_post_status', 'geodir_term_review_count_force_update', 100, 3);
181 181
 add_action('created_term', 'geodir_term_review_count_force_update', 100);
182 182
 add_action('edited_term', 'geodir_term_review_count_force_update', 100);
183 183
 add_action('delete_term', 'geodir_term_review_count_force_update', 100);
@@ -319,8 +319,8 @@  discard block
 block discarded – undo
319 319
 
320 320
 /////// GEO DIRECOTORY CUSTOM HOOKS ///
321 321
 
322
-add_action('geodir_before_tab_content', 'geodir_before_tab_content');// this function is in custom_functions.php and it is used to wrap detail page tab content 
323
-add_action('geodir_after_tab_content', 'geodir_after_tab_content');// this function is in custom_functions.php and it is used to wrap detail page tab content
322
+add_action('geodir_before_tab_content', 'geodir_before_tab_content'); // this function is in custom_functions.php and it is used to wrap detail page tab content 
323
+add_action('geodir_after_tab_content', 'geodir_after_tab_content'); // this function is in custom_functions.php and it is used to wrap detail page tab content
324 324
 
325 325
 // Detail page sidebar content 
326 326
 add_action('geodir_detail_page_sidebar', 'geodir_detail_page_sidebar_content_sorting', 1);
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
     $content_html = ob_get_clean();
423 423
     if (trim($content_html) != '')
424 424
         $content_html = '<div class="geodir-company_info geodir-details-sidebar-social-sharing">' . $content_html . '</div>';
425
-    if ((int)get_option('geodir_disable_tfg_buttons_section') != 1) {
425
+    if ((int) get_option('geodir_disable_tfg_buttons_section') != 1) {
426 426
         /**
427 427
          * Filter the geodir_social_sharing_buttons() function content.
428 428
          *
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
     $content_html = ob_get_clean();
470 470
     if (trim($content_html) != '')
471 471
         $content_html = '<div class="geodir-company_info geodir-details-sidebar-sharethis">' . $content_html . '</div>';
472
-    if ((int)get_option('geodir_disable_sharethis_button_section') != 1) {
472
+    if ((int) get_option('geodir_disable_sharethis_button_section') != 1) {
473 473
         /**
474 474
          * Filter the geodir_share_this_button() function content.
475 475
          *
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
             $post_id = $post->ID;
509 509
             
510 510
             if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
511
-                $post_id = (int)$_REQUEST['pid'];
511
+                $post_id = (int) $_REQUEST['pid'];
512 512
             }
513 513
 
514 514
             $postlink = get_permalink(geodir_add_listing_page_id());
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
     $content_html = ob_get_clean();
526 526
     if (trim($content_html) != '')
527 527
         $content_html = '<div class="geodir-company_info geodir-details-sidebar-user-links">' . $content_html . '</div>';
528
-    if ((int)get_option('geodir_disable_user_links_section') != 1) {
528
+    if ((int) get_option('geodir_disable_user_links_section') != 1) {
529 529
         /**
530 530
          * Filter the geodir_edit_post_link() function content.
531 531
          *
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
      */
565 565
     do_action('geodir_before_google_analytics');
566 566
     
567
-    if (get_option('geodir_ga_stats') && is_user_logged_in() &&  (isset($package_info->google_analytics) && $package_info->google_analytics == '1') && (get_current_user_id()==$post->post_author || current_user_can( 'manage_options' )) ) {
567
+    if (get_option('geodir_ga_stats') && is_user_logged_in() && (isset($package_info->google_analytics) && $package_info->google_analytics == '1') && (get_current_user_id() == $post->post_author || current_user_can('manage_options'))) {
568 568
         $page_url = urlencode($_SERVER['REQUEST_URI']);
569 569
         ?>
570 570
         <script type="text/javascript">
@@ -588,34 +588,34 @@  discard block
 block discarded – undo
588 588
             });
589 589
 
590 590
             function gdga_weekVSweek() {
591
-                jQuery.ajax({url: "<?php echo get_bloginfo('url').'/?ptype=ga&ga_page='.$page_url; ?>&ga_type=thisweek", success: function(result){
591
+                jQuery.ajax({url: "<?php echo get_bloginfo('url') . '/?ptype=ga&ga_page=' . $page_url; ?>&ga_type=thisweek", success: function(result){
592 592
                     ga_data1 = jQuery.parseJSON(result);
593 593
                     if(ga_data1.error){jQuery('#ga_stats').html(result);return;}
594 594
                     gd_renderWeekOverWeekChart();
595 595
                 }});
596 596
 
597
-                jQuery.ajax({url: "<?php echo get_bloginfo('url').'/?ptype=ga&ga_page='.$page_url; ?>&ga_type=lastweek", success: function(result){
597
+                jQuery.ajax({url: "<?php echo get_bloginfo('url') . '/?ptype=ga&ga_page=' . $page_url; ?>&ga_type=lastweek", success: function(result){
598 598
                     ga_data2 = jQuery.parseJSON(result);
599 599
                     gd_renderWeekOverWeekChart();
600 600
                 }});
601 601
             }
602 602
 
603 603
             function gdga_yearVSyear() {
604
-                jQuery.ajax({url: "<?php echo get_bloginfo('url').'/?ptype=ga&ga_page='.$page_url; ?>&ga_type=thisyear", success: function(result){
604
+                jQuery.ajax({url: "<?php echo get_bloginfo('url') . '/?ptype=ga&ga_page=' . $page_url; ?>&ga_type=thisyear", success: function(result){
605 605
                     ga_data3 = jQuery.parseJSON(result);
606 606
                     if(ga_data3.error){jQuery('#ga_stats').html(result);return;}
607 607
 
608 608
                     gd_renderYearOverYearChart()
609 609
                 }});
610 610
 
611
-                jQuery.ajax({url: "<?php echo get_bloginfo('url').'/?ptype=ga&ga_page='.$page_url; ?>&ga_type=lastyear", success: function(result){
611
+                jQuery.ajax({url: "<?php echo get_bloginfo('url') . '/?ptype=ga&ga_page=' . $page_url; ?>&ga_type=lastyear", success: function(result){
612 612
                     ga_data4 = jQuery.parseJSON(result);
613 613
                     gd_renderYearOverYearChart()
614 614
                 }});
615 615
             }
616 616
 
617 617
             function gdga_country() {
618
-                jQuery.ajax({url: "<?php echo get_bloginfo('url').'/?ptype=ga&ga_page='.$page_url; ?>&ga_type=country", success: function(result){
618
+                jQuery.ajax({url: "<?php echo get_bloginfo('url') . '/?ptype=ga&ga_page=' . $page_url; ?>&ga_type=country", success: function(result){
619 619
                     ga_data5 = jQuery.parseJSON(result);
620 620
                     if(ga_data5.error){jQuery('#ga_stats').html(result);return;}
621 621
                     gd_renderTopCountriesChart();
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
             }
624 624
 
625 625
             function gdga_realtime() {
626
-                jQuery.ajax({url: "<?php echo get_bloginfo('url').'/?ptype=ga&ga_page='.$page_url; ?>&ga_type=realtime", success: function(result){
626
+                jQuery.ajax({url: "<?php echo get_bloginfo('url') . '/?ptype=ga&ga_page=' . $page_url; ?>&ga_type=realtime", success: function(result){
627 627
                     ga_data6 = jQuery.parseJSON(result);
628 628
                     if(ga_data6.error){jQuery('#ga_stats').html(result);return;}
629 629
                     gd_renderRealTime();
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
             }
690 690
 
691 691
             function gdga_noResults() {
692
-                jQuery('#gdga-chart-container').html('<?php _e('No results available','geodirectory');?>');
692
+                jQuery('#gdga-chart-container').html('<?php _e('No results available', 'geodirectory'); ?>');
693 693
                 jQuery('#gdga-legend-container').html('');
694 694
             }
695 695
 
@@ -721,18 +721,18 @@  discard block
 block discarded – undo
721 721
                     var data2 = results[1].rows.map(function(row) { return +row[2]; });
722 722
                     //var labelsN = results[0].rows.map(function(row) { return +row[1]; });
723 723
 
724
-                    var labels = ['<?php _e('Jan', 'geodirectory');?>',
725
-                        '<?php _e('Feb', 'geodirectory');?>',
726
-                        '<?php _e('Mar', 'geodirectory');?>',
727
-                        '<?php _e('Apr', 'geodirectory');?>',
728
-                        '<?php _e('May', 'geodirectory');?>',
729
-                        '<?php _e('Jun', 'geodirectory');?>',
730
-                        '<?php _e('Jul', 'geodirectory');?>',
731
-                        '<?php _e('Aug', 'geodirectory');?>',
732
-                        '<?php _e('Sep', 'geodirectory');?>',
733
-                        '<?php _e('Oct', 'geodirectory');?>',
734
-                        '<?php _e('Nov', 'geodirectory');?>',
735
-                        '<?php _e('Dec', 'geodirectory');?>'];
724
+                    var labels = ['<?php _e('Jan', 'geodirectory'); ?>',
725
+                        '<?php _e('Feb', 'geodirectory'); ?>',
726
+                        '<?php _e('Mar', 'geodirectory'); ?>',
727
+                        '<?php _e('Apr', 'geodirectory'); ?>',
728
+                        '<?php _e('May', 'geodirectory'); ?>',
729
+                        '<?php _e('Jun', 'geodirectory'); ?>',
730
+                        '<?php _e('Jul', 'geodirectory'); ?>',
731
+                        '<?php _e('Aug', 'geodirectory'); ?>',
732
+                        '<?php _e('Sep', 'geodirectory'); ?>',
733
+                        '<?php _e('Oct', 'geodirectory'); ?>',
734
+                        '<?php _e('Nov', 'geodirectory'); ?>',
735
+                        '<?php _e('Dec', 'geodirectory'); ?>'];
736 736
 
737 737
                     // Ensure the data arrays are at least as long as the labels array.
738 738
                     // Chart.js bar charts don't (yet) accept sparse datasets.
@@ -745,13 +745,13 @@  discard block
 block discarded – undo
745 745
                         labels : labels,
746 746
                         datasets : [
747 747
                             {
748
-                                label: '<?php _e('Last Year', 'geodirectory');?>',
748
+                                label: '<?php _e('Last Year', 'geodirectory'); ?>',
749 749
                                 fillColor : "rgba(220,220,220,0.5)",
750 750
                                 strokeColor : "rgba(220,220,220,1)",
751 751
                                 data : data2
752 752
                             },
753 753
                             {
754
-                                label: '<?php _e('This Year', 'geodirectory');?>',
754
+                                label: '<?php _e('This Year', 'geodirectory'); ?>',
755 755
                                 fillColor : "rgba(151,187,205,0.5)",
756 756
                                 strokeColor : "rgba(151,187,205,1)",
757 757
                                 data : data1
@@ -796,30 +796,30 @@  discard block
 block discarded – undo
796 796
 
797 797
                     <?php
798 798
                     // Here we list the shorthand days of the week so it can be used in translation.
799
-                    __("Mon",'geodirectory');
800
-                    __("Tue",'geodirectory');
801
-                    __("Wed",'geodirectory');
802
-                    __("Thu",'geodirectory');
803
-                    __("Fri",'geodirectory');
804
-                    __("Sat",'geodirectory');
805
-                    __("Sun",'geodirectory');
799
+                    __("Mon", 'geodirectory');
800
+                    __("Tue", 'geodirectory');
801
+                    __("Wed", 'geodirectory');
802
+                    __("Thu", 'geodirectory');
803
+                    __("Fri", 'geodirectory');
804
+                    __("Sat", 'geodirectory');
805
+                    __("Sun", 'geodirectory');
806 806
                     ?>
807 807
 
808 808
                     labels = [
809
-                        "<?php _e(date('D', strtotime("+1 day")),'geodirectory'); ?>",
810
-                        "<?php _e(date('D', strtotime("+2 day")),'geodirectory'); ?>",
811
-                        "<?php _e(date('D', strtotime("+3 day")),'geodirectory'); ?>",
812
-                        "<?php _e(date('D', strtotime("+4 day")),'geodirectory'); ?>",
813
-                        "<?php _e(date('D', strtotime("+5 day")),'geodirectory'); ?>",
814
-                        "<?php _e(date('D', strtotime("+6 day")),'geodirectory'); ?>",
815
-                        "<?php _e(date('D', strtotime("+7 day")),'geodirectory'); ?>"
809
+                        "<?php _e(date('D', strtotime("+1 day")), 'geodirectory'); ?>",
810
+                        "<?php _e(date('D', strtotime("+2 day")), 'geodirectory'); ?>",
811
+                        "<?php _e(date('D', strtotime("+3 day")), 'geodirectory'); ?>",
812
+                        "<?php _e(date('D', strtotime("+4 day")), 'geodirectory'); ?>",
813
+                        "<?php _e(date('D', strtotime("+5 day")), 'geodirectory'); ?>",
814
+                        "<?php _e(date('D', strtotime("+6 day")), 'geodirectory'); ?>",
815
+                        "<?php _e(date('D', strtotime("+7 day")), 'geodirectory'); ?>"
816 816
                     ];
817 817
 
818 818
                     var data = {
819 819
                         labels : labels,
820 820
                         datasets : [
821 821
                             {
822
-                                label: '<?php _e('Last Week', 'geodirectory');?>',
822
+                                label: '<?php _e('Last Week', 'geodirectory'); ?>',
823 823
                                 fillColor : "rgba(220,220,220,0.5)",
824 824
                                 strokeColor : "rgba(220,220,220,1)",
825 825
                                 pointColor : "rgba(220,220,220,1)",
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
                                 data : data2
828 828
                             },
829 829
                             {
830
-                                label: '<?php _e('This Week', 'geodirectory');?>',
830
+                                label: '<?php _e('This Week', 'geodirectory'); ?>',
831 831
                                 fillColor : "rgba(151,187,205,0.5)",
832 832
                                 strokeColor : "rgba(151,187,205,1)",
833 833
                                 pointColor : "rgba(151,187,205,1)",
@@ -1009,18 +1009,18 @@  discard block
 block discarded – undo
1009 1009
 
1010 1010
 
1011 1011
         <span id="ga_stats">
1012
-            <div id="ga-analytics-title"><?php _e("Analytics", 'geodirectory');?></div>
1012
+            <div id="ga-analytics-title"><?php _e("Analytics", 'geodirectory'); ?></div>
1013 1013
 
1014 1014
             <div id="gd-active-users-container">
1015
-                <div class="gd-ActiveUsers"><?php _e("Active Users:", 'geodirectory');?>
1015
+                <div class="gd-ActiveUsers"><?php _e("Active Users:", 'geodirectory'); ?>
1016 1016
                     <b class="gd-ActiveUsers-value">0</b>
1017 1017
                 </div>
1018 1018
             </div>
1019 1019
 
1020 1020
             <select id="gdga-select-analytic" onchange="gdga_select_option();" style="display: none;">
1021
-                <option value="weeks"><?php _e("Last Week vs This Week", 'geodirectory');?></option>
1022
-                <option value="years"><?php _e("This Year vs Last Year", 'geodirectory');?></option>
1023
-                <option value="country"><?php _e("Top Countries", 'geodirectory');?></option>
1021
+                <option value="weeks"><?php _e("Last Week vs This Week", 'geodirectory'); ?></option>
1022
+                <option value="years"><?php _e("This Year vs Last Year", 'geodirectory'); ?></option>
1023
+                <option value="country"><?php _e("Top Countries", 'geodirectory'); ?></option>
1024 1024
             </select>
1025 1025
             <img alt="loader icon" id="gdga-loader-icon" src="<?php echo geodir_plugin_url() . '/geodirectory-assets/images/ajax-loader.gif'; ?>" />
1026 1026
             <div class="Chartjs-figure" id="gdga-chart-container"></div>
@@ -1038,7 +1038,7 @@  discard block
 block discarded – undo
1038 1038
     $content_html = ob_get_clean();
1039 1039
     if (trim($content_html) != '')
1040 1040
         $content_html = '<div class="geodir-company_info geodir-details-sidebar-google-analytics">' . $content_html . '</div>';
1041
-    if ((int)get_option('geodir_disable_google_analytics_section') != 1) {
1041
+    if ((int) get_option('geodir_disable_google_analytics_section') != 1) {
1042 1042
         /**
1043 1043
          * Filter the geodir_edit_post_link() function content.
1044 1044
          *
@@ -1134,7 +1134,7 @@  discard block
 block discarded – undo
1134 1134
     if (trim($content_html) != '') {
1135 1135
         $content_html = '<div class="geodir-company_info geodir-details-sidebar-rating">' . $content_html . '</div>';
1136 1136
     }
1137
-    if ((int)get_option('geodir_disable_rating_info_section') != 1) {
1137
+    if ((int) get_option('geodir_disable_rating_info_section') != 1) {
1138 1138
         /**
1139 1139
          * Filter the geodir_detail_page_review_rating() function content.
1140 1140
          *
@@ -1174,7 +1174,7 @@  discard block
 block discarded – undo
1174 1174
     $content_html = ob_get_clean();
1175 1175
     if (trim($content_html) != '')
1176 1176
         $content_html = '<div class="geodir-company_info geodir-details-sidebar-listing-info">' . $content_html . '</div>';
1177
-    if ((int)get_option('geodir_disable_listing_info_section') != 1) {
1177
+    if ((int) get_option('geodir_disable_listing_info_section') != 1) {
1178 1178
         /**
1179 1179
          * Filter the output html for function geodir_detail_page_more_info().
1180 1180
          *
@@ -1265,7 +1265,7 @@  discard block
 block discarded – undo
1265 1265
 		'gd_allowed_img_types' => !empty($allowed_img_types) ? implode(',', $allowed_img_types) : '',
1266 1266
 		'geodir_txt_form_wait' => __('Wait...', 'geodirectory'),
1267 1267
 		'geodir_txt_form_searching' => __('Searching...', 'geodirectory'),
1268
-		'fa_rating' => (int)get_option('geodir_reviewrating_enable_font_awesome') == 1 ? 1 : '',
1268
+		'fa_rating' => (int) get_option('geodir_reviewrating_enable_font_awesome') == 1 ? 1 : '',
1269 1269
 		'reviewrating' => defined('GEODIRREVIEWRATING_VERSION') ? 1 : '',
1270 1270
     );
1271 1271
 
@@ -1282,7 +1282,7 @@  discard block
 block discarded – undo
1282 1282
     foreach ($arr_alert_msg as $key => $value) {
1283 1283
         if (!is_scalar($value))
1284 1284
             continue;
1285
-        $arr_alert_msg[$key] = html_entity_decode((string)$value, ENT_QUOTES, 'UTF-8');
1285
+        $arr_alert_msg[$key] = html_entity_decode((string) $value, ENT_QUOTES, 'UTF-8');
1286 1286
     }
1287 1287
 
1288 1288
     $script = "var geodir_all_js_msg = " . json_encode($arr_alert_msg) . ';';
@@ -1458,7 +1458,7 @@  discard block
 block discarded – undo
1458 1458
         global $post;
1459 1459
         $term_condition = '';
1460 1460
         if (isset($_REQUEST['backandedit'])) {
1461
-            $post = (object)$gd_session->get('listing');
1461
+            $post = (object) $gd_session->get('listing');
1462 1462
             $term_condition = isset($post->geodir_accept_term_condition) ? $post->geodir_accept_term_condition : '';
1463 1463
         }
1464 1464
 
@@ -1472,7 +1472,7 @@  discard block
 block discarded – undo
1472 1472
                     echo 'checked="checked"';
1473 1473
                 } ?> field_type="checkbox" name="geodir_accept_term_condition" id="geodir_accept_term_condition"
1474 1474
                        class="geodir_textfield" value="1"
1475
-                       style="display:inline-block"/><a href="<?php $terms_page = get_option('geodir_term_condition_page'); if($terms_page){ echo get_permalink($terms_page);}?>" target="_blank"><?php _e('Please accept our terms and conditions', 'geodirectory'); ?></a>
1475
+                       style="display:inline-block"/><a href="<?php $terms_page = get_option('geodir_term_condition_page'); if ($terms_page) { echo get_permalink($terms_page); }?>" target="_blank"><?php _e('Please accept our terms and conditions', 'geodirectory'); ?></a>
1476 1476
 				</span>
1477 1477
             </div>
1478 1478
             <span class="geodir_message_error"><?php if (isset($required_msg)) {
@@ -1512,7 +1512,7 @@  discard block
 block discarded – undo
1512 1512
         /** This action is documented in geodirectory_template_actions.php */
1513 1513
         $desc_limit = apply_filters('geodir_description_field_desc_limit', '');
1514 1514
         
1515
-        if (!($desc_limit === '' || (int)$desc_limit > 0)) {
1515
+        if (!($desc_limit === '' || (int) $desc_limit > 0)) {
1516 1516
             $is_display = false;
1517 1517
         }
1518 1518
     }
@@ -1586,7 +1586,7 @@  discard block
 block discarded – undo
1586 1586
     global $wpdb, $plugin_prefix;
1587 1587
 	
1588 1588
 	// Remove unused virtual page
1589
-	$listings_page_id = (int)get_option('geodir_listing_page');
1589
+	$listings_page_id = (int) get_option('geodir_listing_page');
1590 1590
 	if ($listings_page_id) {
1591 1591
 		$wpdb->query($wpdb->prepare("DELETE FROM " . $wpdb->posts . " WHERE ID=%d AND post_name = %s AND post_type=%s", array($listings_page_id, 'listings', 'page')));
1592 1592
         delete_option('geodir_listing_page');
@@ -1848,43 +1848,43 @@  discard block
 block discarded – undo
1848 1848
 
1849 1849
 
1850 1850
     $gd_page = '';
1851
-    if(geodir_is_page('home')){
1851
+    if (geodir_is_page('home')) {
1852 1852
         $gd_page = 'home';
1853 1853
         $title = (get_option('geodir_meta_title_homepage')) ? get_option('geodir_meta_title_homepage') : $title;
1854 1854
     }
1855
-    elseif(geodir_is_page('detail')){
1855
+    elseif (geodir_is_page('detail')) {
1856 1856
         $gd_page = 'detail';
1857 1857
         $title = (get_option('geodir_meta_title_detail')) ? get_option('geodir_meta_title_detail') : $title;
1858 1858
     }
1859
-    elseif(geodir_is_page('pt')){
1859
+    elseif (geodir_is_page('pt')) {
1860 1860
         $gd_page = 'pt';
1861 1861
         $title = (get_option('geodir_meta_title_pt')) ? get_option('geodir_meta_title_pt') : $title;
1862 1862
     }
1863
-    elseif(geodir_is_page('listing')){
1863
+    elseif (geodir_is_page('listing')) {
1864 1864
         $gd_page = 'listing';
1865 1865
         $title = (get_option('geodir_meta_title_listing')) ? get_option('geodir_meta_title_listing') : $title;
1866 1866
     }
1867
-    elseif(geodir_is_page('location')){
1867
+    elseif (geodir_is_page('location')) {
1868 1868
         $gd_page = 'location';
1869 1869
         $title = (get_option('geodir_meta_title_location')) ? get_option('geodir_meta_title_location') : $title;
1870 1870
     }
1871
-    elseif(geodir_is_page('search')){
1871
+    elseif (geodir_is_page('search')) {
1872 1872
         $gd_page = 'search';
1873 1873
         $title = (get_option('geodir_meta_title_search')) ? get_option('geodir_meta_title_search') : $title;
1874 1874
     }
1875
-    elseif(geodir_is_page('add-listing')){
1875
+    elseif (geodir_is_page('add-listing')) {
1876 1876
         $gd_page = 'add-listing';
1877 1877
         $title = (get_option('geodir_meta_title_add-listing')) ? get_option('geodir_meta_title_add-listing') : $title;
1878 1878
     }
1879
-    elseif(geodir_is_page('author')){
1879
+    elseif (geodir_is_page('author')) {
1880 1880
         $gd_page = 'author';
1881 1881
         $title = (get_option('geodir_meta_title_author')) ? get_option('geodir_meta_title_author') : $title;
1882 1882
     }
1883
-    elseif(geodir_is_page('login')){
1883
+    elseif (geodir_is_page('login')) {
1884 1884
         $gd_page = 'login';
1885 1885
         $title = (get_option('geodir_meta_title_login')) ? get_option('geodir_meta_title_login') : $title;
1886 1886
     }
1887
-    elseif(geodir_is_page('listing-success')){
1887
+    elseif (geodir_is_page('listing-success')) {
1888 1888
         $gd_page = 'listing-success';
1889 1889
         $title = (get_option('geodir_meta_title_listing-success')) ? get_option('geodir_meta_title_listing-success') : $title;
1890 1890
     }
@@ -2148,7 +2148,7 @@  discard block
 block discarded – undo
2148 2148
  */
2149 2149
 function geodir_remove_template_redirect_actions()
2150 2150
 {
2151
-    if (geodir_is_page('login')){
2151
+    if (geodir_is_page('login')) {
2152 2152
         remove_all_actions('template_redirect');
2153 2153
         remove_action('init', 'avia_modify_front', 10);
2154 2154
     }
@@ -2595,8 +2595,8 @@  discard block
 block discarded – undo
2595 2595
                                 $date_format = $date_format['date_format'];
2596 2596
                             }
2597 2597
 
2598
-                            $search = array('dd','d','DD','mm','m','MM','yy'); //jQuery UI datepicker format
2599
-                            $replace = array('d','j','l','m','n','F','Y');//PHP date format
2598
+                            $search = array('dd', 'd', 'DD', 'mm', 'm', 'MM', 'yy'); //jQuery UI datepicker format
2599
+                            $replace = array('d', 'j', 'l', 'm', 'n', 'F', 'Y'); //PHP date format
2600 2600
 
2601 2601
                             $date_format = str_replace($search, $replace, $date_format);
2602 2602
 
@@ -2691,7 +2691,7 @@  discard block
 block discarded – undo
2691 2691
                             $html_var = $type['htmlvar_name'];
2692 2692
                             $html_val = $type['htmlvar_name'];
2693 2693
 
2694
-                            if ((int)$post->$html_var == 1) {
2694
+                            if ((int) $post->$html_var == 1) {
2695 2695
 
2696 2696
                                 if ($post->$type['htmlvar_name'] == '1') {
2697 2697
                                     $html_val = __('Yes', 'geodirectory');
@@ -2867,7 +2867,7 @@  discard block
 block discarded – undo
2867 2867
 
2868 2868
                                 if (!empty($files)) {
2869 2869
                                     $extra_fields = !empty($type['extra_fields']) ? maybe_unserialize($type['extra_fields']) : NULL;
2870
-                                    $allowed_file_types = !empty($extra_fields['gd_file_types']) && is_array($extra_fields['gd_file_types']) && !in_array("*", $extra_fields['gd_file_types'] ) ? $extra_fields['gd_file_types'] : '';
2870
+                                    $allowed_file_types = !empty($extra_fields['gd_file_types']) && is_array($extra_fields['gd_file_types']) && !in_array("*", $extra_fields['gd_file_types']) ? $extra_fields['gd_file_types'] : '';
2871 2871
                                
2872 2872
                                     $file_paths = '';
2873 2873
                                     foreach ($files as $file) {
@@ -2895,7 +2895,7 @@  discard block
 block discarded – undo
2895 2895
                                             // If the uploaded file is image
2896 2896
                                             if (in_array($uploaded_file_type, $image_file_types)) {
2897 2897
                                                 $file_paths .= '<div class="geodir-custom-post-gallery" class="clearfix">';
2898
-                                                $file_paths .= '<a href="'.$file.'">';
2898
+                                                $file_paths .= '<a href="' . $file . '">';
2899 2899
                                                 $file_paths .= geodir_show_image(array('src' => $file), 'thumbnail', false, false);
2900 2900
                                                 $file_paths .= '</a>';
2901 2901
                                                 $file_paths .= '</div>';
@@ -3245,7 +3245,7 @@  discard block
 block discarded – undo
3245 3245
  * @return array Translation texts.
3246 3246
  */
3247 3247
 function geodir_load_gd_options_text_translation($translation_texts = array()) {
3248
-    $translation_texts = !empty( $translation_texts ) && is_array( $translation_texts ) ? $translation_texts : array();
3248
+    $translation_texts = !empty($translation_texts) && is_array($translation_texts) ? $translation_texts : array();
3249 3249
 
3250 3250
     $gd_options = array('geodir_post_submited_success_email_subject_admin', 'geodir_post_submited_success_email_content_admin', 'geodir_post_submited_success_email_subject', 'geodir_post_submited_success_email_content', 'geodir_forgot_password_subject', 'geodir_forgot_password_content', 'geodir_registration_success_email_subject', 'geodir_registration_success_email_content', 'geodir_post_published_email_subject', 'geodir_post_published_email_content', 'geodir_email_friend_subject', 'geodir_email_friend_content', 'geodir_email_enquiry_subject', 'geodir_email_enquiry_content', 'geodir_post_added_success_msg_content');
3251 3251
 
Please login to merge, or discard this patch.
geodirectory_template_actions.php 1 patch
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -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)) {
@@ -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)) {
@@ -1052,9 +1052,9 @@  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>' : '';
1055
+                $caption = ''; //(!empty($image->caption)) ? '<p class="flex-caption">'.$image->caption.'</p>' : '';
1056 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>';
1057
+                $main_slides .= '<img src="' . $image->src . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:400px;margin:0 auto;" />' . $caption . '</li>';
1058 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
             }
@@ -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();
@@ -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 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: %l', geodir_ucwords($listing_label . ' ' . __('Tags', 'geodirectory')), $links, (object)$terms);
1186
+            $taxonomies[$post_type . '_tags'] = wp_sprintf('%s: %l', geodir_ucwords($listing_label . ' ' . __('Tags', 'geodirectory')), $links, (object) $terms);
1187 1187
         endif;
1188 1188
 
1189 1189
     }
@@ -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: %l', geodir_ucwords($listing_label . ' ' . __('Category', 'geodirectory')), $links, (object)$terms);
1240
+        $taxonomies[$post_taxonomy] = wp_sprintf('%s: %l', geodir_ucwords($listing_label . ' ' . __('Category', 'geodirectory')), $links, (object) $terms);
1241 1241
 
1242 1242
     }
1243 1243
 
@@ -1268,11 +1268,11 @@  discard block
 block discarded – undo
1268 1268
  * @param object $post Optional. The post object or blank.
1269 1269
  * @package GeoDirectory
1270 1270
  */
1271
-function geodir_action_details_micordata($post='')
1271
+function geodir_action_details_micordata($post = '')
1272 1272
 {
1273 1273
 
1274 1274
     global $preview;
1275
-    if(empty($post)){global $post;}
1275
+    if (empty($post)) {global $post; }
1276 1276
     if ($preview || !geodir_is_page('detail')) {
1277 1277
         return;
1278 1278
     }
@@ -1293,7 +1293,7 @@  discard block
 block discarded – undo
1293 1293
                 "description" => $review->comment_content,
1294 1294
                 "reviewRating" => array(
1295 1295
                     "@type" => "Rating",
1296
-                    "bestRating" => "5",// @todo this will need to be filtered for review manager if user changes the score.
1296
+                    "bestRating" => "5", // @todo this will need to be filtered for review manager if user changes the score.
1297 1297
                     "ratingValue" => geodir_get_commentoverall($review->comment_ID),
1298 1298
                     "worstRating" => "1"
1299 1299
                 )
@@ -1321,13 +1321,13 @@  discard block
 block discarded – undo
1321 1321
     }
1322 1322
     //print_r($post);
1323 1323
     // external links
1324
-    $external_links =  array();
1324
+    $external_links = array();
1325 1325
     $external_links[] = $post->geodir_website;
1326 1326
     $external_links[] = $post->geodir_twitter;
1327 1327
     $external_links[] = $post->geodir_facebook;
1328 1328
     $external_links = array_filter($external_links);
1329 1329
 
1330
-    if(!empty($external_links)){
1330
+    if (!empty($external_links)) {
1331 1331
         $external_links = array_values($external_links);
1332 1332
     }
1333 1333
 
@@ -1337,16 +1337,16 @@  discard block
 block discarded – undo
1337 1337
 
1338 1338
     // schema type
1339 1339
     $schema_type = 'LocalBusiness';
1340
-    if(isset($post->default_category) && $post->default_category){
1340
+    if (isset($post->default_category) && $post->default_category) {
1341 1341
         $schema_type = get_tax_meta($post->default_category, 'ct_cat_schema', false, $post->post_type);
1342
-        if(!$schema_type && $post->post_type=='gd_event'){$schema_type = 'Event';}
1342
+        if (!$schema_type && $post->post_type == 'gd_event') {$schema_type = 'Event'; }
1343 1343
     }
1344 1344
 
1345 1345
     $schema = array();
1346 1346
     $schema['@context'] = "http://schema.org";
1347 1347
     $schema['@type'] = $schema_type;
1348 1348
     $schema['name'] = $post->post_name;
1349
-    $schema['description'] = wp_strip_all_tags( $post->post_content, true );
1349
+    $schema['description'] = wp_strip_all_tags($post->post_content, true);
1350 1350
     $schema['telephone'] = $post->geodir_contact;
1351 1351
     $schema['url'] = $c_url;
1352 1352
     $schema['sameAs'] = $external_links;
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
         "postalCode" => $post->post_zip
1361 1361
     );
1362 1362
 
1363
-    if($post->post_latitude && $post->post_longitude) {
1363
+    if ($post->post_latitude && $post->post_longitude) {
1364 1364
         $schema['geo'] = array(
1365 1365
             "@type" => "GeoCoordinates",
1366 1366
             "latitude" => $post->post_latitude,
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
         );
1369 1369
     }
1370 1370
 
1371
-    if($post_avgratings) {
1371
+    if ($post_avgratings) {
1372 1372
         $schema['aggregateRating'] = array(
1373 1373
             "@type" => "AggregateRating",
1374 1374
             "ratingValue" => $post_avgratings,
@@ -1387,7 +1387,7 @@  discard block
 block discarded – undo
1387 1387
      * @param array $schema The array of schema data to be filtered.
1388 1388
      * @param object $post The post object.
1389 1389
      */
1390
-    $schema = apply_filters('geodir_details_schema', $schema,$post);
1390
+    $schema = apply_filters('geodir_details_schema', $schema, $post);
1391 1391
 
1392 1392
 
1393 1393
     echo '<script type="application/ld+json">' . json_encode($schema) . '</script>';
@@ -1595,26 +1595,26 @@  discard block
 block discarded – undo
1595 1595
 
1596 1596
 
1597 1597
     $title = $list_title;
1598
-    if(geodir_is_page('pt')){
1598
+    if (geodir_is_page('pt')) {
1599 1599
         $gd_page = 'pt';
1600
-        $title  = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1600
+        $title = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1601 1601
     }
1602
-    elseif(geodir_is_page('listing')){
1602
+    elseif (geodir_is_page('listing')) {
1603 1603
         $gd_page = 'listing';
1604 1604
         global $wp_query;
1605 1605
         $current_term = $wp_query->get_queried_object();
1606
-        if (strpos($current_term->taxonomy,'_tags') !== false) {
1606
+        if (strpos($current_term->taxonomy, '_tags') !== false) {
1607 1607
             $title = (get_option('geodir_page_title_tag-listing')) ? get_option('geodir_page_title_tag-listing') : $title;
1608
-        }else{
1608
+        } else {
1609 1609
             $title = (get_option('geodir_page_title_cat-listing')) ? get_option('geodir_page_title_cat-listing') : $title;
1610 1610
         }
1611 1611
 
1612 1612
     }
1613
-    elseif(geodir_is_page('author')){
1613
+    elseif (geodir_is_page('author')) {
1614 1614
         $gd_page = 'author';
1615
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
1615
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1616 1616
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
1617
-        }else{
1617
+        } else {
1618 1618
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
1619 1619
         }
1620 1620
 
@@ -1628,7 +1628,7 @@  discard block
 block discarded – undo
1628 1628
      * @param string $title The page title including variables.
1629 1629
      * @param string $gd_page The GeoDirectory page type if any.
1630 1630
      */
1631
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1631
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1632 1632
 
1633 1633
     echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
1634 1634
         /**
@@ -1673,7 +1673,7 @@  discard block
 block discarded – undo
1673 1673
         if ($cat_description) {
1674 1674
             ?>
1675 1675
 
1676
-            <div class="term_description"><?php echo $cat_description;?></div> <?php
1676
+            <div class="term_description"><?php echo $cat_description; ?></div> <?php
1677 1677
         }
1678 1678
 
1679 1679
     }
@@ -1958,7 +1958,7 @@  discard block
 block discarded – undo
1958 1958
      */
1959 1959
     do_action('geodir_main_content_open', 'listings-page', 'geodir-main-content', 'listings-page');
1960 1960
     $extra_class = apply_filters('geodir_before_listing_wrapper_extra_class', '', 'listings-page');
1961
-    echo '<div class="clearfix '.$extra_class.'">';
1961
+    echo '<div class="clearfix ' . $extra_class . '">';
1962 1962
     /**
1963 1963
      * Called before the listings page content, inside the outer wrapper. Used on listings pages and search and author pages.
1964 1964
      *
@@ -2034,11 +2034,11 @@  discard block
 block discarded – undo
2034 2034
 
2035 2035
     $title = apply_filters('geodir_add_listing_page_title_text', get_the_title());
2036 2036
 
2037
-    if(geodir_is_page('add-listing')){
2037
+    if (geodir_is_page('add-listing')) {
2038 2038
         $gd_page = 'add-listing';
2039
-        if(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){
2039
+        if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2040 2040
             $title = (get_option('geodir_page_title_edit-listing')) ? get_option('geodir_page_title_edit-listing') : $title;
2041
-        }elseif(isset($listing_type)){
2041
+        }elseif (isset($listing_type)) {
2042 2042
             $title = (get_option('geodir_page_title_add-listing')) ? get_option('geodir_page_title_add-listing') : $title;
2043 2043
         }
2044 2044
 
@@ -2052,7 +2052,7 @@  discard block
 block discarded – undo
2052 2052
      * @param string $title The page title including variables.
2053 2053
      * @param string $gd_page The GeoDirectory page type if any.
2054 2054
      */
2055
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2055
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2056 2056
 
2057 2057
     echo '<header class="' . $class_header . '"><h1 class="' . $class . '">';
2058 2058
     echo $title;
@@ -2068,7 +2068,7 @@  discard block
 block discarded – undo
2068 2068
  */
2069 2069
 function geodir_action_add_listing_page_mandatory()
2070 2070
 {?>
2071
-    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT;?></p>
2071
+    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT; ?></p>
2072 2072
 <?php
2073 2073
 }
2074 2074
 
@@ -2103,7 +2103,7 @@  discard block
 block discarded – undo
2103 2103
 
2104 2104
     if (isset($_REQUEST['backandedit'])) {
2105 2105
         global $post;
2106
-        $post = (object)$gd_session->get('listing');
2106
+        $post = (object) $gd_session->get('listing');
2107 2107
         $listing_type = $post->listing_type;
2108 2108
         $title = $post->post_title;
2109 2109
         $desc = $post->post_desc;
@@ -2135,15 +2135,15 @@  discard block
 block discarded – undo
2135 2135
         $user_login = true;
2136 2136
     }
2137 2137
     ?>
2138
-    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id());?>" method="post" enctype="multipart/form-data">
2139
-        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type);?>"/>
2140
-        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type);?>"/>
2138
+    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id()); ?>" method="post" enctype="multipart/form-data">
2139
+        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2140
+        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2141 2141
         <?php if ($page_id) { ?>
2142
-        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id;?>"/>
2142
+        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id; ?>"/>
2143 2143
         <?php } if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { ?>
2144
-            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']);?>"/>
2144
+            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']); ?>"/>
2145 2145
         <?php } if (isset($_REQUEST['backandedit'])) { ?>
2146
-            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']);?>"/>
2146
+            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']); ?>"/>
2147 2147
         <?php
2148 2148
         } 
2149 2149
         /**
@@ -2155,7 +2155,7 @@  discard block
 block discarded – undo
2155 2155
          */
2156 2156
         do_action('geodir_before_detail_fields');
2157 2157
         ?>
2158
-        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT;?></h5>
2158
+        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT; ?></h5>
2159 2159
         <?php
2160 2160
         /**
2161 2161
          * Called at the top of the add listing page form for frontend.
@@ -2167,10 +2167,10 @@  discard block
 block discarded – undo
2167 2167
         do_action('geodir_before_main_form_fields');
2168 2168
         ?>
2169 2169
         <div id="geodir_post_title_row" class="required_field geodir_form_row clearfix gd-fieldset-details">
2170
-            <label><?php echo PLACE_TITLE_TEXT;?><span>*</span> </label>
2170
+            <label><?php echo PLACE_TITLE_TEXT; ?><span>*</span> </label>
2171 2171
             <input type="text" field_type="text" name="post_title" id="post_title" class="geodir_textfield"
2172 2172
                    value="<?php echo esc_attr(stripslashes($title)); ?>"/>
2173
-            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory');?></span>
2173
+            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory'); ?></span>
2174 2174
         </div>
2175 2175
         <?php
2176 2176
         $show_editor = get_option('geodir_tiny_editor_on_add_listing');
@@ -2205,7 +2205,7 @@  discard block
 block discarded – undo
2205 2205
         $desc_limit_msg = apply_filters('geodir_description_field_desc_limit_msg', $desc_limit_msg, $desc_limit);
2206 2206
         
2207 2207
         $desc_class = '';
2208
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2208
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2209 2209
             /**
2210 2210
              * Called on the add listing page form for frontend just before the description field.
2211 2211
              *
@@ -2218,8 +2218,8 @@  discard block
 block discarded – undo
2218 2218
             $desc_class = ' hidden';
2219 2219
         }
2220 2220
         ?>
2221
-        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class;?>">
2222
-            <label><?php echo PLACE_DESC_TEXT;?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2221
+        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class; ?>">
2222
+            <label><?php echo PLACE_DESC_TEXT; ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2223 2223
             <?php
2224 2224
             if (!empty($show_editor) && in_array($listing_type, $show_editor)) {
2225 2225
                 $editor_settings = array('media_buttons' => false, 'textarea_rows' => 10);
@@ -2228,16 +2228,16 @@  discard block
 block discarded – undo
2228 2228
                     <?php wp_editor($desc, "post_desc", $editor_settings); ?>
2229 2229
                 </div>
2230 2230
             <?php if ($desc_limit != '') { ?>
2231
-                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit;?>");</script>
2231
+                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit; ?>");</script>
2232 2232
             <?php } } else { ?>
2233 2233
                 <textarea field_type="textarea" name="post_desc" id="post_desc" class="geodir_textarea" maxlength="<?php echo $desc_limit; ?>"><?php echo $desc; ?></textarea>
2234 2234
             <?php } if ($desc_limit_msg != '') { ?>
2235 2235
                 <span class="geodir_message_note"><?php echo $desc_limit_msg; ?></span>
2236 2236
             <?php } ?>
2237
-            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory');?></span>
2237
+            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory'); ?></span>
2238 2238
         </div>
2239 2239
         <?php
2240
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2240
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2241 2241
             /**
2242 2242
              * Called on the add listing page form for frontend just after the description field.
2243 2243
              *
@@ -2276,7 +2276,7 @@  discard block
 block discarded – undo
2276 2276
         $kw_tags_msg = apply_filters('geodir_listing_tags_field_tags_msg', $kw_tags_msg, $kw_tags_count);
2277 2277
         
2278 2278
         $tags_class = '';
2279
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2279
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2280 2280
             /**
2281 2281
              * Called on the add listing page form for frontend just before the tags field.
2282 2282
              *
@@ -2287,14 +2287,14 @@  discard block
 block discarded – undo
2287 2287
             $tags_class = ' hidden';
2288 2288
         }
2289 2289
         ?>
2290
-        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class;?>">
2290
+        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class; ?>">
2291 2291
             <label><?php echo TAGKW_TEXT; ?></label>
2292 2292
             <input name="post_tags" id="post_tags" value="<?php echo $kw_tags; ?>" type="text" class="geodir_textfield"
2293
-                   maxlength="<?php echo $kw_tags_count;?>"/>
2294
-            <span class="geodir_message_note"><?php echo $kw_tags_msg;?></span>
2293
+                   maxlength="<?php echo $kw_tags_count; ?>"/>
2294
+            <span class="geodir_message_note"><?php echo $kw_tags_msg; ?></span>
2295 2295
         </div>
2296 2296
         <?php
2297
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2297
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2298 2298
             /**
2299 2299
              * Called on the add listing page form for frontend just after the tags field.
2300 2300
              *
@@ -2320,7 +2320,7 @@  discard block
 block discarded – undo
2320 2320
         $thumb_img_arr = array();
2321 2321
         $totImg = 0;
2322 2322
         if (isset($_REQUEST['backandedit']) && empty($_REQUEST['pid'])) {
2323
-            $post = (object)$gd_session->get('listing');
2323
+            $post = (object) $gd_session->get('listing');
2324 2324
             if (isset($post->post_images))
2325 2325
                 $curImages = trim($post->post_images, ",");
2326 2326
 
@@ -2333,7 +2333,7 @@  discard block
 block discarded – undo
2333 2333
             $listing_type = $post->listing_type;
2334 2334
 
2335 2335
         } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2336
-            $post = geodir_get_post_info((int)$_REQUEST['pid']);
2336
+            $post = geodir_get_post_info((int) $_REQUEST['pid']);
2337 2337
             $listing_type = $post->post_type;
2338 2338
             $thumb_img_arr = geodir_get_images($_REQUEST['pid']);
2339 2339
 
@@ -2347,7 +2347,7 @@  discard block
 block discarded – undo
2347 2347
                 //$curImages = $img->src.",";
2348 2348
             }
2349 2349
 
2350
-            $totImg = count((array)$thumb_img_arr);
2350
+            $totImg = count((array) $thumb_img_arr);
2351 2351
         }
2352 2352
 
2353 2353
         if ($curImages != '')
@@ -2368,7 +2368,7 @@  discard block
 block discarded – undo
2368 2368
         if ($show_image_input_box) {
2369 2369
             ?>
2370 2370
 
2371
-            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT;?>
2371
+            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT; ?>
2372 2372
                 <?php if ($image_limit == 1) {
2373 2373
                     echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('image with this package', 'geodirectory') . ')</small>';
2374 2374
                 } ?>
@@ -2391,7 +2391,7 @@  discard block
 block discarded – undo
2391 2391
                 <div
2392 2392
                     class="plupload-upload-uic hide-if-no-js <?php if ($multiple): ?>plupload-upload-uic-multiple<?php endif; ?>"
2393 2393
                     id="<?php echo $id; ?>plupload-upload-ui">
2394
-                    <h4><?php _e('Drop files to upload', 'geodirectory');?></h4><br/>
2394
+                    <h4><?php _e('Drop files to upload', 'geodirectory'); ?></h4><br/>
2395 2395
                     <input id="<?php echo $id; ?>plupload-browse-button" type="button"
2396 2396
                            value="<?php esc_attr_e('Select Files', 'geodirectory'); ?>" class="geodir_button"/>
2397 2397
                     <span class="ajaxnonceplu"
@@ -2408,7 +2408,7 @@  discard block
 block discarded – undo
2408 2408
                      id="<?php echo $id; ?>plupload-thumbs" style="border-top:1px solid #ccc; padding-top:10px;">
2409 2409
                 </div>
2410 2410
                 <span
2411
-                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory');?></span>
2411
+                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory'); ?></span>
2412 2412
                 <span id="<?php echo $id; ?>upload-error" style="display:none"></span>
2413 2413
             </div>
2414 2414
 
@@ -2420,7 +2420,7 @@  discard block
 block discarded – undo
2420 2420
          *
2421 2421
          * @since 1.0.0
2422 2422
          */
2423
-        do_action('geodir_after_main_form_fields');?>
2423
+        do_action('geodir_after_main_form_fields'); ?>
2424 2424
 
2425 2425
 
2426 2426
         <!-- add captcha code -->
@@ -2431,7 +2431,7 @@  discard block
 block discarded – undo
2431 2431
         </script>
2432 2432
         <noscript>
2433 2433
             <div>
2434
-                <label><?php _e('Type 64 into this box', 'geodirectory');?></label>
2434
+                <label><?php _e('Type 64 into this box', 'geodirectory'); ?></label>
2435 2435
                 <input type="text" id="geodir_spamblocker_top_form" name="geodir_spamblocker" value="" maxlength="10"/>
2436 2436
             </div>
2437 2437
         </noscript>
@@ -2441,10 +2441,10 @@  discard block
 block discarded – undo
2441 2441
         <!-- end captcha code -->
2442 2442
 
2443 2443
         <div id="geodir-add-listing-submit" class="geodir_form_row clear_both" style="padding:2px;text-align:center;">
2444
-            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON;?>"
2445
-                   class="geodir_button" <?php echo $submit_button;?>/>
2444
+            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON; ?>"
2445
+                   class="geodir_button" <?php echo $submit_button; ?>/>
2446 2446
             <span class="geodir_message_note"
2447
-                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory');?></span>
2447
+                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory'); ?></span>
2448 2448
         </div>
2449 2449
 
2450 2450
     </form>
@@ -2506,7 +2506,7 @@  discard block
 block discarded – undo
2506 2506
         class="<?php
2507 2507
         /** This action is documented in geodirectory_template_actions.php */
2508 2508
         echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'Reg/Login Top Section'); ?>">
2509
-        <?php dynamic_sidebar('Reg/Login Top Section');?>
2509
+        <?php dynamic_sidebar('Reg/Login Top Section'); ?>
2510 2510
     </div><!-- clearfix ends here-->
2511 2511
 <?php
2512 2512
 }
@@ -2528,7 +2528,7 @@  discard block
 block discarded – undo
2528 2528
 
2529 2529
     ?>
2530 2530
     <script type="text/javascript">
2531
-        <?php if ( $user_login ) { ?>
2531
+        <?php if ($user_login) { ?>
2532 2532
         setTimeout(function () {
2533 2533
             try {
2534 2534
                 d = document.getElementById('user_pass');
@@ -2545,7 +2545,7 @@  discard block
 block discarded – undo
2545 2545
         <?php } ?>
2546 2546
     </script>
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');
@@ -2683,11 +2683,11 @@  discard block
 block discarded – undo
2683 2683
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2684 2684
 
2685 2685
     $title = $list_title;
2686
-    if(geodir_is_page('author')){
2686
+    if (geodir_is_page('author')) {
2687 2687
         $gd_page = 'author';
2688
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
2688
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2689 2689
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
2690
-        }else{
2690
+        } else {
2691 2691
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
2692 2692
         }
2693 2693
 
@@ -2701,7 +2701,7 @@  discard block
 block discarded – undo
2701 2701
      * @param string $title The page title including variables.
2702 2702
      * @param string $gd_page The GeoDirectory page type if any.
2703 2703
      */
2704
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2704
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2705 2705
 
2706 2706
     echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2707 2707
         /**
@@ -2915,7 +2915,7 @@  discard block
 block discarded – undo
2915 2915
     $post_type_info = get_post_type_object($gd_post_type);
2916 2916
 
2917 2917
     $pt_name = '';
2918
-    if(isset($post_type_info->labels->name)){$pt_name=$post_type_info->labels->name;}
2918
+    if (isset($post_type_info->labels->name)) {$pt_name = $post_type_info->labels->name; }
2919 2919
 
2920 2920
     if (is_search()) {
2921 2921
         $list_title = __('Search', 'geodirectory') . ' ' . __($pt_name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
Please login to merge, or discard this patch.