|
@@ -283,7 +283,7 @@ discard block |
|
|
block discarded – undo |
|
283
|
283
|
|
|
284
|
284
|
//php
|
|
285
|
285
|
if (!empty($tc['geodir_theme_compat_code'])) {
|
|
286
|
|
- include_once('geodirectory-functions/compatibility/' . $tc['geodir_theme_compat_code'] . '.php');
|
|
|
286
|
+ include_once('geodirectory-functions/compatibility/'.$tc['geodir_theme_compat_code'].'.php');
|
|
287
|
287
|
}
|
|
288
|
288
|
|
|
289
|
289
|
//geodir_full_page_class
|
|
@@ -453,13 +453,13 @@ discard block |
|
|
block discarded – undo |
|
453
|
453
|
function geodir_action_wrapper_content_open($type = '', $id = '', $class = '')
|
|
454
|
454
|
{
|
|
455
|
455
|
if ($type == 'home-page' && $width = get_option('geodir_width_home_contant_section')) {
|
|
456
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
456
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
457
|
457
|
} elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_contant_section')) {
|
|
458
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
458
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
459
|
459
|
} elseif ($type == 'search-page' && $width = get_option('geodir_width_search_contant_section')) {
|
|
460
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
460
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
461
|
461
|
} elseif ($type == 'author-page' && $width = get_option('geodir_width_author_contant_section')) {
|
|
462
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
462
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
463
|
463
|
} else {
|
|
464
|
464
|
$width_css = '';
|
|
465
|
465
|
}
|
|
@@ -573,13 +573,13 @@ discard block |
|
|
block discarded – undo |
|
573
|
573
|
function geodir_action_sidebar_right_open($type = '', $id = '', $class = '', $itemtype = '')
|
|
574
|
574
|
{
|
|
575
|
575
|
if ($type == 'home-page' && $width = get_option('geodir_width_home_right_section')) {
|
|
576
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
576
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
577
|
577
|
} elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_right_section')) {
|
|
578
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
578
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
579
|
579
|
} elseif ($type == 'search-page' && $width = get_option('geodir_width_search_right_section')) {
|
|
580
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
580
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
581
|
581
|
} elseif ($type == 'author-page' && $width = get_option('geodir_width_author_right_section')) {
|
|
582
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
582
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
583
|
583
|
} else {
|
|
584
|
584
|
$width_css = '';
|
|
585
|
585
|
}
|
|
@@ -677,7 +677,7 @@ discard block |
|
|
block discarded – undo |
|
677
|
677
|
}
|
|
678
|
678
|
}
|
|
679
|
679
|
|
|
680
|
|
- $post = (object)$_REQUEST;
|
|
|
680
|
+ $post = (object) $_REQUEST;
|
|
681
|
681
|
|
|
682
|
682
|
|
|
683
|
683
|
if (isset($post->video)) {
|
|
@@ -736,10 +736,10 @@ discard block |
|
|
block discarded – undo |
|
736
|
736
|
|
|
737
|
737
|
$json = '{';
|
|
738
|
738
|
$json .= '"post_preview": "1",';
|
|
739
|
|
- $json .= '"t": "' . $json_title . '",';
|
|
740
|
|
- $json .= '"lt": "' . $post_latitude . '",';
|
|
741
|
|
- $json .= '"ln": "' . $post_longitude . '",';
|
|
742
|
|
- $json .= '"i":"' . $term_icon . '"';
|
|
|
739
|
+ $json .= '"t": "'.$json_title.'",';
|
|
|
740
|
+ $json .= '"lt": "'.$post_latitude.'",';
|
|
|
741
|
+ $json .= '"ln": "'.$post_longitude.'",';
|
|
|
742
|
+ $json .= '"i":"'.$term_icon.'"';
|
|
743
|
743
|
$json .= '}';
|
|
744
|
744
|
|
|
745
|
745
|
$post->marker_json = $json;
|
|
@@ -966,7 +966,7 @@ discard block |
|
|
block discarded – undo |
|
966
|
966
|
* @param string $class The class to use. Default is 'entry-header'.
|
|
967
|
967
|
*/
|
|
968
|
968
|
$class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
|
|
969
|
|
- echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' . stripslashes(get_the_title()) . '</h1></header>';
|
|
|
969
|
+ echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.stripslashes(get_the_title()).'</h1></header>';
|
|
970
|
970
|
}
|
|
971
|
971
|
|
|
972
|
972
|
|
|
@@ -1020,7 +1020,7 @@ discard block |
|
|
block discarded – undo |
|
1020
|
1020
|
$height = !empty($sizes) && isset($sizes[1]) ? $sizes[1] : 0;
|
|
1021
|
1021
|
|
|
1022
|
1022
|
if ($image && $width && $height) {
|
|
1023
|
|
- $image = (object)array('src' => $image, 'width' => $width, 'height' => $height);
|
|
|
1023
|
+ $image = (object) array('src' => $image, 'width' => $width, 'height' => $height);
|
|
1024
|
1024
|
}
|
|
1025
|
1025
|
|
|
1026
|
1026
|
if (isset($image->src)) {
|
|
@@ -1032,9 +1032,9 @@ discard block |
|
|
block discarded – undo |
|
1032
|
1032
|
|
|
1033
|
1033
|
$image_title = isset($image->title) ? $image->title : '';
|
|
1034
|
1034
|
|
|
1035
|
|
- $main_slides .= '<li><img src="' . geodir_plugin_url() . "/geodirectory-assets/images/spacer.gif" . '" alt="' . $image_title . '" title="' . $image_title . '" style="max-height:' . $spacer_height . 'px;margin:0 auto;" />';
|
|
1036
|
|
- $main_slides .= '<img src="' . $image->src . '" alt="' . $image_title . '" title="' . $image_title . '" style="max-height:400px;margin:0 auto;" /></li>';
|
|
1037
|
|
- $nav_slides .= '<li><img src="' . $image->src . '" alt="' . $image_title . '" title="' . $image_title . '" style="max-height:48px;margin:0 auto;" /></li>';
|
|
|
1035
|
+ $main_slides .= '<li><img src="'.geodir_plugin_url()."/geodirectory-assets/images/spacer.gif".'" alt="'.$image_title.'" title="'.$image_title.'" style="max-height:'.$spacer_height.'px;margin:0 auto;" />';
|
|
|
1036
|
+ $main_slides .= '<img src="'.$image->src.'" alt="'.$image_title.'" title="'.$image_title.'" style="max-height:400px;margin:0 auto;" /></li>';
|
|
|
1037
|
+ $nav_slides .= '<li><img src="'.$image->src.'" alt="'.$image_title.'" title="'.$image_title.'" style="max-height:48px;margin:0 auto;" /></li>';
|
|
1038
|
1038
|
$slides++;
|
|
1039
|
1039
|
}
|
|
1040
|
1040
|
}
|
|
@@ -1060,10 +1060,10 @@ discard block |
|
|
block discarded – undo |
|
1060
|
1060
|
} else {
|
|
1061
|
1061
|
$spacer_height = ((400 - $image->height) / 2);
|
|
1062
|
1062
|
}
|
|
1063
|
|
- $caption = '';//(!empty($image->caption)) ? '<p class="flex-caption">'.$image->caption.'</p>' : '';
|
|
1064
|
|
- $main_slides .= '<li><img src="' . geodir_plugin_url() . "/geodirectory-assets/images/spacer.gif" . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:' . $spacer_height . 'px;margin:0 auto;" />';
|
|
1065
|
|
- $main_slides .= '<img src="' . $image->src . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:400px;margin:0 auto;" />'.$caption.'</li>';
|
|
1066
|
|
- $nav_slides .= '<li><img src="' . $image->src . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:48px;margin:0 auto;" /></li>';
|
|
|
1063
|
+ $caption = ''; //(!empty($image->caption)) ? '<p class="flex-caption">'.$image->caption.'</p>' : '';
|
|
|
1064
|
+ $main_slides .= '<li><img src="'.geodir_plugin_url()."/geodirectory-assets/images/spacer.gif".'" alt="'.$image->title.'" title="'.$image->title.'" style="max-height:'.$spacer_height.'px;margin:0 auto;" />';
|
|
|
1065
|
+ $main_slides .= '<img src="'.$image->src.'" alt="'.$image->title.'" title="'.$image->title.'" style="max-height:400px;margin:0 auto;" />'.$caption.'</li>';
|
|
|
1066
|
+ $nav_slides .= '<li><img src="'.$image->src.'" alt="'.$image->title.'" title="'.$image->title.'" style="max-height:48px;margin:0 auto;" /></li>';
|
|
1067
|
1067
|
$slides++;
|
|
1068
|
1068
|
}
|
|
1069
|
1069
|
}// endfore
|
|
@@ -1098,7 +1098,7 @@ discard block |
|
|
block discarded – undo |
|
1098
|
1098
|
*/
|
|
1099
|
1099
|
function geodir_action_details_taxonomies()
|
|
1100
|
1100
|
{
|
|
1101
|
|
- global $preview, $post;?>
|
|
|
1101
|
+ global $preview, $post; ?>
|
|
1102
|
1102
|
<p class="geodir_post_taxomomies clearfix">
|
|
1103
|
1103
|
<?php
|
|
1104
|
1104
|
$taxonomies = array();
|
|
@@ -1107,11 +1107,11 @@ discard block |
|
|
block discarded – undo |
|
1107
|
1107
|
|
|
1108
|
1108
|
if ($preview && !$is_backend_preview) {
|
|
1109
|
1109
|
$post_type = $post->listing_type;
|
|
1110
|
|
- $post_taxonomy = $post_type . 'category';
|
|
|
1110
|
+ $post_taxonomy = $post_type.'category';
|
|
1111
|
1111
|
$post->{$post_taxonomy} = $post->post_category[$post_taxonomy];
|
|
1112
|
1112
|
} else {
|
|
1113
|
1113
|
$post_type = $post->post_type;
|
|
1114
|
|
- $post_taxonomy = $post_type . 'category';
|
|
|
1114
|
+ $post_taxonomy = $post_type.'category';
|
|
1115
|
1115
|
}
|
|
1116
|
1116
|
//{
|
|
1117
|
1117
|
$post_type_info = get_post_type_object($post_type);
|
|
@@ -1119,7 +1119,7 @@ discard block |
|
|
block discarded – undo |
|
1119
|
1119
|
|
|
1120
|
1120
|
if (!empty($post->post_tags)) {
|
|
1121
|
1121
|
|
|
1122
|
|
- if (taxonomy_exists($post_type . '_tags')):
|
|
|
1122
|
+ if (taxonomy_exists($post_type.'_tags')):
|
|
1123
|
1123
|
$links = array();
|
|
1124
|
1124
|
$terms = array();
|
|
1125
|
1125
|
// to limit post tags
|
|
@@ -1146,8 +1146,8 @@ discard block |
|
|
block discarded – undo |
|
1146
|
1146
|
$post_term = trim($post_term);
|
|
1147
|
1147
|
|
|
1148
|
1148
|
$priority_location = false;
|
|
1149
|
|
- if ($insert_term = term_exists($post_term, $post_type . '_tags')) {
|
|
1150
|
|
- $term = get_term_by('id', $insert_term['term_id'], $post_type . '_tags');
|
|
|
1149
|
+ if ($insert_term = term_exists($post_term, $post_type.'_tags')) {
|
|
|
1150
|
+ $term = get_term_by('id', $insert_term['term_id'], $post_type.'_tags');
|
|
1151
|
1151
|
} else {
|
|
1152
|
1152
|
$post_country = isset($_REQUEST['post_country']) && $_REQUEST['post_country'] != '' ? sanitize_text_field($_REQUEST['post_country']) : NULL;
|
|
1153
|
1153
|
$post_region = isset($_REQUEST['post_region']) && $_REQUEST['post_region'] != '' ? sanitize_text_field($_REQUEST['post_region']) : NULL;
|
|
@@ -1157,10 +1157,10 @@ discard block |
|
|
block discarded – undo |
|
1157
|
1157
|
$match_city = $post_city && sanitize_title($post_term) == sanitize_title($post_city) ? true : false;
|
|
1158
|
1158
|
if ($match_country || $match_region || $match_city) {
|
|
1159
|
1159
|
$priority_location = true;
|
|
1160
|
|
- $term = get_term_by('name', $post_term, $post_type . '_tags');
|
|
|
1160
|
+ $term = get_term_by('name', $post_term, $post_type.'_tags');
|
|
1161
|
1161
|
} else {
|
|
1162
|
|
- $insert_term = wp_insert_term($post_term, $post_type . '_tags');
|
|
1163
|
|
- $term = get_term_by('name', $post_term, $post_type . '_tags');
|
|
|
1162
|
+ $insert_term = wp_insert_term($post_term, $post_type.'_tags');
|
|
|
1163
|
+ $term = get_term_by('name', $post_term, $post_type.'_tags');
|
|
1164
|
1164
|
}
|
|
1165
|
1165
|
}
|
|
1166
|
1166
|
|
|
@@ -1177,12 +1177,12 @@ discard block |
|
|
block discarded – undo |
|
1177
|
1177
|
* @param string $tag_link The tag link html.
|
|
1178
|
1178
|
* @param object $term The tag term object.
|
|
1179
|
1179
|
*/
|
|
1180
|
|
- $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
|
|
|
1180
|
+ $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
|
|
1181
|
1181
|
$links[] = $tag_link;
|
|
1182
|
1182
|
} else {
|
|
1183
|
|
- $tag_link = "<a href='" . esc_attr(get_term_link($term->term_id, $term->taxonomy)) . "'>$term->name</a>";
|
|
|
1183
|
+ $tag_link = "<a href='".esc_attr(get_term_link($term->term_id, $term->taxonomy))."'>$term->name</a>";
|
|
1184
|
1184
|
/** This action is documented in geodirectory-template_actions.php */
|
|
1185
|
|
- $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
|
|
|
1185
|
+ $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
|
|
1186
|
1186
|
$links[] = $tag_link;
|
|
1187
|
1187
|
}
|
|
1188
|
1188
|
$terms[] = $term;
|
|
@@ -1192,7 +1192,7 @@ discard block |
|
|
block discarded – undo |
|
1192
|
1192
|
if (!isset($listing_label)) {
|
|
1193
|
1193
|
$listing_label = '';
|
|
1194
|
1194
|
}
|
|
1195
|
|
- $taxonomies[$post_type . '_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
|
|
|
1195
|
+ $taxonomies[$post_type.'_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
|
|
1196
|
1196
|
endif;
|
|
1197
|
1197
|
|
|
1198
|
1198
|
}
|
|
@@ -1220,7 +1220,7 @@ discard block |
|
|
block discarded – undo |
|
1220
|
1220
|
$term = get_term_by('id', $post_term, $post_taxonomy);
|
|
1221
|
1221
|
|
|
1222
|
1222
|
if (is_object($term)) {
|
|
1223
|
|
- $term_link = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>$term->name</a>";
|
|
|
1223
|
+ $term_link = "<a href='".esc_attr(get_term_link($term, $post_taxonomy))."'>$term->name</a>";
|
|
1224
|
1224
|
/**
|
|
1225
|
1225
|
* Filter the category name on the details page.
|
|
1226
|
1226
|
*
|
|
@@ -1228,7 +1228,7 @@ discard block |
|
|
block discarded – undo |
|
1228
|
1228
|
* @param string $term_link The link html to the category.
|
|
1229
|
1229
|
* @param object $term The category term object.
|
|
1230
|
1230
|
*/
|
|
1231
|
|
- $term_link = apply_filters('geodir_details_taxonomies_cat_link',$term_link,$term);
|
|
|
1231
|
+ $term_link = apply_filters('geodir_details_taxonomies_cat_link', $term_link, $term);
|
|
1232
|
1232
|
$links[] = $term_link;
|
|
1233
|
1233
|
$terms[] = $term;
|
|
1234
|
1234
|
}
|
|
@@ -1246,7 +1246,7 @@ discard block |
|
|
block discarded – undo |
|
1246
|
1246
|
if (!isset($listing_label)) {
|
|
1247
|
1247
|
$listing_label = '';
|
|
1248
|
1248
|
}
|
|
1249
|
|
- $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
|
|
|
1249
|
+ $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
|
|
1250
|
1250
|
|
|
1251
|
1251
|
}
|
|
1252
|
1252
|
|
|
@@ -1259,14 +1259,14 @@ discard block |
|
|
block discarded – undo |
|
1259
|
1259
|
* @param string $listing_label The post type label.
|
|
1260
|
1260
|
* @param string $listing_label The post type label with ucwords function.
|
|
1261
|
1261
|
*/
|
|
1262
|
|
- $taxonomies = apply_filters('geodir_details_taxonomies_output',$taxonomies,$post_type,$listing_label,geodir_ucwords($listing_label));
|
|
|
1262
|
+ $taxonomies = apply_filters('geodir_details_taxonomies_output', $taxonomies, $post_type, $listing_label, geodir_ucwords($listing_label));
|
|
1263
|
1263
|
|
|
1264
|
1264
|
if (isset($taxonomies[$post_taxonomy])) {
|
|
1265
|
|
- echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
|
|
|
1265
|
+ echo '<span class="geodir-category">'.$taxonomies[$post_taxonomy].'</span>';
|
|
1266
|
1266
|
}
|
|
1267
|
1267
|
|
|
1268
|
|
- if (isset($taxonomies[$post_type . '_tags']))
|
|
1269
|
|
- echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
|
|
|
1268
|
+ if (isset($taxonomies[$post_type.'_tags']))
|
|
|
1269
|
+ echo '<span class="geodir-tags">'.$taxonomies[$post_type.'_tags'].'</span>';
|
|
1270
|
1270
|
|
|
1271
|
1271
|
?>
|
|
1272
|
1272
|
</p><?php
|
|
@@ -1287,11 +1287,11 @@ discard block |
|
|
block discarded – undo |
|
1287
|
1287
|
* @param object $post Optional. The post object or blank.
|
|
1288
|
1288
|
* @package GeoDirectory
|
|
1289
|
1289
|
*/
|
|
1290
|
|
-function geodir_action_details_micordata($post='')
|
|
|
1290
|
+function geodir_action_details_micordata($post = '')
|
|
1291
|
1291
|
{
|
|
1292
|
1292
|
|
|
1293
|
1293
|
global $preview;
|
|
1294
|
|
- if(empty($post)){global $post;}
|
|
|
1294
|
+ if (empty($post)) {global $post; }
|
|
1295
|
1295
|
if ($preview || !geodir_is_page('detail')) {
|
|
1296
|
1296
|
return;
|
|
1297
|
1297
|
}
|
|
@@ -1312,7 +1312,7 @@ discard block |
|
|
block discarded – undo |
|
1312
|
1312
|
"description" => $review->comment_content,
|
|
1313
|
1313
|
"reviewRating" => array(
|
|
1314
|
1314
|
"@type" => "Rating",
|
|
1315
|
|
- "bestRating" => "5",// @todo this will need to be filtered for review manager if user changes the score.
|
|
|
1315
|
+ "bestRating" => "5", // @todo this will need to be filtered for review manager if user changes the score.
|
|
1316
|
1316
|
"ratingValue" => geodir_get_commentoverall($review->comment_ID),
|
|
1317
|
1317
|
"worstRating" => "1"
|
|
1318
|
1318
|
)
|
|
@@ -1340,13 +1340,13 @@ discard block |
|
|
block discarded – undo |
|
1340
|
1340
|
}
|
|
1341
|
1341
|
//print_r($post);
|
|
1342
|
1342
|
// external links
|
|
1343
|
|
- $external_links = array();
|
|
|
1343
|
+ $external_links = array();
|
|
1344
|
1344
|
$external_links[] = $post->geodir_website;
|
|
1345
|
1345
|
$external_links[] = $post->geodir_twitter;
|
|
1346
|
1346
|
$external_links[] = $post->geodir_facebook;
|
|
1347
|
1347
|
$external_links = array_filter($external_links);
|
|
1348
|
1348
|
|
|
1349
|
|
- if(!empty($external_links)){
|
|
|
1349
|
+ if (!empty($external_links)) {
|
|
1350
|
1350
|
$external_links = array_values($external_links);
|
|
1351
|
1351
|
}
|
|
1352
|
1352
|
|
|
@@ -1356,17 +1356,17 @@ discard block |
|
|
block discarded – undo |
|
1356
|
1356
|
|
|
1357
|
1357
|
// schema type
|
|
1358
|
1358
|
$schema_type = 'LocalBusiness';
|
|
1359
|
|
- if(isset($post->default_category) && $post->default_category){
|
|
|
1359
|
+ if (isset($post->default_category) && $post->default_category) {
|
|
1360
|
1360
|
$cat_schema = get_tax_meta($post->default_category, 'ct_cat_schema', false, $post->post_type);
|
|
1361
|
|
- if($cat_schema){$schema_type = $cat_schema;}
|
|
1362
|
|
- if(!$schema_type && $post->post_type=='gd_event'){$schema_type = 'Event';}
|
|
|
1361
|
+ if ($cat_schema) {$schema_type = $cat_schema; }
|
|
|
1362
|
+ if (!$schema_type && $post->post_type == 'gd_event') {$schema_type = 'Event'; }
|
|
1363
|
1363
|
}
|
|
1364
|
1364
|
|
|
1365
|
1365
|
$schema = array();
|
|
1366
|
1366
|
$schema['@context'] = "https://schema.org";
|
|
1367
|
1367
|
$schema['@type'] = $schema_type;
|
|
1368
|
1368
|
$schema['name'] = $post->post_title;
|
|
1369
|
|
- $schema['description'] = wp_strip_all_tags( $post->post_content, true );
|
|
|
1369
|
+ $schema['description'] = wp_strip_all_tags($post->post_content, true);
|
|
1370
|
1370
|
$schema['telephone'] = $post->geodir_contact;
|
|
1371
|
1371
|
$schema['url'] = $c_url;
|
|
1372
|
1372
|
$schema['sameAs'] = $external_links;
|
|
@@ -1380,7 +1380,7 @@ discard block |
|
|
block discarded – undo |
|
1380
|
1380
|
"postalCode" => $post->post_zip
|
|
1381
|
1381
|
);
|
|
1382
|
1382
|
|
|
1383
|
|
- if($post->post_latitude && $post->post_longitude) {
|
|
|
1383
|
+ if ($post->post_latitude && $post->post_longitude) {
|
|
1384
|
1384
|
$schema['geo'] = array(
|
|
1385
|
1385
|
"@type" => "GeoCoordinates",
|
|
1386
|
1386
|
"latitude" => $post->post_latitude,
|
|
@@ -1388,7 +1388,7 @@ discard block |
|
|
block discarded – undo |
|
1388
|
1388
|
);
|
|
1389
|
1389
|
}
|
|
1390
|
1390
|
|
|
1391
|
|
- if($post_avgratings) {
|
|
|
1391
|
+ if ($post_avgratings) {
|
|
1392
|
1392
|
$schema['aggregateRating'] = array(
|
|
1393
|
1393
|
"@type" => "AggregateRating",
|
|
1394
|
1394
|
"ratingValue" => $post_avgratings,
|
|
@@ -1407,10 +1407,10 @@ discard block |
|
|
block discarded – undo |
|
1407
|
1407
|
* @param array $schema The array of schema data to be filtered.
|
|
1408
|
1408
|
* @param object $post The post object.
|
|
1409
|
1409
|
*/
|
|
1410
|
|
- $schema = apply_filters('geodir_details_schema', $schema,$post);
|
|
|
1410
|
+ $schema = apply_filters('geodir_details_schema', $schema, $post);
|
|
1411
|
1411
|
|
|
1412
|
1412
|
|
|
1413
|
|
- echo '<script type="application/ld+json">' . json_encode($schema) . '</script>';
|
|
|
1413
|
+ echo '<script type="application/ld+json">'.json_encode($schema).'</script>';
|
|
1414
|
1414
|
|
|
1415
|
1415
|
|
|
1416
|
1416
|
$uploads = wp_upload_dir();
|
|
@@ -1423,7 +1423,7 @@ discard block |
|
|
block discarded – undo |
|
1423
|
1423
|
* @param string $facebook_og The open graph html to be filtered.
|
|
1424
|
1424
|
* @param object $post The post object.
|
|
1425
|
1425
|
*/
|
|
1426
|
|
- echo apply_filters('geodir_details_facebook_og', $facebook_og,$post);
|
|
|
1426
|
+ echo apply_filters('geodir_details_facebook_og', $facebook_og, $post);
|
|
1427
|
1427
|
|
|
1428
|
1428
|
|
|
1429
|
1429
|
|
|
@@ -1446,9 +1446,9 @@ discard block |
|
|
block discarded – undo |
|
1446
|
1446
|
?>
|
|
1447
|
1447
|
<div class="geodir-pos_navigation clearfix">
|
|
1448
|
1448
|
<div
|
|
1449
|
|
- class="geodir-post_left"><?php previous_post_link('%link', '' . __('Previous', 'geodirectory'), false) ?></div>
|
|
|
1449
|
+ class="geodir-post_left"><?php previous_post_link('%link', ''.__('Previous', 'geodirectory'), false) ?></div>
|
|
1450
|
1450
|
<div
|
|
1451
|
|
- class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory') . '', false) ?></div>
|
|
|
1451
|
+ class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory').'', false) ?></div>
|
|
1452
|
1452
|
</div><?php
|
|
1453
|
1453
|
}
|
|
1454
|
1454
|
|
|
@@ -1517,12 +1517,12 @@ discard block |
|
|
block discarded – undo |
|
1517
|
1517
|
$gd_post_type = geodir_get_current_posttype();
|
|
1518
|
1518
|
$post_type_info = get_post_type_object($gd_post_type);
|
|
1519
|
1519
|
|
|
1520
|
|
- $add_string_in_title = __('All', 'geodirectory') . ' ';
|
|
|
1520
|
+ $add_string_in_title = __('All', 'geodirectory').' ';
|
|
1521
|
1521
|
if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
|
|
1522
|
|
- $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
|
|
|
1522
|
+ $add_string_in_title = __('My Favorite', 'geodirectory').' ';
|
|
1523
|
1523
|
}
|
|
1524
|
1524
|
|
|
1525
|
|
- $list_title = $add_string_in_title . __($post_type_info->labels->name, 'geodirectory');
|
|
|
1525
|
+ $list_title = $add_string_in_title.__($post_type_info->labels->name, 'geodirectory');
|
|
1526
|
1526
|
$single_name = $post_type_info->labels->singular_name;
|
|
1527
|
1527
|
|
|
1528
|
1528
|
$taxonomy = geodir_get_taxonomies($gd_post_type, true);
|
|
@@ -1550,12 +1550,12 @@ discard block |
|
|
block discarded – undo |
|
1550
|
1550
|
$current_term = get_term_by('slug', $term, $taxonomy[0]);
|
|
1551
|
1551
|
if (!empty($current_term)) {
|
|
1552
|
1552
|
$current_term_name = __(ucfirst($current_term->name), 'geodirectory');
|
|
1553
|
|
- if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
|
|
|
1553
|
+ if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
|
|
1554
|
1554
|
$location_last_char = substr($location_name, -1);
|
|
1555
|
1555
|
$location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
|
|
1556
|
|
- $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
|
|
|
1556
|
+ $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
|
|
1557
|
1557
|
} else {
|
|
1558
|
|
- $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
|
|
|
1558
|
+ $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
|
|
1559
|
1559
|
}
|
|
1560
|
1560
|
} else {
|
|
1561
|
1561
|
if (count($taxonomy) > 1) {
|
|
@@ -1563,12 +1563,12 @@ discard block |
|
|
block discarded – undo |
|
1563
|
1563
|
|
|
1564
|
1564
|
if (!empty($current_term)) {
|
|
1565
|
1565
|
$current_term_name = __(ucfirst($current_term->name), 'geodirectory');
|
|
1566
|
|
- if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
|
|
|
1566
|
+ if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
|
|
1567
|
1567
|
$location_last_char = substr($location_name, -1);
|
|
1568
|
1568
|
$location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
|
|
1569
|
|
- $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
|
|
|
1569
|
+ $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
|
|
1570
|
1570
|
} else {
|
|
1571
|
|
- $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
|
|
|
1571
|
+ $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
|
|
1572
|
1572
|
}
|
|
1573
|
1573
|
}
|
|
1574
|
1574
|
}
|
|
@@ -1596,7 +1596,7 @@ discard block |
|
|
block discarded – undo |
|
1596
|
1596
|
$gd_city = __(geodir_ucwords($gd_city), 'geodirectory');
|
|
1597
|
1597
|
}
|
|
1598
|
1598
|
|
|
1599
|
|
- $list_title .= __(' in', 'geodirectory') . " '" . $gd_city . "'";
|
|
|
1599
|
+ $list_title .= __(' in', 'geodirectory')." '".$gd_city."'";
|
|
1600
|
1600
|
} else if ($gd_region != '') {
|
|
1601
|
1601
|
if ($gd_region_actual != '') {
|
|
1602
|
1602
|
$gd_region = $gd_region_actual;
|
|
@@ -1606,7 +1606,7 @@ discard block |
|
|
block discarded – undo |
|
1606
|
1606
|
$gd_region = __(geodir_ucwords($gd_region), 'geodirectory');
|
|
1607
|
1607
|
}
|
|
1608
|
1608
|
|
|
1609
|
|
- $list_title .= __(' in', 'geodirectory') . " '" . $gd_region . "'";
|
|
|
1609
|
+ $list_title .= __(' in', 'geodirectory')." '".$gd_region."'";
|
|
1610
|
1610
|
} else if ($gd_country != '') {
|
|
1611
|
1611
|
if ($gd_country_actual != '') {
|
|
1612
|
1612
|
$gd_country = $gd_country_actual;
|
|
@@ -1616,12 +1616,12 @@ discard block |
|
|
block discarded – undo |
|
1616
|
1616
|
$gd_country = __(geodir_ucwords($gd_country), 'geodirectory');
|
|
1617
|
1617
|
}
|
|
1618
|
1618
|
|
|
1619
|
|
- $list_title .= __(' in', 'geodirectory') . " '" . $gd_country . "'";
|
|
|
1619
|
+ $list_title .= __(' in', 'geodirectory')." '".$gd_country."'";
|
|
1620
|
1620
|
}
|
|
1621
|
1621
|
}
|
|
1622
|
1622
|
|
|
1623
|
1623
|
if (is_search()) {
|
|
1624
|
|
- $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
|
|
|
1624
|
+ $list_title = __('Search', 'geodirectory').' '.__(ucfirst($post_type_info->labels->name), 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
|
|
1625
|
1625
|
}
|
|
1626
|
1626
|
/** This action is documented in geodirectory_template_actions.php */
|
|
1627
|
1627
|
$class = apply_filters('geodir_page_title_class', 'entry-title fn');
|
|
@@ -1631,26 +1631,26 @@ discard block |
|
|
block discarded – undo |
|
1631
|
1631
|
|
|
1632
|
1632
|
$title = $list_title;
|
|
1633
|
1633
|
$gd_page = '';
|
|
1634
|
|
- if(geodir_is_page('pt')){
|
|
|
1634
|
+ if (geodir_is_page('pt')) {
|
|
1635
|
1635
|
$gd_page = 'pt';
|
|
1636
|
|
- $title = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
|
|
|
1636
|
+ $title = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
|
|
1637
|
1637
|
}
|
|
1638
|
|
- elseif(geodir_is_page('listing')){
|
|
|
1638
|
+ elseif (geodir_is_page('listing')) {
|
|
1639
|
1639
|
$gd_page = 'listing';
|
|
1640
|
1640
|
global $wp_query;
|
|
1641
|
1641
|
$current_term = $wp_query->get_queried_object();
|
|
1642
|
|
- if (strpos($current_term->taxonomy,'_tags') !== false) {
|
|
|
1642
|
+ if (strpos($current_term->taxonomy, '_tags') !== false) {
|
|
1643
|
1643
|
$title = (get_option('geodir_page_title_tag-listing')) ? get_option('geodir_page_title_tag-listing') : $title;
|
|
1644
|
|
- }else{
|
|
|
1644
|
+ } else {
|
|
1645
|
1645
|
$title = (get_option('geodir_page_title_cat-listing')) ? get_option('geodir_page_title_cat-listing') : $title;
|
|
1646
|
1646
|
}
|
|
1647
|
1647
|
|
|
1648
|
1648
|
}
|
|
1649
|
|
- elseif(geodir_is_page('author')){
|
|
|
1649
|
+ elseif (geodir_is_page('author')) {
|
|
1650
|
1650
|
$gd_page = 'author';
|
|
1651
|
|
- if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
|
|
|
1651
|
+ if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
|
|
1652
|
1652
|
$title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
|
|
1653
|
|
- }else{
|
|
|
1653
|
+ } else {
|
|
1654
|
1654
|
$title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
|
|
1655
|
1655
|
}
|
|
1656
|
1656
|
|
|
@@ -1664,16 +1664,16 @@ discard block |
|
|
block discarded – undo |
|
1664
|
1664
|
* @param string $title The page title including variables.
|
|
1665
|
1665
|
* @param string $gd_page The GeoDirectory page type if any.
|
|
1666
|
1666
|
*/
|
|
1667
|
|
- $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
|
|
|
1667
|
+ $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
|
|
1668
|
1668
|
|
|
1669
|
|
- echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
|
|
|
1669
|
+ echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
|
|
1670
|
1670
|
/**
|
|
1671
|
1671
|
* Filter the listing page title.
|
|
1672
|
1672
|
*
|
|
1673
|
1673
|
* @since 1.0.0
|
|
1674
|
1674
|
* @param string $list_title The title for the category page.
|
|
1675
|
1675
|
*/
|
|
1676
|
|
- apply_filters('geodir_listing_page_title', $title) . '</h1></header>';
|
|
|
1676
|
+ apply_filters('geodir_listing_page_title', $title).'</h1></header>';
|
|
1677
|
1677
|
}
|
|
1678
|
1678
|
|
|
1679
|
1679
|
add_action('geodir_listings_page_description', 'geodir_action_listings_description', 10);
|
|
@@ -1692,16 +1692,16 @@ discard block |
|
|
block discarded – undo |
|
1692
|
1692
|
$gd_post_type = geodir_get_current_posttype();
|
|
1693
|
1693
|
if (isset($current_term->term_id) && $current_term->term_id != '') {
|
|
1694
|
1694
|
|
|
1695
|
|
- $term_desc = term_description($current_term->term_id, $gd_post_type . '_tags');
|
|
|
1695
|
+ $term_desc = term_description($current_term->term_id, $gd_post_type.'_tags');
|
|
1696
|
1696
|
$saved_data = stripslashes(get_tax_meta($current_term->term_id, 'ct_cat_top_desc', false, $gd_post_type));
|
|
1697
|
1697
|
if ($term_desc && !$saved_data) {
|
|
1698
|
1698
|
$saved_data = $term_desc;
|
|
1699
|
1699
|
}
|
|
1700
|
1700
|
|
|
1701
|
1701
|
// stop payment manager filtering content length
|
|
1702
|
|
- $filter_priority = has_filter( 'the_content', 'geodir_payments_the_content' );
|
|
1703
|
|
- if ( false !== $filter_priority ) {
|
|
1704
|
|
- remove_filter( 'the_content', 'geodir_payments_the_content', $filter_priority );
|
|
|
1702
|
+ $filter_priority = has_filter('the_content', 'geodir_payments_the_content');
|
|
|
1703
|
+ if (false !== $filter_priority) {
|
|
|
1704
|
+ remove_filter('the_content', 'geodir_payments_the_content', $filter_priority);
|
|
1705
|
1705
|
}
|
|
1706
|
1706
|
|
|
1707
|
1707
|
/**
|
|
@@ -1715,14 +1715,14 @@ discard block |
|
|
block discarded – undo |
|
1715
|
1715
|
$cat_description = apply_filters('the_content', $saved_data);
|
|
1716
|
1716
|
|
|
1717
|
1717
|
|
|
1718
|
|
- if ( false !== $filter_priority ) {
|
|
1719
|
|
- add_filter( 'the_content', 'geodir_payments_the_content', $filter_priority );
|
|
|
1718
|
+ if (false !== $filter_priority) {
|
|
|
1719
|
+ add_filter('the_content', 'geodir_payments_the_content', $filter_priority);
|
|
1720
|
1720
|
}
|
|
1721
|
1721
|
|
|
1722
|
1722
|
if ($cat_description) {
|
|
1723
|
1723
|
?>
|
|
1724
|
1724
|
|
|
1725
|
|
- <div class="term_description"><?php echo $cat_description;?></div> <?php
|
|
|
1725
|
+ <div class="term_description"><?php echo $cat_description; ?></div> <?php
|
|
1726
|
1726
|
}
|
|
1727
|
1727
|
|
|
1728
|
1728
|
}
|
|
@@ -1772,13 +1772,13 @@ discard block |
|
|
block discarded – undo |
|
1772
|
1772
|
function geodir_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '')
|
|
1773
|
1773
|
{
|
|
1774
|
1774
|
if ($type == 'home-page' && $width = get_option('geodir_width_home_left_section')) {
|
|
1775
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
1775
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
1776
|
1776
|
} elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_left_section')) {
|
|
1777
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
1777
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
1778
|
1778
|
} elseif ($type == 'search-page' && $width = get_option('geodir_width_search_left_section')) {
|
|
1779
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
1779
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
1780
|
1780
|
} elseif ($type == 'author-page' && $width = get_option('geodir_width_author_left_section')) {
|
|
1781
|
|
- $width_css = 'style="width:' . $width . '%;"';
|
|
|
1781
|
+ $width_css = 'style="width:'.$width.'%;"';
|
|
1782
|
1782
|
} else {
|
|
1783
|
1783
|
$width_css = '';
|
|
1784
|
1784
|
}
|
|
@@ -2083,11 +2083,11 @@ discard block |
|
|
block discarded – undo |
|
2083
|
2083
|
|
|
2084
|
2084
|
$title = apply_filters('geodir_add_listing_page_title_text', get_the_title());
|
|
2085
|
2085
|
|
|
2086
|
|
- if(geodir_is_page('add-listing')){
|
|
|
2086
|
+ if (geodir_is_page('add-listing')) {
|
|
2087
|
2087
|
$gd_page = 'add-listing';
|
|
2088
|
|
- if(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){
|
|
|
2088
|
+ if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
|
|
2089
|
2089
|
$title = (get_option('geodir_page_title_edit-listing')) ? get_option('geodir_page_title_edit-listing') : $title;
|
|
2090
|
|
- }elseif(isset($listing_type)){
|
|
|
2090
|
+ }elseif (isset($listing_type)) {
|
|
2091
|
2091
|
$title = (get_option('geodir_page_title_add-listing')) ? get_option('geodir_page_title_add-listing') : $title;
|
|
2092
|
2092
|
}
|
|
2093
|
2093
|
|
|
@@ -2101,9 +2101,9 @@ discard block |
|
|
block discarded – undo |
|
2101
|
2101
|
* @param string $title The page title including variables.
|
|
2102
|
2102
|
* @param string $gd_page The GeoDirectory page type if any.
|
|
2103
|
2103
|
*/
|
|
2104
|
|
- $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
|
|
|
2104
|
+ $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
|
|
2105
|
2105
|
|
|
2106
|
|
- echo '<header class="' . $class_header . '"><h1 class="' . $class . '">';
|
|
|
2106
|
+ echo '<header class="'.$class_header.'"><h1 class="'.$class.'">';
|
|
2107
|
2107
|
echo $title;
|
|
2108
|
2108
|
echo '</h1></header>';
|
|
2109
|
2109
|
}
|
|
@@ -2117,7 +2117,7 @@ discard block |
|
|
block discarded – undo |
|
2117
|
2117
|
*/
|
|
2118
|
2118
|
function geodir_action_add_listing_page_mandatory()
|
|
2119
|
2119
|
{?>
|
|
2120
|
|
- <p class="geodir-note "><span class="geodir-required">*</span> <?php echo INDICATES_MANDATORY_FIELDS_TEXT;?></p>
|
|
|
2120
|
+ <p class="geodir-note "><span class="geodir-required">*</span> <?php echo INDICATES_MANDATORY_FIELDS_TEXT; ?></p>
|
|
2121
|
2121
|
<?php
|
|
2122
|
2122
|
}
|
|
2123
|
2123
|
|
|
@@ -2152,7 +2152,7 @@ discard block |
|
|
block discarded – undo |
|
2152
|
2152
|
|
|
2153
|
2153
|
if (isset($_REQUEST['backandedit'])) {
|
|
2154
|
2154
|
global $post;
|
|
2155
|
|
- $post = (object)$gd_session->get('listing');
|
|
|
2155
|
+ $post = (object) $gd_session->get('listing');
|
|
2156
|
2156
|
$listing_type = $post->listing_type;
|
|
2157
|
2157
|
$title = $post->post_title;
|
|
2158
|
2158
|
$desc = $post->post_desc;
|
|
@@ -2167,7 +2167,7 @@ discard block |
|
|
block discarded – undo |
|
2167
|
2167
|
$thumb_img_arr = geodir_get_images($post->ID);
|
|
2168
|
2168
|
if ($thumb_img_arr) {
|
|
2169
|
2169
|
foreach ($thumb_img_arr as $post_img) {
|
|
2170
|
|
- $curImages .= $post_img->src . ',';
|
|
|
2170
|
+ $curImages .= $post_img->src.',';
|
|
2171
|
2171
|
}
|
|
2172
|
2172
|
}
|
|
2173
|
2173
|
|
|
@@ -2175,7 +2175,7 @@ discard block |
|
|
block discarded – undo |
|
2175
|
2175
|
$title = $post->post_title;
|
|
2176
|
2176
|
$desc = $post->post_content;
|
|
2177
|
2177
|
$kw_tags = $post->post_tags;
|
|
2178
|
|
- $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type . '_tags', array('fields' => 'names')));
|
|
|
2178
|
+ $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type.'_tags', array('fields' => 'names')));
|
|
2179
|
2179
|
} else {
|
|
2180
|
2180
|
$listing_type = sanitize_text_field($_REQUEST['listing_type']);
|
|
2181
|
2181
|
}
|
|
@@ -2186,20 +2186,20 @@ discard block |
|
|
block discarded – undo |
|
2186
|
2186
|
|
|
2187
|
2187
|
$post_type_info = geodir_get_posttype_info($listing_type);
|
|
2188
|
2188
|
|
|
2189
|
|
- $cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? __($post_type_info['labels']['singular_name'], 'geodirectory') : __('Listing','geodirectory');
|
|
|
2189
|
+ $cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? __($post_type_info['labels']['singular_name'], 'geodirectory') : __('Listing', 'geodirectory');
|
|
2190
|
2190
|
|
|
2191
|
2191
|
$package_info = array();
|
|
2192
|
2192
|
$package_info = geodir_post_package_info($package_info, $post);
|
|
2193
|
2193
|
?>
|
|
2194
|
|
- <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id());?>" method="post" enctype="multipart/form-data">
|
|
2195
|
|
- <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type);?>"/>
|
|
2196
|
|
- <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type);?>"/>
|
|
|
2194
|
+ <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id()); ?>" method="post" enctype="multipart/form-data">
|
|
|
2195
|
+ <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type); ?>"/>
|
|
|
2196
|
+ <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type); ?>"/>
|
|
2197
|
2197
|
<?php if ($page_id) { ?>
|
|
2198
|
|
- <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id;?>"/>
|
|
|
2198
|
+ <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id; ?>"/>
|
|
2199
|
2199
|
<?php } if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { ?>
|
|
2200
|
|
- <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']);?>"/>
|
|
|
2200
|
+ <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']); ?>"/>
|
|
2201
|
2201
|
<?php } if (isset($_REQUEST['backandedit'])) { ?>
|
|
2202
|
|
- <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']);?>"/>
|
|
|
2202
|
+ <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']); ?>"/>
|
|
2203
|
2203
|
<?php
|
|
2204
|
2204
|
}
|
|
2205
|
2205
|
/**
|
|
@@ -2211,7 +2211,7 @@ discard block |
|
|
block discarded – undo |
|
2211
|
2211
|
*/
|
|
2212
|
2212
|
do_action('geodir_before_detail_fields');
|
|
2213
|
2213
|
?>
|
|
2214
|
|
- <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT;?></h5>
|
|
|
2214
|
+ <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT; ?></h5>
|
|
2215
|
2215
|
<?php
|
|
2216
|
2216
|
/**
|
|
2217
|
2217
|
* Called at the top of the add listing page form for frontend.
|
|
@@ -2232,10 +2232,10 @@ discard block |
|
|
block discarded – undo |
|
2232
|
2232
|
* @param string $cpt_singular_name The singular title of the curent CPT.
|
|
2233
|
2233
|
* @param string $listing_type The CPT being requested. ie: gd_place.
|
|
2234
|
2234
|
*/
|
|
2235
|
|
- echo apply_filters('geodir_add_listing_title_label', sprintf( __('%s Title', 'geodirectory'), $cpt_singular_name ),$cpt_singular_name,$listing_type); ?><span>*</span> </label>
|
|
|
2235
|
+ echo apply_filters('geodir_add_listing_title_label', sprintf(__('%s Title', 'geodirectory'), $cpt_singular_name), $cpt_singular_name, $listing_type); ?><span>*</span> </label>
|
|
2236
|
2236
|
<input type="text" field_type="text" name="post_title" id="post_title" class="geodir_textfield"
|
|
2237
|
2237
|
value="<?php echo esc_attr(stripslashes($title)); ?>"/>
|
|
2238
|
|
- <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory');?></span>
|
|
|
2238
|
+ <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory'); ?></span>
|
|
2239
|
2239
|
</div>
|
|
2240
|
2240
|
<?php
|
|
2241
|
2241
|
$show_editor = get_option('geodir_tiny_editor_on_add_listing');
|
|
@@ -2281,7 +2281,7 @@ discard block |
|
|
block discarded – undo |
|
2281
|
2281
|
$desc_limit_msg = apply_filters('geodir_description_field_desc_limit_msg', $desc_limit_msg, $desc_limit);
|
|
2282
|
2282
|
|
|
2283
|
2283
|
$desc_class = '';
|
|
2284
|
|
- if ($desc_limit === '' || (int)$desc_limit > 0) {
|
|
|
2284
|
+ if ($desc_limit === '' || (int) $desc_limit > 0) {
|
|
2285
|
2285
|
/**
|
|
2286
|
2286
|
* Called on the add listing page form for frontend just before the description field.
|
|
2287
|
2287
|
*
|
|
@@ -2294,7 +2294,7 @@ discard block |
|
|
block discarded – undo |
|
2294
|
2294
|
$desc_class = ' hidden';
|
|
2295
|
2295
|
}
|
|
2296
|
2296
|
?>
|
|
2297
|
|
- <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class;?>">
|
|
|
2297
|
+ <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class; ?>">
|
|
2298
|
2298
|
<label><?php
|
|
2299
|
2299
|
/**
|
|
2300
|
2300
|
* Filter the add listing page description input label.
|
|
@@ -2304,7 +2304,7 @@ discard block |
|
|
block discarded – undo |
|
2304
|
2304
|
* @param string $cpt_singular_name The singular title of the curent CPT.
|
|
2305
|
2305
|
* @param string $listing_type The CPT being requested. ie: gd_place.
|
|
2306
|
2306
|
*/
|
|
2307
|
|
- echo apply_filters('geodir_add_listing_description_label',sprintf( __('%s Description', 'geodirectory'), $cpt_singular_name ),$cpt_singular_name,$listing_type); ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
|
|
|
2307
|
+ echo apply_filters('geodir_add_listing_description_label', sprintf(__('%s Description', 'geodirectory'), $cpt_singular_name), $cpt_singular_name, $listing_type); ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
|
|
2308
|
2308
|
<?php
|
|
2309
|
2309
|
if ($show_editor) {
|
|
2310
|
2310
|
$editor_settings = array('media_buttons' => false, 'textarea_rows' => 10);
|
|
@@ -2313,16 +2313,16 @@ discard block |
|
|
block discarded – undo |
|
2313
|
2313
|
<?php wp_editor($desc, "post_desc", $editor_settings); ?>
|
|
2314
|
2314
|
</div>
|
|
2315
|
2315
|
<?php if ($desc_limit != '') { ?>
|
|
2316
|
|
- <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit;?>");</script>
|
|
|
2316
|
+ <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit; ?>");</script>
|
|
2317
|
2317
|
<?php } } else { ?>
|
|
2318
|
2318
|
<textarea field_type="textarea" name="post_desc" id="post_desc" class="geodir_textarea" maxlength="<?php echo $desc_limit; ?>"><?php echo $desc; ?></textarea>
|
|
2319
|
2319
|
<?php } if ($desc_limit_msg != '') { ?>
|
|
2320
|
2320
|
<span class="geodir_message_note"><?php echo $desc_limit_msg; ?></span>
|
|
2321
|
2321
|
<?php } ?>
|
|
2322
|
|
- <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory');?></span>
|
|
|
2322
|
+ <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory'); ?></span>
|
|
2323
|
2323
|
</div>
|
|
2324
|
2324
|
<?php
|
|
2325
|
|
- if ($desc_limit === '' || (int)$desc_limit > 0) {
|
|
|
2325
|
+ if ($desc_limit === '' || (int) $desc_limit > 0) {
|
|
2326
|
2326
|
/**
|
|
2327
|
2327
|
* Called on the add listing page form for frontend just after the description field.
|
|
2328
|
2328
|
*
|
|
@@ -2361,7 +2361,7 @@ discard block |
|
|
block discarded – undo |
|
2361
|
2361
|
$kw_tags_msg = apply_filters('geodir_listing_tags_field_tags_msg', $kw_tags_msg, $kw_tags_count);
|
|
2362
|
2362
|
|
|
2363
|
2363
|
$tags_class = '';
|
|
2364
|
|
- if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
|
|
|
2364
|
+ if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
|
|
2365
|
2365
|
/**
|
|
2366
|
2366
|
* Called on the add listing page form for frontend just before the tags field.
|
|
2367
|
2367
|
*
|
|
@@ -2372,14 +2372,14 @@ discard block |
|
|
block discarded – undo |
|
2372
|
2372
|
$tags_class = ' hidden';
|
|
2373
|
2373
|
}
|
|
2374
|
2374
|
?>
|
|
2375
|
|
- <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class;?>">
|
|
|
2375
|
+ <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class; ?>">
|
|
2376
|
2376
|
<label><?php echo TAGKW_TEXT; ?></label>
|
|
2377
|
2377
|
<input name="post_tags" id="post_tags" value="<?php echo $kw_tags; ?>" type="text" class="geodir_textfield"
|
|
2378
|
|
- maxlength="<?php echo $kw_tags_count;?>"/>
|
|
2379
|
|
- <span class="geodir_message_note"><?php echo $kw_tags_msg;?></span>
|
|
|
2378
|
+ maxlength="<?php echo $kw_tags_count; ?>"/>
|
|
|
2379
|
+ <span class="geodir_message_note"><?php echo $kw_tags_msg; ?></span>
|
|
2380
|
2380
|
</div>
|
|
2381
|
2381
|
<?php
|
|
2382
|
|
- if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
|
|
|
2382
|
+ if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
|
|
2383
|
2383
|
/**
|
|
2384
|
2384
|
* Called on the add listing page form for frontend just after the tags field.
|
|
2385
|
2385
|
*
|
|
@@ -2405,7 +2405,7 @@ discard block |
|
|
block discarded – undo |
|
2405
|
2405
|
$thumb_img_arr = array();
|
|
2406
|
2406
|
$totImg = 0;
|
|
2407
|
2407
|
if (isset($_REQUEST['backandedit']) && empty($_REQUEST['pid'])) {
|
|
2408
|
|
- $post = (object)$gd_session->get('listing');
|
|
|
2408
|
+ $post = (object) $gd_session->get('listing');
|
|
2409
|
2409
|
if (isset($post->post_images))
|
|
2410
|
2410
|
$curImages = trim($post->post_images, ",");
|
|
2411
|
2411
|
|
|
@@ -2418,7 +2418,7 @@ discard block |
|
|
block discarded – undo |
|
2418
|
2418
|
$listing_type = $post->listing_type;
|
|
2419
|
2419
|
|
|
2420
|
2420
|
} elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
|
|
2421
|
|
- $post = geodir_get_post_info((int)$_REQUEST['pid']);
|
|
|
2421
|
+ $post = geodir_get_post_info((int) $_REQUEST['pid']);
|
|
2422
|
2422
|
$listing_type = $post->post_type;
|
|
2423
|
2423
|
$thumb_img_arr = geodir_get_images($_REQUEST['pid']);
|
|
2424
|
2424
|
|
|
@@ -2432,7 +2432,7 @@ discard block |
|
|
block discarded – undo |
|
2432
|
2432
|
//$curImages = $img->src.",";
|
|
2433
|
2433
|
}
|
|
2434
|
2434
|
|
|
2435
|
|
- $totImg = count((array)$thumb_img_arr);
|
|
|
2435
|
+ $totImg = count((array) $thumb_img_arr);
|
|
2436
|
2436
|
}
|
|
2437
|
2437
|
|
|
2438
|
2438
|
if ($curImages != '')
|
|
@@ -2453,15 +2453,15 @@ discard block |
|
|
block discarded – undo |
|
2453
|
2453
|
if ($show_image_input_box) {
|
|
2454
|
2454
|
?>
|
|
2455
|
2455
|
|
|
2456
|
|
- <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT;?>
|
|
|
2456
|
+ <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT; ?>
|
|
2457
|
2457
|
<?php if ($image_limit == 1) {
|
|
2458
|
|
- echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('image with this package', 'geodirectory') . ')</small>';
|
|
|
2458
|
+ echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('image with this package', 'geodirectory').')</small>';
|
|
2459
|
2459
|
} ?>
|
|
2460
|
2460
|
<?php if ($image_limit > 1) {
|
|
2461
|
|
- echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('images with this package', 'geodirectory') . ')</small>';
|
|
|
2461
|
+ echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('images with this package', 'geodirectory').')</small>';
|
|
2462
|
2462
|
} ?>
|
|
2463
|
2463
|
<?php if ($image_limit == '') {
|
|
2464
|
|
- echo '<br /><small>(' . __('You can upload unlimited images with this package', 'geodirectory') . ')</small>';
|
|
|
2464
|
+ echo '<br /><small>('.__('You can upload unlimited images with this package', 'geodirectory').')</small>';
|
|
2465
|
2465
|
} ?>
|
|
2466
|
2466
|
</h5>
|
|
2467
|
2467
|
|
|
@@ -2476,11 +2476,11 @@ discard block |
|
|
block discarded – undo |
|
2476
|
2476
|
<div
|
|
2477
|
2477
|
class="plupload-upload-uic hide-if-no-js <?php if ($multiple): ?>plupload-upload-uic-multiple<?php endif; ?>"
|
|
2478
|
2478
|
id="<?php echo $id; ?>plupload-upload-ui">
|
|
2479
|
|
- <h4><?php _e('Drop files to upload', 'geodirectory');?></h4><br/>
|
|
|
2479
|
+ <h4><?php _e('Drop files to upload', 'geodirectory'); ?></h4><br/>
|
|
2480
|
2480
|
<input id="<?php echo $id; ?>plupload-browse-button" type="button"
|
|
2481
|
2481
|
value="<?php esc_attr_e('Select Files', 'geodirectory'); ?>" class="geodir_button"/>
|
|
2482
|
2482
|
<span class="ajaxnonceplu"
|
|
2483
|
|
- id="ajaxnonceplu<?php echo wp_create_nonce($id . 'pluploadan'); ?>"></span>
|
|
|
2483
|
+ id="ajaxnonceplu<?php echo wp_create_nonce($id.'pluploadan'); ?>"></span>
|
|
2484
|
2484
|
<?php if ($width && $height): ?>
|
|
2485
|
2485
|
<span class="plupload-resize"></span>
|
|
2486
|
2486
|
<span class="plupload-width" id="plupload-width<?php echo $width; ?>"></span>
|
|
@@ -2493,7 +2493,7 @@ discard block |
|
|
block discarded – undo |
|
2493
|
2493
|
id="<?php echo $id; ?>plupload-thumbs" style="border-top:1px solid #ccc; padding-top:10px;">
|
|
2494
|
2494
|
</div>
|
|
2495
|
2495
|
<span
|
|
2496
|
|
- id="upload-msg"><?php _e('Please drag & drop the images to rearrange the order', 'geodirectory');?></span>
|
|
|
2496
|
+ id="upload-msg"><?php _e('Please drag & drop the images to rearrange the order', 'geodirectory'); ?></span>
|
|
2497
|
2497
|
<span id="<?php echo $id; ?>upload-error" style="display:none"></span>
|
|
2498
|
2498
|
</div>
|
|
2499
|
2499
|
|
|
@@ -2505,7 +2505,7 @@ discard block |
|
|
block discarded – undo |
|
2505
|
2505
|
*
|
|
2506
|
2506
|
* @since 1.0.0
|
|
2507
|
2507
|
*/
|
|
2508
|
|
- do_action('geodir_after_main_form_fields');?>
|
|
|
2508
|
+ do_action('geodir_after_main_form_fields'); ?>
|
|
2509
|
2509
|
|
|
2510
|
2510
|
|
|
2511
|
2511
|
<!-- add captcha code -->
|
|
@@ -2516,7 +2516,7 @@ discard block |
|
|
block discarded – undo |
|
2516
|
2516
|
</script>
|
|
2517
|
2517
|
<noscript>
|
|
2518
|
2518
|
<div>
|
|
2519
|
|
- <label><?php _e('Type 64 into this box', 'geodirectory');?></label>
|
|
|
2519
|
+ <label><?php _e('Type 64 into this box', 'geodirectory'); ?></label>
|
|
2520
|
2520
|
<input type="text" id="geodir_spamblocker_top_form" name="geodir_spamblocker" value="" maxlength="10"/>
|
|
2521
|
2521
|
</div>
|
|
2522
|
2522
|
</noscript>
|
|
@@ -2526,10 +2526,10 @@ discard block |
|
|
block discarded – undo |
|
2526
|
2526
|
<!-- end captcha code -->
|
|
2527
|
2527
|
|
|
2528
|
2528
|
<div id="geodir-add-listing-submit" class="geodir_form_row clear_both" style="padding:2px;text-align:center;">
|
|
2529
|
|
- <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON;?>"
|
|
2530
|
|
- class="geodir_button" <?php echo $submit_button;?>/>
|
|
|
2529
|
+ <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON; ?>"
|
|
|
2530
|
+ class="geodir_button" <?php echo $submit_button; ?>/>
|
|
2531
|
2531
|
<span class="geodir_message_note"
|
|
2532
|
|
- style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory');?></span>
|
|
|
2532
|
+ style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory'); ?></span>
|
|
2533
|
2533
|
</div>
|
|
2534
|
2534
|
|
|
2535
|
2535
|
</form>
|
|
@@ -2591,7 +2591,7 @@ discard block |
|
|
block discarded – undo |
|
2591
|
2591
|
class="<?php
|
|
2592
|
2592
|
/** This action is documented in geodirectory_template_actions.php */
|
|
2593
|
2593
|
echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'Reg/Login Top Section'); ?>">
|
|
2594
|
|
- <?php dynamic_sidebar('Reg/Login Top Section');?>
|
|
|
2594
|
+ <?php dynamic_sidebar('Reg/Login Top Section'); ?>
|
|
2595
|
2595
|
</div><!-- clearfix ends here-->
|
|
2596
|
2596
|
<?php
|
|
2597
|
2597
|
}
|
|
@@ -2611,11 +2611,11 @@ discard block |
|
|
block discarded – undo |
|
2611
|
2611
|
|
|
2612
|
2612
|
global $user_login;
|
|
2613
|
2613
|
|
|
2614
|
|
- $is_enable_signup = get_option( 'users_can_register' );
|
|
|
2614
|
+ $is_enable_signup = get_option('users_can_register');
|
|
2615
|
2615
|
|
|
2616
|
2616
|
?>
|
|
2617
|
2617
|
<script type="text/javascript">
|
|
2618
|
|
- <?php if ( $user_login ) { ?>
|
|
|
2618
|
+ <?php if ($user_login) { ?>
|
|
2619
|
2619
|
setTimeout(function () {
|
|
2620
|
2620
|
try {
|
|
2621
|
2621
|
d = document.getElementById('user_pass');
|
|
@@ -2632,7 +2632,7 @@ discard block |
|
|
block discarded – undo |
|
2632
|
2632
|
<?php } ?>
|
|
2633
|
2633
|
</script>
|
|
2634
|
2634
|
<script type="text/javascript">
|
|
2635
|
|
- <?php if ( $user_login ) { ?>
|
|
|
2635
|
+ <?php if ($user_login) { ?>
|
|
2636
|
2636
|
setTimeout(function () {
|
|
2637
|
2637
|
try {
|
|
2638
|
2638
|
d = document.getElementById('user_pass');
|
|
@@ -2657,7 +2657,7 @@ discard block |
|
|
block discarded – undo |
|
2657
|
2657
|
foreach ($errors as $errorsObj) {
|
|
2658
|
2658
|
foreach ($errorsObj as $key => $val) {
|
|
2659
|
2659
|
for ($i = 0; $i < count($val); $i++) {
|
|
2660
|
|
- echo "<div class=error_msg_fix>" . $val[$i] . '</div>';
|
|
|
2660
|
+ echo "<div class=error_msg_fix>".$val[$i].'</div>';
|
|
2661
|
2661
|
$registration_error_msg = 1;
|
|
2662
|
2662
|
}
|
|
2663
|
2663
|
}
|
|
@@ -2674,10 +2674,10 @@ discard block |
|
|
block discarded – undo |
|
2674
|
2674
|
*
|
|
2675
|
2675
|
* @since 1.0.0
|
|
2676
|
2676
|
*/
|
|
2677
|
|
- include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
|
|
|
2677
|
+ include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
|
|
2678
|
2678
|
</div>
|
|
2679
|
2679
|
|
|
2680
|
|
- <?php } elseif (isset($_REQUEST['page']) && $_REQUEST['page'] == 'login' && isset($_REQUEST['page1']) && $_REQUEST['page1'] == 'sign_up' && $is_enable_signup ) { ?>
|
|
|
2680
|
+ <?php } elseif (isset($_REQUEST['page']) && $_REQUEST['page'] == 'login' && isset($_REQUEST['page1']) && $_REQUEST['page1'] == 'sign_up' && $is_enable_signup) { ?>
|
|
2681
|
2681
|
|
|
2682
|
2682
|
<div class="registration_form">
|
|
2683
|
2683
|
<?php
|
|
@@ -2686,7 +2686,7 @@ discard block |
|
|
block discarded – undo |
|
2686
|
2686
|
*
|
|
2687
|
2687
|
* @since 1.0.0
|
|
2688
|
2688
|
*/
|
|
2689
|
|
- include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
|
|
|
2689
|
+ include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
|
|
2690
|
2690
|
</div>
|
|
2691
|
2691
|
|
|
2692
|
2692
|
<?php } else { ?>
|
|
@@ -2698,10 +2698,10 @@ discard block |
|
|
block discarded – undo |
|
2698
|
2698
|
*
|
|
2699
|
2699
|
* @since 1.0.0
|
|
2700
|
2700
|
*/
|
|
2701
|
|
- include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
|
|
|
2701
|
+ include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
|
|
2702
|
2702
|
</div>
|
|
2703
|
2703
|
|
|
2704
|
|
- <?php if ( $is_enable_signup ) { ?>
|
|
|
2704
|
+ <?php if ($is_enable_signup) { ?>
|
|
2705
|
2705
|
<div class="registration_form_r">
|
|
2706
|
2706
|
<?php
|
|
2707
|
2707
|
/**
|
|
@@ -2709,7 +2709,7 @@ discard block |
|
|
block discarded – undo |
|
2709
|
2709
|
*
|
|
2710
|
2710
|
* @since 1.0.0
|
|
2711
|
2711
|
*/
|
|
2712
|
|
- include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
|
|
|
2712
|
+ include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
|
|
2713
|
2713
|
</div>
|
|
2714
|
2714
|
<?php } ?>
|
|
2715
|
2715
|
|
|
@@ -2746,12 +2746,12 @@ discard block |
|
|
block discarded – undo |
|
2746
|
2746
|
$gd_post_type = geodir_get_current_posttype();
|
|
2747
|
2747
|
$post_type_info = get_post_type_object($gd_post_type);
|
|
2748
|
2748
|
|
|
2749
|
|
- $add_string_in_title = __('All', 'geodirectory') . ' ';
|
|
|
2749
|
+ $add_string_in_title = __('All', 'geodirectory').' ';
|
|
2750
|
2750
|
if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
|
|
2751
|
|
- $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
|
|
|
2751
|
+ $add_string_in_title = __('My Favorite', 'geodirectory').' ';
|
|
2752
|
2752
|
}
|
|
2753
|
2753
|
|
|
2754
|
|
- $list_title = $add_string_in_title . $post_type_info->labels->name;
|
|
|
2754
|
+ $list_title = $add_string_in_title.$post_type_info->labels->name;
|
|
2755
|
2755
|
$single_name = $post_type_info->labels->singular_name;
|
|
2756
|
2756
|
|
|
2757
|
2757
|
$taxonomy = geodir_get_taxonomies($gd_post_type);
|
|
@@ -2759,12 +2759,12 @@ discard block |
|
|
block discarded – undo |
|
2759
|
2759
|
if (!empty($term)) {
|
|
2760
|
2760
|
$current_term = get_term_by('slug', $term, $taxonomy[0]);
|
|
2761
|
2761
|
if (!empty($current_term))
|
|
2762
|
|
- $list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'";
|
|
|
2762
|
+ $list_title .= __(' in', 'geodirectory')." '".geodir_ucwords($current_term->name)."'";
|
|
2763
|
2763
|
}
|
|
2764
|
2764
|
|
|
2765
|
2765
|
|
|
2766
|
2766
|
if (is_search()) {
|
|
2767
|
|
- $list_title = __('Search', 'geodirectory') . ' ' . __($post_type_info->labels->name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
|
|
|
2767
|
+ $list_title = __('Search', 'geodirectory').' '.__($post_type_info->labels->name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
|
|
2768
|
2768
|
|
|
2769
|
2769
|
}
|
|
2770
|
2770
|
/** This action is documented in geodirectory_template_actions.php */
|
|
@@ -2773,11 +2773,11 @@ discard block |
|
|
block discarded – undo |
|
2773
|
2773
|
$class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
|
|
2774
|
2774
|
|
|
2775
|
2775
|
$title = $list_title;
|
|
2776
|
|
- if(geodir_is_page('author')){
|
|
|
2776
|
+ if (geodir_is_page('author')) {
|
|
2777
|
2777
|
$gd_page = 'author';
|
|
2778
|
|
- if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
|
|
|
2778
|
+ if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
|
|
2779
|
2779
|
$title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
|
|
2780
|
|
- }else{
|
|
|
2780
|
+ } else {
|
|
2781
|
2781
|
$title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
|
|
2782
|
2782
|
}
|
|
2783
|
2783
|
|
|
@@ -2791,16 +2791,16 @@ discard block |
|
|
block discarded – undo |
|
2791
|
2791
|
* @param string $title The page title including variables.
|
|
2792
|
2792
|
* @param string $gd_page The GeoDirectory page type if any.
|
|
2793
|
2793
|
*/
|
|
2794
|
|
- $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
|
|
|
2794
|
+ $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
|
|
2795
|
2795
|
|
|
2796
|
|
- echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
|
|
|
2796
|
+ echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
|
|
2797
|
2797
|
/**
|
|
2798
|
2798
|
* Filter the author page title text.
|
|
2799
|
2799
|
*
|
|
2800
|
2800
|
* @since 1.0.0
|
|
2801
|
2801
|
* @param string $list_title The title for the page.
|
|
2802
|
2802
|
*/
|
|
2803
|
|
- apply_filters('geodir_author_page_title_text', $title) . '</h1></header>';
|
|
|
2803
|
+ apply_filters('geodir_author_page_title_text', $title).'</h1></header>';
|
|
2804
|
2804
|
}
|
|
2805
|
2805
|
|
|
2806
|
2806
|
|
|
@@ -3005,19 +3005,19 @@ discard block |
|
|
block discarded – undo |
|
3005
|
3005
|
$post_type_info = get_post_type_object($gd_post_type);
|
|
3006
|
3006
|
|
|
3007
|
3007
|
$pt_name = '';
|
|
3008
|
|
- if(isset($post_type_info->labels->name)){$pt_name=$post_type_info->labels->name;}
|
|
|
3008
|
+ if (isset($post_type_info->labels->name)) {$pt_name = $post_type_info->labels->name; }
|
|
3009
|
3009
|
|
|
3010
|
3010
|
if (is_search()) {
|
|
3011
|
|
- $list_title = __('Search', 'geodirectory') . ' ' . __($pt_name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
|
|
|
3011
|
+ $list_title = __('Search', 'geodirectory').' '.__($pt_name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
|
|
3012
|
3012
|
|
|
3013
|
3013
|
}
|
|
3014
|
3014
|
/** This action is documented in geodirectory_template_actions.php */
|
|
3015
|
3015
|
$class = apply_filters('geodir_page_title_class', 'entry-title fn');
|
|
3016
|
3016
|
/** This action is documented in geodirectory_template_actions.php */
|
|
3017
|
3017
|
$class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
|
|
3018
|
|
- echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
|
|
|
3018
|
+ echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
|
|
3019
|
3019
|
/** This action is documented in geodirectory_template_actions.php */
|
|
3020
|
|
- apply_filters('geodir_listing_page_title', wptexturize($list_title)) . '</h1></header>';
|
|
|
3020
|
+ apply_filters('geodir_listing_page_title', wptexturize($list_title)).'</h1></header>';
|
|
3021
|
3021
|
}
|
|
3022
|
3022
|
|
|
3023
|
3023
|
// action for adding the listings page top widget area
|
|
@@ -3421,7 +3421,7 @@ discard block |
|
|
block discarded – undo |
|
3421
|
3421
|
$gd_post_type = geodir_get_current_posttype();
|
|
3422
|
3422
|
$post_type_info = get_post_type_object($gd_post_type);
|
|
3423
|
3423
|
|
|
3424
|
|
- $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' :', 'geodirectory');
|
|
|
3424
|
+ $list_title = __('Search', 'geodirectory').' '.__(ucfirst($post_type_info->labels->name), 'geodirectory').__(' :', 'geodirectory');
|
|
3425
|
3425
|
}
|
|
3426
|
3426
|
return $list_title;
|
|
3427
|
3427
|
}
|
|
@@ -3437,7 +3437,7 @@ discard block |
|
|
block discarded – undo |
|
3437
|
3437
|
* @param string $position Position to add the post content. 'before' or 'after'. Default 'before'.
|
|
3438
|
3438
|
* @param string $gd_page The geodirectory page type. Default null.
|
|
3439
|
3439
|
*/
|
|
3440
|
|
-function geodir_add_page_content( $position = 'before', $gd_page = '' ) {
|
|
|
3440
|
+function geodir_add_page_content($position = 'before', $gd_page = '') {
|
|
3441
|
3441
|
global $post;
|
|
3442
|
3442
|
|
|
3443
|
3443
|
$gd_page_id = NULL;
|
|
@@ -3513,17 +3513,17 @@ discard block |
|
|
block discarded – undo |
|
3513
|
3513
|
* @param WP_Post $post WP_Post object.
|
|
3514
|
3514
|
* @return string Filtered SQL JOIN clause.
|
|
3515
|
3515
|
*/
|
|
3516
|
|
-function geodir_previous_next_post_join( $join, $in_same_term, $excluded_terms, $taxonomy, $post ) {
|
|
|
3516
|
+function geodir_previous_next_post_join($join, $in_same_term, $excluded_terms, $taxonomy, $post) {
|
|
3517
|
3517
|
global $plugin_prefix;
|
|
3518
|
3518
|
|
|
3519
|
|
- if ( !empty($post->post_type) && in_array( $post->post_type, geodir_get_posttypes() ) ) {
|
|
3520
|
|
- $join .= " INNER JOIN " . $plugin_prefix . $post->post_type . "_detail AS gd ON gd.post_id = p.ID";
|
|
|
3519
|
+ if (!empty($post->post_type) && in_array($post->post_type, geodir_get_posttypes())) {
|
|
|
3520
|
+ $join .= " INNER JOIN ".$plugin_prefix.$post->post_type."_detail AS gd ON gd.post_id = p.ID";
|
|
3521
|
3521
|
}
|
|
3522
|
3522
|
|
|
3523
|
3523
|
return $join;
|
|
3524
|
3524
|
}
|
|
3525
|
|
-add_filter( 'get_previous_post_join', 'geodir_previous_next_post_join', 10, 5 );
|
|
3526
|
|
-add_filter( 'get_next_post_join', 'geodir_previous_next_post_join', 10, 5 );
|
|
|
3525
|
+add_filter('get_previous_post_join', 'geodir_previous_next_post_join', 10, 5);
|
|
|
3526
|
+add_filter('get_next_post_join', 'geodir_previous_next_post_join', 10, 5);
|
|
3527
|
3527
|
|
|
3528
|
3528
|
/**
|
|
3529
|
3529
|
* Filters the WHERE clause in the SQL for an adjacent post query.
|
|
@@ -3541,32 +3541,32 @@ discard block |
|
|
block discarded – undo |
|
3541
|
3541
|
* @param WP_Post $post WP_Post object.
|
|
3542
|
3542
|
* @return string Filtered SQL WHERE clause.
|
|
3543
|
3543
|
*/
|
|
3544
|
|
-function geodir_previous_next_post_where( $where, $in_same_term, $excluded_terms, $taxonomy, $post ) {
|
|
|
3544
|
+function geodir_previous_next_post_where($where, $in_same_term, $excluded_terms, $taxonomy, $post) {
|
|
3545
|
3545
|
global $wpdb, $plugin_prefix;
|
|
3546
|
3546
|
|
|
3547
|
|
- if ( !empty($post->post_type) && ( !empty( $post->country_slug ) || !empty( $post->region_slug ) || !empty( $post->city_slug ) ) && in_array( $post->post_type, geodir_get_posttypes() ) ) {
|
|
|
3547
|
+ if (!empty($post->post_type) && (!empty($post->country_slug) || !empty($post->region_slug) || !empty($post->city_slug)) && in_array($post->post_type, geodir_get_posttypes())) {
|
|
3548
|
3548
|
$post_locations = '';
|
|
3549
|
3549
|
$post_locations_var = array();
|
|
3550
|
3550
|
|
|
3551
|
|
- if ( !empty( $post->country_slug ) ) {
|
|
|
3551
|
+ if (!empty($post->country_slug)) {
|
|
3552
|
3552
|
$post_locations .= " AND post_locations LIKE %s";
|
|
3553
|
|
- $post_locations_var[] = "%,[" . $post->country_slug . "]";
|
|
|
3553
|
+ $post_locations_var[] = "%,[".$post->country_slug."]";
|
|
3554
|
3554
|
}
|
|
3555
|
3555
|
|
|
3556
|
|
- if ( !empty( $post->region_slug ) ) {
|
|
|
3556
|
+ if (!empty($post->region_slug)) {
|
|
3557
|
3557
|
$post_locations .= " AND post_locations LIKE %s";
|
|
3558
|
|
- $post_locations_var[] = "%,[" . $post->region_slug . "],%";
|
|
|
3558
|
+ $post_locations_var[] = "%,[".$post->region_slug."],%";
|
|
3559
|
3559
|
}
|
|
3560
|
3560
|
|
|
3561
|
|
- if ( !empty( $post->city_slug ) ) {
|
|
|
3561
|
+ if (!empty($post->city_slug)) {
|
|
3562
|
3562
|
$post_locations .= " AND post_locations LIKE %s";
|
|
3563
|
|
- $post_locations_var[] = "[" . $post->city_slug . "],%";
|
|
|
3563
|
+ $post_locations_var[] = "[".$post->city_slug."],%";
|
|
3564
|
3564
|
}
|
|
3565
|
3565
|
|
|
3566
|
|
- $where .= $wpdb->prepare( $post_locations, $post_locations_var );
|
|
|
3566
|
+ $where .= $wpdb->prepare($post_locations, $post_locations_var);
|
|
3567
|
3567
|
}
|
|
3568
|
3568
|
|
|
3569
|
3569
|
return $where;
|
|
3570
|
3570
|
}
|
|
3571
|
|
-add_filter( 'get_previous_post_where', 'geodir_previous_next_post_where', 10, 5 );
|
|
3572
|
|
-add_filter( 'get_next_post_where', 'geodir_previous_next_post_where', 10, 5 ); |
|
3573
|
3571
|
\ No newline at end of file |
|
|
3572
|
+add_filter('get_previous_post_where', 'geodir_previous_next_post_where', 10, 5);
|
|
|
3573
|
+add_filter('get_next_post_where', 'geodir_previous_next_post_where', 10, 5); |
|
3574
|
3574
|
\ No newline at end of file |