@@ -31,30 +31,30 @@ discard block |
||
31 | 31 | * CHECK FOR OLD COMPATIBILITY PACKS AND DISABLE IF THEY ARE ACTIVE |
32 | 32 | */ |
33 | 33 | if (is_admin()) { |
34 | - /** |
|
35 | - * Include WordPress core file so we can use core functions to check for active plugins. |
|
36 | - */ |
|
37 | - include_once(ABSPATH . 'wp-admin/includes/plugin.php'); |
|
34 | + /** |
|
35 | + * Include WordPress core file so we can use core functions to check for active plugins. |
|
36 | + */ |
|
37 | + include_once(ABSPATH . 'wp-admin/includes/plugin.php'); |
|
38 | 38 | |
39 | - if (is_plugin_active('geodirectory-genesis-compatibility-pack/geodir_genesis_compatibility.php')) { |
|
40 | - deactivate_plugins('geodirectory-genesis-compatibility-pack/geodir_genesis_compatibility.php'); |
|
41 | - } |
|
39 | + if (is_plugin_active('geodirectory-genesis-compatibility-pack/geodir_genesis_compatibility.php')) { |
|
40 | + deactivate_plugins('geodirectory-genesis-compatibility-pack/geodir_genesis_compatibility.php'); |
|
41 | + } |
|
42 | 42 | |
43 | - if (is_plugin_active('geodirectory-x-theme-compatibility-pack/geodir_x_compatibility.php')) { |
|
44 | - deactivate_plugins('geodirectory-x-theme-compatibility-pack/geodir_x_compatibility.php'); |
|
45 | - } |
|
43 | + if (is_plugin_active('geodirectory-x-theme-compatibility-pack/geodir_x_compatibility.php')) { |
|
44 | + deactivate_plugins('geodirectory-x-theme-compatibility-pack/geodir_x_compatibility.php'); |
|
45 | + } |
|
46 | 46 | |
47 | - if (is_plugin_active('geodirectory-enfold-theme-compatibility-pack/geodir_enfold_compatibility.php')) { |
|
48 | - deactivate_plugins('geodirectory-enfold-theme-compatibility-pack/geodir_enfold_compatibility.php'); |
|
49 | - } |
|
47 | + if (is_plugin_active('geodirectory-enfold-theme-compatibility-pack/geodir_enfold_compatibility.php')) { |
|
48 | + deactivate_plugins('geodirectory-enfold-theme-compatibility-pack/geodir_enfold_compatibility.php'); |
|
49 | + } |
|
50 | 50 | |
51 | - if (is_plugin_active('geodir_avada_compatibility/geodir_avada_compatibility.php')) { |
|
52 | - deactivate_plugins('geodir_avada_compatibility/geodir_avada_compatibility.php'); |
|
53 | - } |
|
51 | + if (is_plugin_active('geodir_avada_compatibility/geodir_avada_compatibility.php')) { |
|
52 | + deactivate_plugins('geodir_avada_compatibility/geodir_avada_compatibility.php'); |
|
53 | + } |
|
54 | 54 | |
55 | - if (is_plugin_active('geodir_compat_pack_divi/geodir_divi_compatibility.php')) { |
|
56 | - deactivate_plugins('geodir_compat_pack_divi/geodir_divi_compatibility.php'); |
|
57 | - } |
|
55 | + if (is_plugin_active('geodir_compat_pack_divi/geodir_divi_compatibility.php')) { |
|
56 | + deactivate_plugins('geodir_compat_pack_divi/geodir_divi_compatibility.php'); |
|
57 | + } |
|
58 | 58 | |
59 | 59 | } |
60 | 60 | |
@@ -130,19 +130,19 @@ discard block |
||
130 | 130 | * @package GeoDirectory |
131 | 131 | */ |
132 | 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 ) ); |
|
142 | - } else { |
|
143 | - error_log( $log ); |
|
144 | - } |
|
145 | - } |
|
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 | + } else { |
|
143 | + error_log( $log ); |
|
144 | + } |
|
145 | + } |
|
146 | 146 | } |
147 | 147 | /** |
148 | 148 | * Include all plugin functions. |
@@ -181,72 +181,72 @@ discard block |
||
181 | 181 | */ |
182 | 182 | if (is_admin() || defined( 'GD_TESTING_MODE' ) || ( defined( 'WP_CLI' ) && WP_CLI )) { |
183 | 183 | |
184 | - /** |
|
185 | - * Include functions used in admin area only. |
|
186 | - * |
|
187 | - * @since 1.0.0 |
|
188 | - */ |
|
189 | - require_once('geodirectory-admin/admin_functions.php'); |
|
190 | - /** |
|
191 | - * Most actions/hooks used in admin area only are called from here. |
|
192 | - * |
|
193 | - * @since 1.6.11 |
|
194 | - */ |
|
195 | - require_once('geodirectory-admin/admin_dummy_data_functions.php'); |
|
196 | - /** |
|
197 | - * Most actions/hooks used in admin area only are called from here. |
|
198 | - * |
|
199 | - * @since 1.0.0 |
|
200 | - */ |
|
201 | - require_once('geodirectory-admin/admin_hooks_actions.php'); |
|
202 | - /** |
|
203 | - * Most admin JS and CSS is called from here. |
|
204 | - * |
|
205 | - * @since 1.0.0 |
|
206 | - */ |
|
207 | - require_once('geodirectory-admin/admin_template_tags.php'); |
|
208 | - /** |
|
209 | - * Include Google Analytics Class. |
|
210 | - * |
|
211 | - * @since 1.6.11 |
|
212 | - */ |
|
213 | - require_once('geodirectory-admin/class.analytics.stats.php'); |
|
214 | - /** |
|
215 | - * Include any functions needed for upgrades. |
|
216 | - * |
|
217 | - * @since 1.0.0 |
|
218 | - */ |
|
219 | - require_once(geodir_plugin_path() . '/upgrade.php'); |
|
220 | - if (get_option('geodir_installed') != 1) { |
|
221 | - /** |
|
222 | - * Define language constants, here as they are not loaded yet. |
|
223 | - * |
|
224 | - * @since 1.0.0 |
|
225 | - */ |
|
226 | - require_once(geodir_plugin_path() . '/language.php'); |
|
227 | - /** |
|
228 | - * Include the plugin install file that sets up the databases and any options on first run. |
|
229 | - * |
|
230 | - * @since 1.0.0 |
|
231 | - */ |
|
232 | - require_once('geodirectory-admin/admin_install.php'); |
|
233 | - register_activation_hook(__FILE__, 'geodir_activation'); |
|
234 | - } |
|
235 | - register_deactivation_hook(__FILE__, 'geodir_deactivation'); |
|
236 | - |
|
237 | - /* |
|
184 | + /** |
|
185 | + * Include functions used in admin area only. |
|
186 | + * |
|
187 | + * @since 1.0.0 |
|
188 | + */ |
|
189 | + require_once('geodirectory-admin/admin_functions.php'); |
|
190 | + /** |
|
191 | + * Most actions/hooks used in admin area only are called from here. |
|
192 | + * |
|
193 | + * @since 1.6.11 |
|
194 | + */ |
|
195 | + require_once('geodirectory-admin/admin_dummy_data_functions.php'); |
|
196 | + /** |
|
197 | + * Most actions/hooks used in admin area only are called from here. |
|
198 | + * |
|
199 | + * @since 1.0.0 |
|
200 | + */ |
|
201 | + require_once('geodirectory-admin/admin_hooks_actions.php'); |
|
202 | + /** |
|
203 | + * Most admin JS and CSS is called from here. |
|
204 | + * |
|
205 | + * @since 1.0.0 |
|
206 | + */ |
|
207 | + require_once('geodirectory-admin/admin_template_tags.php'); |
|
208 | + /** |
|
209 | + * Include Google Analytics Class. |
|
210 | + * |
|
211 | + * @since 1.6.11 |
|
212 | + */ |
|
213 | + require_once('geodirectory-admin/class.analytics.stats.php'); |
|
214 | + /** |
|
215 | + * Include any functions needed for upgrades. |
|
216 | + * |
|
217 | + * @since 1.0.0 |
|
218 | + */ |
|
219 | + require_once(geodir_plugin_path() . '/upgrade.php'); |
|
220 | + if (get_option('geodir_installed') != 1) { |
|
221 | + /** |
|
222 | + * Define language constants, here as they are not loaded yet. |
|
223 | + * |
|
224 | + * @since 1.0.0 |
|
225 | + */ |
|
226 | + require_once(geodir_plugin_path() . '/language.php'); |
|
227 | + /** |
|
228 | + * Include the plugin install file that sets up the databases and any options on first run. |
|
229 | + * |
|
230 | + * @since 1.0.0 |
|
231 | + */ |
|
232 | + require_once('geodirectory-admin/admin_install.php'); |
|
233 | + register_activation_hook(__FILE__, 'geodir_activation'); |
|
234 | + } |
|
235 | + register_deactivation_hook(__FILE__, 'geodir_deactivation'); |
|
236 | + |
|
237 | + /* |
|
238 | 238 | * Show a upgrade warning message if applicable. |
239 | 239 | * |
240 | 240 | * @since 1.5.6 |
241 | 241 | */ |
242 | - global $pagenow; |
|
242 | + global $pagenow; |
|
243 | 243 | if ( 'plugins.php' === $pagenow ) |
244 | - { |
|
245 | - // Better update message |
|
246 | - $file = basename( __FILE__ ); |
|
247 | - $folder = basename( dirname( __FILE__ ) ); |
|
248 | - $hook = "in_plugin_update_message-{$folder}/{$file}"; |
|
249 | - add_action( $hook, 'geodire_admin_upgrade_notice', 20, 2 ); |
|
250 | - } |
|
244 | + { |
|
245 | + // Better update message |
|
246 | + $file = basename( __FILE__ ); |
|
247 | + $folder = basename( dirname( __FILE__ ) ); |
|
248 | + $hook = "in_plugin_update_message-{$folder}/{$file}"; |
|
249 | + add_action( $hook, 'geodire_admin_upgrade_notice', 20, 2 ); |
|
250 | + } |
|
251 | 251 | |
252 | 252 | } |