Test Failed
Push — master ( 3b1e42...ed3296 )
by Stiofan
12:47
created
geodirectory-functions/template_functions.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                 if ($is_wpml && !empty($wp->query_vars['page_id'])) {
69 69
                     wp_redirect(geodir_getlink(get_permalink($wp->query_vars['page_id']), array('listing_type' => $post_type)));
70 70
                 } else {
71
-                    wp_redirect(trailingslashit(get_site_url()) . $pagename . '/?listing_type=' . $post_type);
71
+                    wp_redirect(trailingslashit(get_site_url()).$pagename.'/?listing_type='.$post_type);
72 72
                 }
73 73
                 gd_die();
74 74
             }
@@ -126,21 +126,21 @@  discard block
 block discarded – undo
126 126
         case 'listing-listview':
127 127
             $template = locate_template(array("geodirectory/listing-listview.php"));
128 128
             if (!$template) {
129
-                $template = geodir_plugin_path() . '/geodirectory-templates/listing-listview.php';
129
+                $template = geodir_plugin_path().'/geodirectory-templates/listing-listview.php';
130 130
             }
131 131
             return $template;
132 132
             break;
133 133
         case 'widget-listing-listview':
134 134
             $template = locate_template(array("geodirectory/widget-listing-listview.php"));
135 135
             if (!$template) {
136
-                $template = geodir_plugin_path() . '/geodirectory-templates/widget-listing-listview.php';
136
+                $template = geodir_plugin_path().'/geodirectory-templates/widget-listing-listview.php';
137 137
             }
138 138
             return $template;
139 139
             break;
140 140
 		case 'email-message':
141 141
             $template = locate_template(array("geodirectory/email-message.php"));
142 142
             if (!$template) {
143
-                $template = geodir_plugin_path() . '/geodirectory-templates/email-message.php';
143
+                $template = geodir_plugin_path().'/geodirectory-templates/email-message.php';
144 144
             }
145 145
             return $template;
146 146
             break;
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
         $template = geodir_locate_template('signup');
200 200
 
201
-        if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/geodir-signup.php';
201
+        if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/geodir-signup.php';
202 202
 
203 203
         /**
204 204
          * Filter the signup template path.
@@ -212,11 +212,11 @@  discard block
 block discarded – undo
212 212
     if (geodir_is_page('add-listing') || $geodir_custom_page_list['geodir_add_listing_page']) {
213 213
         if (!geodir_is_default_location_set()) {
214 214
             global $information;
215
-            $information = sprintf(__('Please %sclick here%s to set a default location, this will make the plugin work properly.', 'geodirectory'), '<a href=\'' . admin_url('admin.php?page=geodirectory&tab=default_location_settings') . '\'>', '</a>');
215
+            $information = sprintf(__('Please %sclick here%s to set a default location, this will make the plugin work properly.', 'geodirectory'), '<a href=\''.admin_url('admin.php?page=geodirectory&tab=default_location_settings').'\'>', '</a>');
216 216
 
217 217
             $template = geodir_locate_template('information');
218 218
 
219
-            if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/geodir-information.php';
219
+            if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/geodir-information.php';
220 220
             /**
221 221
              * Filter the information template path.
222 222
              *
@@ -228,10 +228,10 @@  discard block
 block discarded – undo
228 228
         // check if pid exists in the record if yes then check if this post belongs to the user who is logged in.
229 229
         if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
230 230
             /// WPML
231
-            if (geodir_wpml_is_post_type_translated(get_post_type((int)$_GET['pid'])) && $duplicate_of = wpml_get_master_post_from_duplicate((int)$_GET['pid'])) {
231
+            if (geodir_wpml_is_post_type_translated(get_post_type((int) $_GET['pid'])) && $duplicate_of = wpml_get_master_post_from_duplicate((int) $_GET['pid'])) {
232 232
                 global $sitepress;
233 233
                 
234
-                $lang_of_duplicate = geodir_get_language_for_element($duplicate_of, 'post_' . get_post_type($duplicate_of));
234
+                $lang_of_duplicate = geodir_get_language_for_element($duplicate_of, 'post_'.get_post_type($duplicate_of));
235 235
                 $sitepress->switch_lang($lang_of_duplicate, true);
236 236
         
237 237
                 $redirect_to = get_permalink(geodir_add_listing_page_id());
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
             if (!$is_current_user_owner) {
251 251
                 $template = geodir_locate_template('information');
252 252
 
253
-                if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/geodir-information.php';
253
+                if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/geodir-information.php';
254 254
                 /**
255 255
                  * Filter the information template path.
256 256
                  *
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
         $template = geodir_locate_template('add-listing');
274 274
 
275
-        if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/add-listing.php';
275
+        if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/add-listing.php';
276 276
         /**
277 277
          * Filter the add listing template path.
278 278
          *
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 
290 290
         $template = geodir_locate_template('preview');
291 291
 
292
-        if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/listing-detail.php';
292
+        if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/listing-detail.php';
293 293
         /**
294 294
          * Filter the preview template path.
295 295
          *
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 
306 306
         $template = geodir_locate_template('success');
307 307
 
308
-        if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/listing-success.php';
308
+        if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/listing-success.php';
309 309
         /**
310 310
          * Filter the success template path.
311 311
          *
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 
321 321
         $template = geodir_locate_template('detail');
322 322
 
323
-        if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/listing-detail.php';
323
+        if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/listing-detail.php';
324 324
         /**
325 325
          * Filter the detail template path.
326 326
          *
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 
336 336
         $template = geodir_locate_template('listing');
337 337
 
338
-        if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/geodir-listing.php';
338
+        if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/geodir-listing.php';
339 339
         /**
340 340
          * Filter the listing template path.
341 341
          *
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 
351 351
         $template = geodir_locate_template('search');
352 352
 
353
-        if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/geodir-search.php';
353
+        if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/geodir-search.php';
354 354
         /**
355 355
          * Filter the search template path.
356 356
          *
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 
366 366
         $template = geodir_locate_template('author');
367 367
 
368
-        if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/geodir-author.php';
368
+        if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/geodir-author.php';
369 369
         /**
370 370
          * Filter the author template path.
371 371
          *
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 
377 377
     }
378 378
 
379
-    if ( geodir_is_page('home') || geodir_is_page('location')) {
379
+    if (geodir_is_page('home') || geodir_is_page('location')) {
380 380
 
381 381
         global $post, $wp_query;
382 382
 
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 
387 387
             $template = geodir_locate_template('geodir-home');
388 388
 
389
-            if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/geodir-home.php';
389
+            if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/geodir-home.php';
390 390
             /**
391 391
              * Filter the home page template path.
392 392
              *
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 
400 400
             $template = geodir_locate_template('location');
401 401
 
402
-            if (!$template) $template = geodir_plugin_path() . '/geodirectory-templates/geodir-location.php';
402
+            if (!$template) $template = geodir_plugin_path().'/geodirectory-templates/geodir-location.php';
403 403
             /**
404 404
              * Filter the location template path.
405 405
              *
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
      */
