@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @package GeoDirectory |
16 | 16 | * @see `geodir_custom_field_save` for array details. |
17 | 17 | */ |
18 | -function geodir_custom_fields_predefined($post_type=''){ |
|
18 | +function geodir_custom_fields_predefined($post_type = '') { |
|
19 | 19 | |
20 | 20 | $custom_fields = array(); |
21 | 21 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | 'default_value' => '', |
76 | 76 | 'show_in' => '[detail],[listing]', |
77 | 77 | 'is_required' => true, |
78 | - 'option_values' => __('Select Status/,For Sale,For Rent,Sold,Let','geodirectory'), |
|
78 | + 'option_values' => __('Select Status/,For Sale,For Rent,Sold,Let', 'geodirectory'), |
|
79 | 79 | 'validation_pattern' => '', |
80 | 80 | 'validation_msg' => '', |
81 | 81 | 'required_msg' => '', |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | 'default_value' => '', |
105 | 105 | 'show_in' => '[detail],[listing]', |
106 | 106 | 'is_required' => true, |
107 | - 'option_values' => __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'), |
|
107 | + 'option_values' => __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional', 'geodirectory'), |
|
108 | 108 | 'validation_pattern' => '', |
109 | 109 | 'validation_msg' => '', |
110 | 110 | 'required_msg' => '', |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | 'default_value' => '', |
134 | 134 | 'show_in' => '[detail],[listing]', |
135 | 135 | 'is_required' => true, |
136 | - 'option_values' => __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage','geodirectory'), |
|
136 | + 'option_values' => __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage', 'geodirectory'), |
|
137 | 137 | 'validation_pattern' => '', |
138 | 138 | 'validation_msg' => '', |
139 | 139 | 'required_msg' => '', |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | 'default_value' => '', |
163 | 163 | 'show_in' => '[detail],[listing]', |
164 | 164 | 'is_required' => true, |
165 | - 'option_values' => __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
165 | + 'option_values' => __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10', 'geodirectory'), |
|
166 | 166 | 'validation_pattern' => '', |
167 | 167 | 'validation_msg' => '', |
168 | 168 | 'required_msg' => '', |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | 'default_value' => '', |
192 | 192 | 'show_in' => '[detail],[listing]', |
193 | 193 | 'is_required' => true, |
194 | - 'option_values' => __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
194 | + 'option_values' => __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10', 'geodirectory'), |
|
195 | 195 | 'validation_pattern' => '', |
196 | 196 | 'validation_msg' => '', |
197 | 197 | 'required_msg' => '', |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | 'default_value' => '', |
249 | 249 | 'show_in' => '[detail],[listing]', |
250 | 250 | 'is_required' => true, |
251 | - 'option_values' => __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'), |
|
251 | + 'option_values' => __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace', 'geodirectory'), |
|
252 | 252 | 'validation_pattern' => '', |
253 | 253 | 'validation_msg' => '', |
254 | 254 | 'required_msg' => '', |
@@ -328,15 +328,15 @@ discard block |
||
328 | 328 | 'defaults' => array( |
329 | 329 | 'data_type' => 'VARCHAR', |
330 | 330 | 'admin_title' => __('Job Type', 'geodirectory'), |
331 | - 'site_title' => __('Job Type','geodirectory'), |
|
332 | - 'admin_desc' => __('Select the type of job.','geodirectory'), |
|
331 | + 'site_title' => __('Job Type', 'geodirectory'), |
|
332 | + 'admin_desc' => __('Select the type of job.', 'geodirectory'), |
|
333 | 333 | 'htmlvar_name' => 'job_type', |
334 | 334 | 'is_active' => true, |
335 | 335 | 'for_admin_use' => false, |
336 | 336 | 'default_value' => '', |
337 | 337 | 'show_in' => '[detail],[listing]', |
338 | 338 | 'is_required' => true, |
339 | - 'option_values' => __('Select Type/,Freelance,Full Time,Internship,Part Time,Temporary,Other','geodirectory'), |
|
339 | + 'option_values' => __('Select Type/,Freelance,Full Time,Internship,Part Time,Temporary,Other', 'geodirectory'), |
|
340 | 340 | 'validation_pattern' => '', |
341 | 341 | 'validation_msg' => '', |
342 | 342 | 'required_msg' => '', |
@@ -356,16 +356,16 @@ discard block |
||
356 | 356 | 'description' => __('Adds a select input to be able to set the type of a job Sector ie: Private Sector,Public Sector', 'geodirectory'), |
357 | 357 | 'defaults' => array( |
358 | 358 | 'data_type' => 'VARCHAR', |
359 | - 'admin_title' => __('Job Sector','geodirectory'), |
|
360 | - 'site_title' => __('Job Sector','geodirectory'), |
|
361 | - 'admin_desc' => __('Select the job sector.','geodirectory'), |
|
359 | + 'admin_title' => __('Job Sector', 'geodirectory'), |
|
360 | + 'site_title' => __('Job Sector', 'geodirectory'), |
|
361 | + 'admin_desc' => __('Select the job sector.', 'geodirectory'), |
|
362 | 362 | 'htmlvar_name' => 'job_sector', |
363 | 363 | 'is_active' => true, |
364 | 364 | 'for_admin_use' => false, |
365 | 365 | 'default_value' => '', |
366 | 366 | 'show_in' => '[detail]', |
367 | 367 | 'is_required' => true, |
368 | - 'option_values' => __('Select Sector/,Private Sector,Public Sector,Agencies','geodirectory'), |
|
368 | + 'option_values' => __('Select Sector/,Private Sector,Public Sector,Agencies', 'geodirectory'), |
|
369 | 369 | 'validation_pattern' => '', |
370 | 370 | 'validation_msg' => '', |
371 | 371 | 'required_msg' => '', |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | /** |
381 | 381 | * @see `geodir_custom_fields` |
382 | 382 | */ |
383 | - return apply_filters('geodir_custom_fields_predefined',$custom_fields,$post_type); |
|
383 | + return apply_filters('geodir_custom_fields_predefined', $custom_fields, $post_type); |
|
384 | 384 | } |
385 | 385 | |
386 | 386 | |
@@ -394,11 +394,11 @@ discard block |
||
394 | 394 | * @since 1.6.9 |
395 | 395 | * @return string The html to output. |
396 | 396 | */ |
397 | -function geodir_predefined_custom_field_output_twitter_feed($html,$location,$cf){ |
|
397 | +function geodir_predefined_custom_field_output_twitter_feed($html, $location, $cf) { |
|
398 | 398 | global $post; |
399 | 399 | |
400 | 400 | |
401 | - if (isset($post->{$cf['htmlvar_name']}) && $post->{$cf['htmlvar_name']} != '' ): |
|
401 | + if (isset($post->{$cf['htmlvar_name']}) && $post->{$cf['htmlvar_name']} != ''): |
|
402 | 402 | |
403 | 403 | $class = ($cf['htmlvar_name'] == 'geodir_timing') ? "geodir-i-time" : "geodir-i-text"; |
404 | 404 | |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | } |
414 | 414 | |
415 | 415 | |
416 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;">'; |
|
416 | + $html = '<div class="geodir_more_info '.$cf['css_class'].' '.$cf['htmlvar_name'].'" style="clear:both;">'; |
|
417 | 417 | |
418 | 418 | $html .= '<a class="twitter-timeline" data-height="600" data-dnt="true" href="https://twitter.com/'.$post->{$cf['htmlvar_name']}.'">Tweets by '.$post->{$cf['htmlvar_name']}.'</a> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>'; |
419 | 419 | $html .= '</div>'; |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | |
423 | 423 | return $html; |
424 | 424 | } |
425 | -add_filter('geodir_custom_field_output_text_key_twitter_feed','geodir_predefined_custom_field_output_twitter_feed',10,3); |
|
425 | +add_filter('geodir_custom_field_output_text_key_twitter_feed', 'geodir_predefined_custom_field_output_twitter_feed', 10, 3); |
|
426 | 426 | |
427 | 427 | /** |
428 | 428 | * Filter the get_directions custom field output to show a link. |
@@ -434,38 +434,38 @@ discard block |
||
434 | 434 | * @since 1.6.9 |
435 | 435 | * @return string The html to output. |
436 | 436 | */ |
437 | -function geodir_predefined_custom_field_output_get_directions($html,$location,$cf) { |
|
437 | +function geodir_predefined_custom_field_output_get_directions($html, $location, $cf) { |
|
438 | 438 | global $post; |
439 | 439 | |
440 | 440 | |
441 | - if ( isset( $post->{$cf['htmlvar_name']} ) && $post->{$cf['htmlvar_name']} != '' && isset( $post->post_latitude ) && $post->post_latitude ){ |
|
441 | + if (isset($post->{$cf['htmlvar_name']} ) && $post->{$cf['htmlvar_name']} != '' && isset($post->post_latitude) && $post->post_latitude) { |
|
442 | 442 | |
443 | - $field_icon = geodir_field_icon_proccess( $cf ); |
|
444 | - if ( strpos( $field_icon, 'http' ) !== false ) { |
|
443 | + $field_icon = geodir_field_icon_proccess($cf); |
|
444 | + if (strpos($field_icon, 'http') !== false) { |
|
445 | 445 | $field_icon_af = ''; |
446 | - } elseif ( $field_icon == '' ) { |
|
446 | + } elseif ($field_icon == '') { |
|
447 | 447 | $field_icon_af = '<i class="fa fa-location-arrow"></i>'; |
448 | 448 | } else { |
449 | 449 | $field_icon_af = $field_icon; |
450 | 450 | $field_icon = ''; |
451 | 451 | } |
452 | 452 | |
453 | - $link_text = isset( $post->{$cf['default_value']} ) ? $post->{$cf['default_value']} : __( 'Get Directions', 'geodirectory' ); |
|
453 | + $link_text = isset($post->{$cf['default_value']} ) ? $post->{$cf['default_value']} : __('Get Directions', 'geodirectory'); |
|
454 | 454 | |
455 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;">'; |
|
455 | + $html = '<div class="geodir_more_info '.$cf['css_class'].' '.$cf['htmlvar_name'].'" style="clear:both;">'; |
|
456 | 456 | |
457 | - if(isset( $cf['field_icon'] ) && $cf['field_icon']){ |
|
457 | + if (isset($cf['field_icon']) && $cf['field_icon']) { |
|
458 | 458 | $html .= $field_icon_af; |
459 | 459 | } |
460 | 460 | |
461 | 461 | // We use maps.apple.com here because it will handle redirects nicely in most cases |
462 | - $html .= '<a href="https://maps.apple.com/?daddr=' . $post->post_latitude . ',' . $post->post_longitude . '" target="_blank" >' . $link_text . '</a>'; |
|
462 | + $html .= '<a href="https://maps.apple.com/?daddr='.$post->post_latitude.','.$post->post_longitude.'" target="_blank" >'.$link_text.'</a>'; |
|
463 | 463 | $html .= '</div>'; |
464 | 464 | |
465 | - }else{ |
|
466 | - $html =''; |
|
465 | + } else { |
|
466 | + $html = ''; |
|
467 | 467 | } |
468 | 468 | |
469 | 469 | return $html; |
470 | 470 | } |
471 | -add_filter('geodir_custom_field_output_text_key_get_directions','geodir_predefined_custom_field_output_get_directions',10,3); |
|
471 | +add_filter('geodir_custom_field_output_text_key_get_directions', 'geodir_predefined_custom_field_output_get_directions', 10, 3); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | { |
123 | 123 | $classes[] = 'geodir-x'; |
124 | 124 | |
125 | - if(isset($_REQUEST['geodir_search'])){ |
|
125 | + if (isset($_REQUEST['geodir_search'])) { |
|
126 | 126 | $classes[] = 'geodir-x-search'; |
127 | 127 | } |
128 | 128 | return $classes; |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | echo '<div class="x-main full" role="main">'; |
188 | 188 | } elseif ($stack == 'ethos') { |
189 | 189 | echo '<div class="x-container-fluid x-container max width main"><div class="offset cf">'; |
190 | - }else{ |
|
190 | + } else { |
|
191 | 191 | echo '<div class="x-container max width offset">'; |
192 | 192 | } |
193 | 193 | } |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | { |
222 | 222 | $content_class = ' entry-wrap '; |
223 | 223 | |
224 | - echo '<div class="x-main left ' . $class . $content_class . ' " role="main">'; |
|
224 | + echo '<div class="x-main left '.$class.$content_class.' " role="main">'; |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | /** |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | function geodir_x_action_sidebar_right_open($type = '', $id = '', $class = '', $itemtype = '') |
249 | 249 | { |
250 | - echo '<aside class="x-sidebar right" role="complementary" itemscope itemtype="' . $itemtype . '">'; |
|
250 | + echo '<aside class="x-sidebar right" role="complementary" itemscope itemtype="'.$itemtype.'">'; |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | // 8. Get shop title. |
320 | 320 | // |
321 | 321 | |
322 | - GLOBAL $post,$wp; |
|
322 | + GLOBAL $post, $wp; |
|
323 | 323 | |
324 | 324 | if (geodir_is_page('detail') || geodir_is_page('listing') || (isset($wp->query_vars['page_id']) && $wp->query_vars['page_id'] == geodir_location_page_id())) { |
325 | 325 | geodir_breadcrumb(); |
@@ -327,57 +327,57 @@ discard block |
||
327 | 327 | |
328 | 328 | $stack = x_get_stack(); |
329 | 329 | $delimiter = ' <span class="delimiter"><i class="x-icon-angle-right"></i></span> '; // 1 |
330 | - $home_text = '<span class="home"><i class="x-icon-home"></i></span>'; // 2 |
|
331 | - $home_link = home_url(); // 3 |
|
332 | - $current_before = '<span class="current">'; // 4 |
|
333 | - $current_after = '</span>'; // 5 |
|
334 | - $page_title = get_the_title(); // 6 |
|
335 | - $blog_title = get_the_title(get_option('page_for_posts', true)); // 7 |
|
336 | - $shop_title = get_theme_mod('x_' . $stack . '_shop_title'); // 8 |
|
330 | + $home_text = '<span class="home"><i class="x-icon-home"></i></span>'; // 2 |
|
331 | + $home_link = home_url(); // 3 |
|
332 | + $current_before = '<span class="current">'; // 4 |
|
333 | + $current_after = '</span>'; // 5 |
|
334 | + $page_title = get_the_title(); // 6 |
|
335 | + $blog_title = get_the_title(get_option('page_for_posts', true)); // 7 |
|
336 | + $shop_title = get_theme_mod('x_'.$stack.'_shop_title'); // 8 |
|
337 | 337 | |
338 | 338 | if (function_exists('woocommerce_get_page_id')) { |
339 | 339 | $shop_url = x_get_shop_link(); |
340 | - $shop_link = '<a href="' . $shop_url . '">' . $shop_title . '</a>'; |
|
340 | + $shop_link = '<a href="'.$shop_url.'">'.$shop_title.'</a>'; |
|
341 | 341 | } |
342 | 342 | |
343 | 343 | if (is_front_page()) { |
344 | - echo '<div class="x-breadcrumbs">' . $current_before . $home_text . $current_after . '</div>'; |
|
344 | + echo '<div class="x-breadcrumbs">'.$current_before.$home_text.$current_after.'</div>'; |
|
345 | 345 | } elseif (is_home()) { |
346 | - echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter . $current_before . $blog_title . $current_after . '</div>'; |
|
346 | + echo '<div class="x-breadcrumbs"><a href="'.$home_link.'">'.$home_text.'</a>'.$delimiter.$current_before.$blog_title.$current_after.'</div>'; |
|
347 | 347 | } else { |
348 | - echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter; |
|
348 | + echo '<div class="x-breadcrumbs"><a href="'.$home_link.'">'.$home_text.'</a>'.$delimiter; |
|
349 | 349 | if (is_category()) { |
350 | 350 | $the_cat = get_category(get_query_var('cat'), false); |
351 | 351 | if ($the_cat->parent != 0) echo get_category_parents($the_cat->parent, TRUE, $delimiter); |
352 | - echo $current_before . single_cat_title('', false) . $current_after; |
|
352 | + echo $current_before.single_cat_title('', false).$current_after; |
|
353 | 353 | } elseif (x_is_product_category()) { |
354 | - echo $shop_link . $delimiter . $current_before . single_cat_title('', false) . $current_after; |
|
354 | + echo $shop_link.$delimiter.$current_before.single_cat_title('', false).$current_after; |
|
355 | 355 | } elseif (x_is_product_tag()) { |
356 | - echo $shop_link . $delimiter . $current_before . single_tag_title('', false) . $current_after; |
|
356 | + echo $shop_link.$delimiter.$current_before.single_tag_title('', false).$current_after; |
|
357 | 357 | } elseif (is_search()) { |
358 | - echo $current_before . __('Search Results for ', '__x__') . '“' . get_search_query() . '”' . $current_after; |
|
358 | + echo $current_before.__('Search Results for ', '__x__').'“'.get_search_query().'”'.$current_after; |
|
359 | 359 | } elseif (is_singular('post')) { |
360 | 360 | if (get_option('page_for_posts') == is_front_page()) { |
361 | - echo $current_before . $page_title . $current_after; |
|
361 | + echo $current_before.$page_title.$current_after; |
|
362 | 362 | } else { |
363 | - echo '<a href="' . get_permalink(get_option('page_for_posts')) . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $blog_title . '</a>' . $delimiter . $current_before . $page_title . $current_after; |
|
363 | + echo '<a href="'.get_permalink(get_option('page_for_posts')).'" title="'.esc_attr(__('See All Posts', '__x__')).'">'.$blog_title.'</a>'.$delimiter.$current_before.$page_title.$current_after; |
|
364 | 364 | } |
365 | 365 | } elseif (x_is_portfolio()) { |
366 | - echo $current_before . get_the_title() . $current_after; |
|
366 | + echo $current_before.get_the_title().$current_after; |
|
367 | 367 | } elseif (x_is_portfolio_item()) { |
368 | 368 | $link = x_get_parent_portfolio_link(); |
369 | 369 | $title = x_get_parent_portfolio_title(); |
370 | - echo '<a href="' . $link . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $title . '</a>' . $delimiter . $current_before . $page_title . $current_after; |
|
370 | + echo '<a href="'.$link.'" title="'.esc_attr(__('See All Posts', '__x__')).'">'.$title.'</a>'.$delimiter.$current_before.$page_title.$current_after; |
|
371 | 371 | } elseif (x_is_product()) { |
372 | - echo $shop_link . $delimiter . $current_before . $page_title . $current_after; |
|
372 | + echo $shop_link.$delimiter.$current_before.$page_title.$current_after; |
|
373 | 373 | } elseif (is_page() && !$post->post_parent) { |
374 | - echo $current_before . $page_title . $current_after; |
|
374 | + echo $current_before.$page_title.$current_after; |
|
375 | 375 | } elseif (is_page() && $post->post_parent) { |
376 | 376 | $parent_id = $post->post_parent; |
377 | 377 | $breadcrumbs = array(); |
378 | 378 | while ($parent_id) { |
379 | 379 | $page = get_page($parent_id); |
380 | - $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>'; |
|
380 | + $breadcrumbs[] = '<a href="'.get_permalink($page->ID).'">'.get_the_title($page->ID).'</a>'; |
|
381 | 381 | $parent_id = $page->post_parent; |
382 | 382 | } |
383 | 383 | $breadcrumbs = array_reverse($breadcrumbs); |
@@ -385,24 +385,24 @@ discard block |
||
385 | 385 | echo $breadcrumbs[$i]; |
386 | 386 | if ($i != count($breadcrumbs) - 1) echo $delimiter; |
387 | 387 | } |
388 | - echo $delimiter . $current_before . $page_title . $current_after; |
|
388 | + echo $delimiter.$current_before.$page_title.$current_after; |
|
389 | 389 | } elseif (is_tag()) { |
390 | - echo $current_before . single_tag_title('', false) . $current_after; |
|
390 | + echo $current_before.single_tag_title('', false).$current_after; |
|
391 | 391 | } elseif (is_author()) { |
392 | 392 | GLOBAL $author; |
393 | 393 | $userdata = get_userdata($author); |
394 | - echo $current_before . __('Posts by ', '__x__') . '“' . $userdata->display_name . $current_after . '”'; |
|
394 | + echo $current_before.__('Posts by ', '__x__').'“'.$userdata->display_name.$current_after.'”'; |
|
395 | 395 | } elseif (is_404()) { |
396 | - echo $current_before . __('404 (Page Not Found)', '__x__') . $current_after; |
|
396 | + echo $current_before.__('404 (Page Not Found)', '__x__').$current_after; |
|
397 | 397 | } elseif (is_archive()) { |
398 | 398 | if (x_is_shop()) { |
399 | - echo $current_before . $shop_title . $current_after; |
|
399 | + echo $current_before.$shop_title.$current_after; |
|
400 | 400 | } else { |
401 | - echo $current_before . __('Archives ', '__x__') . $current_after; |
|
401 | + echo $current_before.__('Archives ', '__x__').$current_after; |
|
402 | 402 | } |
403 | 403 | } |
404 | 404 | if (get_query_var('paged')) { |
405 | - echo ' <span class="current" style="white-space: nowrap;">(' . __('Page', '__x__') . ' ' . get_query_var('paged') . ')</span>'; |
|
405 | + echo ' <span class="current" style="white-space: nowrap;">('.__('Page', '__x__').' '.get_query_var('paged').')</span>'; |
|
406 | 406 | } |
407 | 407 | echo '</div>'; |
408 | 408 | } |