Test Failed
Push — master ( 5dfdd6...9c263c )
by
unknown
04:17
created
geodirectory.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     /**
35 35
      * Include WordPress core file so we can use core functions to check for active plugins.
36 36
      */
37
-    include_once(ABSPATH . 'wp-admin/includes/plugin.php');
37
+    include_once(ABSPATH.'wp-admin/includes/plugin.php');
38 38
 
39 39
     if (is_plugin_active('geodirectory-genesis-compatibility-pack/geodir_genesis_compatibility.php')) {
40 40
         deactivate_plugins('geodirectory-genesis-compatibility-pack/geodir_genesis_compatibility.php');
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
  * @global string $plugin_file_name Base file name. 'geodirectory/geodirectory.php'.
69 69
  */
70 70
 global $wpdb, $plugin_prefix, $geodir_addon_list, $plugin_file_name;
71
-$plugin_prefix = $wpdb->prefix . 'geodir_';
72
-$plugin_file_name = basename(plugin_dir_path(__FILE__)) . '/' . basename(__FILE__);
71
+$plugin_prefix = $wpdb->prefix.'geodir_';
72
+$plugin_file_name = basename(plugin_dir_path(__FILE__)).'/'.basename(__FILE__);
73 73
 
74 74
 /*
75 75
  * This will store the cached post custom fields per package for each page load so not to run for each listing.
@@ -84,24 +84,24 @@  discard block
 block discarded – undo
84 84
 /**
85 85
  * Define constants
86 86
  */
87
-if(!defined('GEODIRECTORY_PLUGIN_DIR')) define('GEODIRECTORY_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
87
+if (!defined('GEODIRECTORY_PLUGIN_DIR')) define('GEODIRECTORY_PLUGIN_DIR', plugin_dir_path(__FILE__));
88 88
 
89 89
 /*
90 90
  * Declare database table names. All since version 1.0.0
91 91
  */
92 92
 
93 93
 /** Define the database name for the countries table. */
94
-if (!defined('GEODIR_COUNTRIES_TABLE')) define('GEODIR_COUNTRIES_TABLE', $plugin_prefix . 'countries');
94
+if (!defined('GEODIR_COUNTRIES_TABLE')) define('GEODIR_COUNTRIES_TABLE', $plugin_prefix.'countries');
95 95
 /** Define the database name for the custom fields table. */
96
-if (!defined('GEODIR_CUSTOM_FIELDS_TABLE')) define('GEODIR_CUSTOM_FIELDS_TABLE', $plugin_prefix . 'custom_fields');
96
+if (!defined('GEODIR_CUSTOM_FIELDS_TABLE')) define('GEODIR_CUSTOM_FIELDS_TABLE', $plugin_prefix.'custom_fields');
97 97
 /** Define the database name for the icons table. */
98
-if (!defined('GEODIR_ICON_TABLE')) define('GEODIR_ICON_TABLE', $plugin_prefix . 'post_icon');
98
+if (!defined('GEODIR_ICON_TABLE')) define('GEODIR_ICON_TABLE', $plugin_prefix.'post_icon');
99 99
 /** Define the database name for the attachments table. */
100
-if (!defined('GEODIR_ATTACHMENT_TABLE')) define('GEODIR_ATTACHMENT_TABLE', $plugin_prefix . 'attachments');
100
+if (!defined('GEODIR_ATTACHMENT_TABLE')) define('GEODIR_ATTACHMENT_TABLE', $plugin_prefix.'attachments');
101 101
 /** Define the database name for the review table. */
102
-if (!defined('GEODIR_REVIEW_TABLE')) define('GEODIR_REVIEW_TABLE', $plugin_prefix . 'post_review');
102
+if (!defined('GEODIR_REVIEW_TABLE')) define('GEODIR_REVIEW_TABLE', $plugin_prefix.'post_review');
103 103
 /** Define the database name for the custom sort fields table. */
104
-if (!defined('GEODIR_CUSTOM_SORT_FIELDS_TABLE')) define('GEODIR_CUSTOM_SORT_FIELDS_TABLE', $plugin_prefix . 'custom_sort_fields');
104
+if (!defined('GEODIR_CUSTOM_SORT_FIELDS_TABLE')) define('GEODIR_CUSTOM_SORT_FIELDS_TABLE', $plugin_prefix.'custom_sort_fields');
105 105
 
106 106
 /*
107 107
  * Define our Google Analytic app settings
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 if (!defined('GEODIR_GA_CLIENTID')) define('GEODIR_GA_CLIENTID', '687912069872-sdpsjssrdt7t3ao1dnv1ib71hkckbt5s.apps.googleusercontent.com');
110 110
 if (!defined('GEODIR_GA_CLIENTSECRET')) define('GEODIR_GA_CLIENTSECRET', 'yBVkDpqJ1B9nAETHy738Zn8C'); //don't worry - this don't need to be secret in our case
111 111
 if (!defined('GEODIR_GA_REDIRECT')) define('GEODIR_GA_REDIRECT', 'urn:ietf:wg:oauth:2.0:oob');
112
-if (!defined('GEODIR_GA_SCOPE')) define('GEODIR_GA_SCOPE', 'https://www.googleapis.com/auth/analytics');//.readonly
112
+if (!defined('GEODIR_GA_SCOPE')) define('GEODIR_GA_SCOPE', 'https://www.googleapis.com/auth/analytics'); //.readonly
113 113
 
114 114
 
115 115
 /*
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 if (!defined('GEODIRECTORY_TEXTDOMAIN')) define('GEODIRECTORY_TEXTDOMAIN', 'geodirectory');
119 119
 
120 120
 // Load geodirectory plugin textdomain.
121
-add_action( 'init', 'geodir_load_textdomain' );
121
+add_action('init', 'geodir_load_textdomain');
122 122
 
123 123
 /*
124 124
  * A function to log GD errors no matter the type given.
@@ -129,18 +129,18 @@  discard block
 block discarded – undo
129 129
  * @param mixed $log The thing that should be logged.
130 130
  * @package GeoDirectory
131 131
  */
132
-function geodir_error_log($log){
132
+function geodir_error_log($log) {
133 133
     /*
134 134
      * A filter to override the WP_DEBUG setting for function geodir_error_log().
135 135
      *
136 136
      * @since 1.5.7
137 137
      */
138
-    $should_log = apply_filters( 'geodir_log_errors', WP_DEBUG);
139
-    if ( true === $should_log ) {
140
-        if ( is_array( $log ) || is_object( $log ) ) {
141
-            error_log( print_r( $log, true ) );
138
+    $should_log = apply_filters('geodir_log_errors', WP_DEBUG);
139
+    if (true === $should_log) {
140
+        if (is_array($log) || is_object($log)) {
141
+            error_log(print_r($log, true));
142 142
         } else {
143
-            error_log( $log );
143
+            error_log($log);
144 144
         }
145 145
     }
146 146
 }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 /*
180 180
  * Admin init + activation hooks
181 181
  */
182
-if (is_admin() || defined( 'GD_TESTING_MODE' ) || ( defined( 'WP_CLI' ) && WP_CLI )) {
182
+if (is_admin() || defined('GD_TESTING_MODE') || (defined('WP_CLI') && WP_CLI)) {
183 183
 
184 184
     /**
185 185
      * Include functions used in admin area only.
@@ -216,14 +216,14 @@  discard block
 block discarded – undo
216 216
      *
217 217
      * @since 1.0.0
218 218
      */
219
-    require_once(geodir_plugin_path() . '/upgrade.php');
219
+    require_once(geodir_plugin_path().'/upgrade.php');
220 220
     if (get_option('geodir_installed') != 1) {
221 221
         /**
222 222
          * Define language constants, here as they are not loaded yet.
223 223
          *
224 224
          * @since 1.0.0
225 225
          */
226
-        require_once(geodir_plugin_path() . '/language.php');
226
+        require_once(geodir_plugin_path().'/language.php');
227 227
         /**
228 228
          * Include the plugin install file that sets up the databases and any options on first run.
229 229
          *
@@ -240,13 +240,13 @@  discard block
 block discarded – undo
240 240
      * @since 1.5.6
241 241
      */
242 242
     global $pagenow;
243
-   if ( 'plugins.php' === $pagenow )
243
+   if ('plugins.php' === $pagenow)
244 244
     {
245 245
         // Better update message
246
-        $file   = basename( __FILE__ );
247
-        $folder = basename( dirname( __FILE__ ) );
246
+        $file   = basename(__FILE__);
247
+        $folder = basename(dirname(__FILE__));
248 248
         $hook = "in_plugin_update_message-{$folder}/{$file}";
249
-        add_action( $hook, 'geodire_admin_upgrade_notice', 20, 2 );
249
+        add_action($hook, 'geodire_admin_upgrade_notice', 20, 2);
250 250
     }
251 251
 
252 252
 }
Please login to merge, or discard this patch.