442 442
     do_action("geodir_get_template_part_{$slug}", $slug, $name);
443 443
     $templates = array();
444
-    $name = (string)$name;
444
+    $name = (string) $name;
445 445
     if ('' !== $name) {
446 446
         $template_name = "{$slug}-{$name}.php";
447 447
 
@@ -449,14 +449,14 @@  discard block
 block discarded – undo
449 449
         $template_name = "{$slug}.php";
450 450
     }
451 451
 
452
-    if (!locate_template(array("geodirectory/" . $template_name))) :
452
+    if (!locate_template(array("geodirectory/".$template_name))) :
453 453
         /**
454 454
          * Filter the template part with slug and name.
455 455
          *
456 456
          * @since 1.0.0
457 457
          * @param string $template_name The template name.
458 458
          */
459
-        $template = apply_filters("geodir_template_part-{$slug}-{$name}", geodir_plugin_path() . '/geodirectory-templates/' . $template_name);
459
+        $template = apply_filters("geodir_template_part-{$slug}-{$name}", geodir_plugin_path().'/geodirectory-templates/'.$template_name);
460 460
         /**
461 461
          * Includes the template part with slug and name.
462 462
          *
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
          */
465 465
         include($template);
466 466
     else:
467
-        locate_template(array("geodirectory/" . $template_name), true, false);
467
+        locate_template(array("geodirectory/".$template_name), true, false);
468 468
     endif;
469 469
 
470 470
 }
@@ -492,9 +492,9 @@  discard block
 block discarded – undo
492 492
     $gdp_post_type = $gdp_post_type != '' && !empty($all_postypes) && in_array($gdp_post_type, $all_postypes) ? $gdp_post_type : NULL;
493 493
 
494 494
     if ($gdp_post_id && $gdp_post_type) {
495
-        $append_class = 'gd-post-' . $gdp_post_type;
495
+        $append_class = 'gd-post-'.$gdp_post_type;
496 496
         $append_class .= isset($post->is_featured) && $post->is_featured > 0 ? ' gd-post-featured' : '';
497
-        $class = $class != '' ? $class . ' ' . $append_class : $append_class;
497
+        $class = $class != '' ? $class.' '.$append_class : $append_class;
498 498
     }
499 499
 
500 500
     return $class;
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 	 */
527 527
 	$message = apply_filters('geodir_message_listing_not_found', $message, $template_listview, $favorite);
528 528
 	
