Passed
Pull Request — master (#204)
by Kiran
08:01
created
geodirectory-admin/admin_db_install.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@
 block discarded – undo
27 27
             if (!empty($wpdb->collate)) $collate .= " COLLATE $wpdb->collate";
28 28
         }
29 29
 
30
-		/**
31
-		 * Include any functions needed for upgrades.
32
-		 *
33
-		 * @since 1.0.0
34
-		 */
35
-		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
30
+        /**
31
+         * Include any functions needed for upgrades.
32
+         *
33
+         * @since 1.0.0
34
+         */
35
+        require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
36 36
 
37 37
 
38 38
 // rename tables if we need to
Please login to merge, or discard this patch.
geodirectory-admin/admin_hooks_actions.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * GeoDirectory Admin.
4
- *
5
- * Main admin file which loads all settings panels and sets up admin menus.
6
- *
7
- * @since 1.0.0
8
- * @package GeoDirectory
9
- */
3
+     * GeoDirectory Admin.
4
+     *
5
+     * Main admin file which loads all settings panels and sets up admin menus.
6
+     *
7
+     * @since 1.0.0
8
+     * @package GeoDirectory
9
+     */
10 10
 
11 11
 add_action('admin_init', 'geodir_admin_init');
12 12
 if (!function_exists('geodir_admin_init')) {
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
 {
86 86
     global $pagenow;
87 87
 	
88
-	// Get the current post type
89
-	$post_type = geodir_admin_current_post_type();
90
-	$geodir_post_types = geodir_get_posttypes();
88
+    // Get the current post type
89
+    $post_type = geodir_admin_current_post_type();
90
+    $geodir_post_types = geodir_get_posttypes();
91 91
     
92
-	if ((isset($_REQUEST['page']) && $_REQUEST['page'] == 'geodirectory') || (($pagenow == 'post.php' || $pagenow == 'post-new.php' || $pagenow == 'edit.php') && $post_type && in_array($post_type, $geodir_post_types)) || ($pagenow == 'edit-tags.php' || $pagenow == 'edit-comments.php' || $pagenow == 'comment.php')) {
92
+    if ((isset($_REQUEST['page']) && $_REQUEST['page'] == 'geodirectory') || (($pagenow == 'post.php' || $pagenow == 'post-new.php' || $pagenow == 'edit.php') && $post_type && in_array($post_type, $geodir_post_types)) || ($pagenow == 'edit-tags.php' || $pagenow == 'edit-comments.php' || $pagenow == 'comment.php')) {
93 93
         add_action('admin_enqueue_scripts', 'geodir_admin_scripts');
94 94
         add_action('admin_enqueue_scripts', 'geodir_admin_styles');
95 95
     }
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 
427 427
 
428 428
         foreach ($sort_options as $key => $val) {
429
-			$val = stripslashes_deep($val); // strip slashes
429
+            $val = stripslashes_deep($val); // strip slashes
430 430
 
431 431
             $check_html_variable = $wpdb->get_var(
432 432
                 $wpdb->prepare(
@@ -1546,20 +1546,20 @@  discard block
 block discarded – undo
1546 1546
 function geodir_diagnose_load_db_language() {
1547 1547
     global $wpdb;
1548 1548
 	
1549
-	$is_error_during_diagnose = geodirectory_load_db_language();
1549
+    $is_error_during_diagnose = geodirectory_load_db_language();
1550 1550
 
1551 1551
     $output_str = '';
1552 1552
 
1553 1553
     if ($is_error_during_diagnose) {
1554 1554
         $output_str .= "<li>" . __('Fail to load custom fields in to file for translation, please check file permission:', 'geodirectory') . ' ' . geodir_plugin_path() . '/db-language.php' . "</li>";
1555
-		$info_div_class = "geodir_problem_info";
1555
+        $info_div_class = "geodir_problem_info";
1556 1556
     } else {
1557 1557
         $output_str .= "<li>" . __('Load custom fields in to file for translation: ok', 'geodirectory') . "</li>";
1558
-		$info_div_class = "geodir_noproblem_info";
1558
+        $info_div_class = "geodir_noproblem_info";
1559 1559
         $fix_button_txt = '';
1560 1560
     }
1561 1561
     
1562
-	echo "<ul class='$info_div_class'>";
1562
+    echo "<ul class='$info_div_class'>";
1563 1563
     echo $output_str;
1564 1564
     echo $fix_button_txt;
1565 1565
     echo "</ul>";
@@ -1684,7 +1684,7 @@  discard block
 block discarded – undo
1684 1684
     $uploads = wp_upload_dir();
1685 1685
     ini_set('auto_detect_line_endings', true);
1686 1686
 	
1687
-	$wp_post_statuses = get_post_statuses(); // All of the WordPress supported post statuses.
1687
+    $wp_post_statuses = get_post_statuses(); // All of the WordPress supported post statuses.
1688 1688
 
1689 1689
     $task = isset($_POST['task']) ? $_POST['task'] : '';
1690 1690
     $uploadedFile = isset($_POST['gddata']['uploadedFile']) ? $_POST['gddata']['uploadedFile'] : NULL;
@@ -1884,8 +1884,8 @@  discard block
 block discarded – undo
1884 1884
                             $post_longitude = addslashes($buffer[$c]);
1885 1885
                         }
1886 1886
 						
1887
-						// Post status
1888
-						if ($customKeyarray[$c] == 'post_status') {
1887
+                        // Post status
1888
+                        if ($customKeyarray[$c] == 'post_status') {
1889 1889
                             $post_status = sanitize_key( $buffer[$c] );
1890 1890
                         }
1891 1891
                     }
@@ -1902,10 +1902,10 @@  discard block
 block discarded – undo
1902 1902
                         }
1903 1903
                     }
1904 1904
 					
1905
-					// Default post status
1906
-					$default_status = 'publish';
1907
-					$post_status = !empty( $post_status ) ? sanitize_key( $post_status ) : $default_status;
1908
-					$post_status = !empty( $wp_post_statuses ) && !isset( $wp_post_statuses[$post_status] ) ? $default_status : $post_status;
1905
+                    // Default post status
1906
+                    $default_status = 'publish';
1907
+                    $post_status = !empty( $post_status ) ? sanitize_key( $post_status ) : $default_status;
1908
+                    $post_status = !empty( $wp_post_statuses ) && !isset( $wp_post_statuses[$post_status] ) ? $default_status : $post_status;
1909 1909
 
1910 1910
                     $my_post['post_title'] = $post_title;
1911 1911
                     $my_post['post_content'] = $post_desc;
@@ -2128,5 +2128,5 @@  discard block
 block discarded – undo
2128 2128
 add_filter( 'icl_make_duplicate', 'geodir_icl_make_duplicate', 11, 4 );
2129 2129
 
2130 2130
 if (isset($_REQUEST['tab']) && $_REQUEST['tab'] == 'permalink_settings') {
2131
-	add_action('geodir_before_admin_panel', 'geodir_wpml_permalink_setting_notice');
2131
+    add_action('geodir_before_admin_panel', 'geodir_wpml_permalink_setting_notice');
2132 2132
 }
2133 2133
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-admin/admin_install.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * GeoDirectory Installation related functions.
4
- *
5
- * Plugin install script which adds default pages, taxonomies, and database tables.
6
- *
7
- * @since 1.0.0
8
- * @package GeoDirectory
9
- */
3
+     * GeoDirectory Installation related functions.
4
+     *
5
+     * Plugin install script which adds default pages, taxonomies, and database tables.
6
+     *
7
+     * @since 1.0.0
8
+     * @package GeoDirectory
9
+     */
10 10
 
11 11
 /**
12 12
  * Include custom database table related functions.
Please login to merge, or discard this patch.
geodirectory-admin/admin_template_tags.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
                         } ?>">
162 162
                             <form method="post" id="mainform"
163 163
                                   class="geodir_optionform <?php echo $current_tab . ' '; ?><?php if (isset($sub['subtab'])) {
164
-                                      echo $sub['subtab'];
165
-                                  } ?>" action="<?php echo $form_action; ?>" enctype="multipart/form-data">
164
+                                        echo $sub['subtab'];
165
+                                    } ?>" action="<?php echo $form_action; ?>" enctype="multipart/form-data">
166 166
                                 <input type="hidden" class="active_tab" name="active_tab"
167 167
                                        value="<?php if (isset($_REQUEST['active_tab'])) {
168
-                                           echo $_REQUEST['active_tab'];
169
-                                       } ?>"/>
168
+                                            echo $_REQUEST['active_tab'];
169
+                                        } ?>"/>
170 170
                                 <?php wp_nonce_field('geodir-settings', '_wpnonce', true, true); ?>
171 171
                                 <?php wp_nonce_field('geodir-settings-' . $current_tab, '_wpnonce-' . $current_tab, true, true); ?>
172 172
                                 <?php
@@ -427,8 +427,8 @@  discard block
 block discarded – undo
427 427
                                     <input class="require" type="text" size="80" style="width:440px"
428 428
                                            id="<?php echo $prefix;?>city" name="city"
429 429
                                            value="<?php if (isset($location_result->city)) {
430
-                                               echo $location_result->city;
431
-                                           } ?>"/>
430
+                                                echo $location_result->city;
431
+                                            } ?>"/>
432 432
 
433 433
                                     <div
434 434
                                         class="gd-location_message_error"> <?php _e('This field is required.', 'geodirectory'); ?></div>
@@ -443,8 +443,8 @@  discard block
 block discarded – undo
443 443
                                     <input class="require" type="text" size="80" style="width:440px"
444 444
                                            id="<?php echo $prefix;?>region" name="region"
445 445
                                            value="<?php if (isset($location_result->region)) {
446
-                                               echo $location_result->region;
447
-                                           } ?>"/>
446
+                                                echo $location_result->region;
447
+                                            } ?>"/>
448 448
 
449 449
                                     <div
450 450
                                         class="gd-location_message_error"> <?php _e('This field is required.', 'geodirectory'); ?></div>
@@ -497,8 +497,8 @@  discard block
 block discarded – undo
497 497
                                     <input type="text" class="require" size="80" style="width:440px"
498 498
                                            id="<?php echo $prefix;?>latitude" name="latitude"
499 499
                                            value="<?php if (isset($location_result->city_latitude)) {
500
-                                               echo $location_result->city_latitude;
501
-                                           } ?>"/>
500
+                                                echo $location_result->city_latitude;
501
+                                            } ?>"/>
502 502
 
503 503
                                     <div
504 504
                                         class="gd-location_message_error"><?php _e('This field is required.', 'geodirectory'); ?></div>
@@ -514,8 +514,8 @@  discard block
 block discarded – undo
514 514
                                     <input type="text" class="require" size="80" style="width:440px"
515 515
                                            id="<?php echo $prefix;?>longitude" name="longitude"
516 516
                                            value="<?php if (isset($location_result->city_longitude)) {
517
-                                               echo $location_result->city_longitude;
518
-                                           } ?>"/>
517
+                                                echo $location_result->city_longitude;
518
+                                            } ?>"/>
519 519
 
520 520
                                     <div
521 521
                                         class="gd-location_message_error"><?php _e('This field is required.', 'geodirectory'); ?></div>
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
         case 'compatibility_settings' :
559 559
             geodir_theme_compatibility_setting_page();
560 560
             break;		
561
-		case 'import_export' :
561
+        case 'import_export' :
562 562
             geodir_import_export_page();
563 563
             break;
564 564
 
Please login to merge, or discard this patch.
geodirectory-admin/geodir_admin_ajax.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 if (isset($_REQUEST['create_field'])) {
10
-	/**
11
-	 * Includes file to create custom fields.
12
-	 *
13
-	 * @since 1.0.0
14
-	 */
15
-	include_once(geodir_plugin_path() . '/geodirectory-admin/option-pages/create_field.php');
10
+    /**
11
+     * Includes file to create custom fields.
12
+     *
13
+     * @since 1.0.0
14
+     */
15
+    include_once(geodir_plugin_path() . '/geodirectory-admin/option-pages/create_field.php');
16 16
     die;
17 17
 }
18 18
 
Please login to merge, or discard this patch.
geodirectory-admin/option-pages/create_field.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Creates custom fields
4
- *
5
- * @since 1.0.0
6
- * @package GeoDirectory
7
- */
3
+     * Creates custom fields
4
+     *
5
+     * @since 1.0.0
6
+     * @package GeoDirectory
7
+     */
8 8
 $data_type = '';
9 9
 
10 10
 if (isset($_REQUEST['data_type']))
Please login to merge, or discard this patch.
geodirectory-admin/option-pages/permalink_settings_array.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         'radiogroup' => ''
45 45
     ),
46 46
 
47
-	array(
47
+    array(
48 48
         'name' => __('Add country and city slug in listing urls', 'geodirectory'),
49 49
         'desc' => __('Add country and city slug in listing urls (/country/city/)', 'geodirectory'),
50 50
         'id' => 'geodir_show_location_url',
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         'value' => 'country_city',
54 54
         'radiogroup' => ''
55 55
     ),
56
-	array(
56
+    array(
57 57
         'name' => __('Add region and city slug in listing urls', 'geodirectory'),
58 58
         'desc' => __('Add region and city slug in listing urls (/region/city/)', 'geodirectory'),
59 59
         'id' => 'geodir_show_location_url',
Please login to merge, or discard this patch.
geodirectory-functions/ajax_handler_functions.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     global $wpdb, $gd_session;
122 122
 
123 123
     if (isset($_REQUEST['gd_listing_view']) && $_REQUEST['gd_listing_view'] != '') {
124
-		$gd_session->set('gd_listing_view', $_REQUEST['gd_listing_view']);
124
+        $gd_session->set('gd_listing_view', $_REQUEST['gd_listing_view']);
125 125
         echo '1';
126 126
     }
127 127
 
@@ -364,17 +364,17 @@  discard block
 block discarded – undo
364 364
     if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'geodir_get_term_list') {
365 365
         $terms_o = get_terms(sanitize_text_field($_REQUEST['term']));
366 366
 		
367
-		// Skip terms which has no listing
368
-		if (!empty($terms_o)) {
369
-			$filter_terms = array();
367
+        // Skip terms which has no listing
368
+        if (!empty($terms_o)) {
369
+            $filter_terms = array();
370 370
 			
371
-			foreach ($terms_o as $term) {	
372
-				if ($term->count > 0) {
373
-					$filter_terms[] = $term;
374
-				}
375
-			}
376
-			$terms_o = $filter_terms;
377
-		}
371
+            foreach ($terms_o as $term) {	
372
+                if ($term->count > 0) {
373
+                    $filter_terms[] = $term;
374
+                }
375
+            }
376
+            $terms_o = $filter_terms;
377
+        }
378 378
 		
379 379
         $terms = geodir_sort_terms($terms_o, 'count');
380 380
         geodir_helper_cat_list_output($terms, intval($_REQUEST['limit']));
Please login to merge, or discard this patch.
geodirectory-functions/compatibility/Enfold.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Enfold theme compatibility functions.
4
- *
5
- * This file lets the GeoDirectory Plugin use the Enfold theme HTML wrappers to fit and work perfectly.
6
- *
7
- * @since 1.0.0
8
- * @package GeoDirectory
9
- */
3
+     * Enfold theme compatibility functions.
4
+     *
5
+     * This file lets the GeoDirectory Plugin use the Enfold theme HTML wrappers to fit and work perfectly.
6
+     *
7
+     * @since 1.0.0
8
+     * @package GeoDirectory
9
+     */
10 10
 add_action('after_setup_theme', 'enfold_action_calls', 11);
11 11
 /**
12
- * Action calls for enfold theme compatibility.
13
- *
14
- * @since 1.0.0
15
- * @package GeoDirectory
16
- */
12
+     * Action calls for enfold theme compatibility.
13
+     *
14
+     * @since 1.0.0
15
+     * @package GeoDirectory
16
+     */
17 17
 function enfold_action_calls()
18 18
 {
19 19
 
Please login to merge, or discard this patch.