529
-	echo '<li class="no-listing">' . $message . '</li>';
529
+	echo '<li class="no-listing">'.$message.'</li>';
530 530
 }
531 531
 
532 532
 /**
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 function geodir_convert_listing_view_class($columns = '') {
556 556
 	$class = '';
557 557
 	
558
-	switch ((int)$columns) {
558
+	switch ((int) $columns) {
559 559
 		case 1:
560 560
 			$class = '';
561 561
 		break;
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
 		$html .= '<option value=""></option>';
621 621
 		if (!empty($star_texts) && is_array($star_texts)) {
622 622
 			foreach ($star_texts as $i => $text) {
623
-				$html .= '<option ' . selected((int)($i + 1), (int)$default, false) . ' value="' . (int)($i + 1) . '">' . $text . '</option>';
623
+				$html .= '<option '.selected((int) ($i + 1), (int) $default, false).' value="'.(int) ($i + 1).'">'.$text.'</option>';
624 624
 			}
625 625
 		} else {
626 626
 			$html .= '<option value="1">1</option>';
@@ -649,14 +649,14 @@  discard block
 block discarded – undo
649 649
 function geodir_font_awesome_rating_stars_html($html, $rating, $star_count = 5) {
650 650
 	if (get_option('geodir_reviewrating_enable_font_awesome') == '1') {
651 651
 		$rating = min($rating, $star_count);
652
-		$full_stars = floor( $rating );
653
-		$half_stars = ceil( $rating - $full_stars );
652
+		$full_stars = floor($rating);
653
+		$half_stars = ceil($rating - $full_stars);
654 654
 		$empty_stars = $star_count - $full_stars - $half_stars;
655 655
 		
656 656
 		$html = '<div class="gd-star-rating gd-fa-star-rating">';
657
-		$html .= str_repeat( '<i class="fas fa-star gd-full-star"></i>', $full_stars );
658
-		$html .= str_repeat( '<i class="fas fa-star-half-alt gd-half-star"></i>', $half_stars );
659
-		$html .= str_repeat( '<i class="far fa-star gd-empty-star"></i>', $empty_stars);
657
+		$html .= str_repeat('<i class="fas fa-star gd-full-star"></i>', $full_stars);
658
+		$html .= str_repeat('<i class="fas fa-star-half-alt gd-half-star"></i>', $half_stars);
659
+		$html .= str_repeat('<i class="far fa-star gd-empty-star"></i>', $empty_stars);
660 660
 		$html .= '</div>';
661 661
 	}
662 662
 
@@ -675,48 +675,48 @@  discard block
 block discarded – undo
675 675
 		$full_color = get_option('geodir_reviewrating_fa_full_rating_color', '#757575');
676 676
 		if ($full_color != '#757575') {
677 677
 			echo '<style type="text/css">.br-theme-fontawesome-stars .br-widget a.br-active,.br-theme-fontawesome-stars .br-widget a.br-selected,
678
-			.gd-star-rating svg.svg-inline--fa {color:' . stripslashes($full_color) . '!important;}</style>';
678
+			.gd-star-rating svg.svg-inline--fa {color:' . stripslashes($full_color).'!important;}</style>';
679 679
 		}
680 680
 	}
681 681
 }
682 682
 
683
-function geodir_parse_shortcodes( $content, $shortcode, $first = true ) {
684
-    if ( empty( $content ) || empty( $shortcode ) ) {
683
+function geodir_parse_shortcodes($content, $shortcode, $first = true) {
684
+    if (empty($content) || empty($shortcode)) {
685 685
         return array();
686 686
     }
687 687
     
688
-    if ( false === strpos( $content, '[' ) ) {
688
+    if (false === strpos($content, '[')) {
689 689
         return array();
690 690
     }
691 691
 
692
-    if ( ! has_shortcode( $content, $shortcode ) ) {
692
+    if (!has_shortcode($content, $shortcode)) {
693 693
         return array();
694 694
     }
695 695
 
696 696
     $shortcodes = array();
697
-    if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) ) {
698
-        foreach ( $matches as $match ) {
699
-            if ( $shortcode === $match[2] ) {
700
-                $shortcode_attrs = shortcode_parse_atts( $match[3] );
701
-                if ( ! is_array( $shortcode_attrs ) ) {
697
+    if (preg_match_all('/'.get_shortcode_regex().'/s', $content, $matches, PREG_SET_ORDER)) {
698
+        foreach ($matches as $match) {
699
+            if ($shortcode === $match[2]) {
700
+                $shortcode_attrs = shortcode_parse_atts($match[3]);
701
+                if (!is_array($shortcode_attrs)) {
702 702
                     $shortcode_attrs = array();
703 703
                 }
704 704
                 $shortcode_attrs['shortcode_tag'] = $shortcode;
705
-                if ( !empty( $match[5] ) ) {
705
+                if (!empty($match[5])) {
706 706
                     $shortcode_attrs['shortcode_content'] = $match[5];
707 707
                 }
708 708
                 $shortcodes[] = $shortcode_attrs;
709
-                if ( $first === true ) {
709
+                if ($first === true) {
710 710
                     break;
711 711
                 }
712 712
             }
713 713
         }
714
-        if ( $first === true && !empty( $shortcodes ) ) {
714
+        if ($first === true && !empty($shortcodes)) {
715 715
             $shortcodes = $shortcodes[0];
716 716
         }
717 717
     }
718 718
 
719
-    return apply_filters( 'geodir_parse_shortcodes', $shortcodes, $content, $shortcode, $first );
719
+    return apply_filters('geodir_parse_shortcodes', $shortcodes, $content, $shortcode, $first);
720 720
 }
721 721
 
722 722
 /**
@@ -730,14 +730,14 @@  discard block
 block discarded – undo
730 730
  * @param array $email_vars     The email parameters.
731 731
  * @return string Filtered email message.
732 732
  */
733
-function geodir_email_wrap_message( $message, $email_type = '', $email_vars = array() ) {
733
+function geodir_email_wrap_message($message, $email_type = '', $email_vars = array()) {
734 734
 	global $geodir_email_content, $geodir_email_type, $geodir_email_vars;
735 735
 
736 736
 	$geodir_email_content = $message;
737 737
 	$geodir_email_type = $email_type;
738 738
 	$geodir_email_vars = $email_vars;
739 739
 
740
-	$template = apply_filters( "geodir_template_part-email-content", geodir_locate_template( 'email-message' ) );
740
+	$template = apply_filters("geodir_template_part-email-content", geodir_locate_template('email-message'));
741 741
 
742 742
 	ob_start();
743 743
 	/**
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
 	 *
746 746
 	 * @since 1.6.26
747 747
 	 */
748
-	include( $template );
748
+	include($template);
749 749
 
750 750
 	$content = ob_get_clean();
751 751
 
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
  * @param string $post_id       The post ID.
771 771
  * @param string $user_id       The user ID.
772 772
  */
773
-function geodir_email_wrap_user_message( $message, $fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id ) {
773
+function geodir_email_wrap_user_message($message, $fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id) {
774 774
 	$email_vars = array();
775 775
 	$email_vars['message_type'] = $message_type;
776 776
 	$email_vars['fromEmail'] = $fromEmail;
@@ -783,9 +783,9 @@  discard block
 block discarded – undo
783 783
 	$email_vars['post_id'] = $post_id;
784 784
 	$email_vars['user_id'] = $user_id;
785 785
 
786
-	return geodir_email_wrap_message( $message, $message_type, $email_vars );
786
+	return geodir_email_wrap_message($message, $message_type, $email_vars);
787 787
 }
788
-add_filter( 'geodir_sendEmail_message', 'geodir_email_wrap_user_message', 10, 11 );
788
+add_filter('geodir_sendEmail_message', 'geodir_email_wrap_user_message', 10, 11);
789 789
 
790 790
 /**
791 791
  * Filter the admin email message.
@@ -799,13 +799,13 @@  discard block
 block discarded – undo
799 799
  * @param string $message_type Can be 'expiration','post_submited','renew','upgrade','claim_approved','claim_rejected','claim_requested','auto_claim','payment_success','payment_fail'.
800 800
  * @param string $custom_1     Custom data to be sent.
801 801
  */
802
-function geodir_email_wrap_admin_message( $message, $page_id, $user_id, $message_type, $custom_1 ) {
802
+function geodir_email_wrap_admin_message($message, $page_id, $user_id, $message_type, $custom_1) {
803 803
 	$email_vars = array();
804 804
 	$email_vars['message_type'] = $message_type;
805 805
 	$email_vars['page_id'] = $page_id;
806 806
 	$email_vars['user_id'] = $user_id;
807 807
 	$email_vars['custom_1'] = $custom_1;
808 808
 
809
-	return geodir_email_wrap_message( $message, $message_type, $email_vars );
809
+	return geodir_email_wrap_message($message, $message_type, $email_vars);
810 810
 }
811
-add_filter( 'geodir_adminEmail_message', 'geodir_email_wrap_admin_message', 10, 5 );
812 811
\ No newline at end of file
812
+add_filter('geodir_adminEmail_message', 'geodir_email_wrap_admin_message', 10, 5);
813 813
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-functions/custom_fields_predefined.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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="fas 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 = !empty( $cf['default_value']) ? $cf['default_value'] : __( 'Get Directions', 'geodirectory' );
453
+        $link_text = !empty($cf['default_value']) ? $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);
Please login to merge, or discard this patch.