Completed
Push — develop ( 25e00b...d3334c )
by Gennady
16:24
created

Plugin::include_legacy_core()   B

Complexity

Conditions 4
Paths 8

Size

Total Lines 55

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 20

Importance

Changes 0
Metric Value
cc 4
nc 8
nop 0
dl 0
loc 55
ccs 0
cts 30
cp 0
crap 20
rs 8.9818
c 0
b 0
f 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 17 and the first side effect is on line 6.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
namespace GV;
3
4
/** If this file is called directly, abort. */
5
if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
6
	die();
7
}
8
9
/**
10
 * The GravityView WordPress plugin class.
11
 *
12
 * Contains functionality related to GravityView being
13
 * a WordPress plugin and doing WordPress pluginy things.
14
 *
15
 * Accessible via gravityview()->plugin
16
 */
17
final class Plugin {
18
	/**
19
	 * @var string The plugin version.
20
	 *
21
	 * @api
22
	 * @since 2.0
23
	 */
24
	public static $version = GV_PLUGIN_VERSION;
25
26
	/**
27
	 * @var string Minimum WordPress version.
28
	 *
29
	 * GravityView requires at least this version of WordPress to function properly.
30
	 */
31
	private static $min_wp_version = GV_MIN_WP_VERSION;
32
33
	/**
34
	 * @var string Minimum Gravity Forms version.
35
	 *
36
	 * GravityView requires at least this version of Gravity Forms to function properly.
37
	 */
38
	public static $min_gf_version = GV_MIN_GF_VERSION;
39
40
	/**
41
	 * @var string Minimum PHP version.
42
	 *
43
	 * GravityView requires at least this version of PHP to function properly.
44
	 */
45
	private static $min_php_version = GV_MIN_PHP_VERSION;
46
47
	/**
48
	 * @var string|bool Minimum future PHP version.
49
	 *
50
	 * GravityView will require this version of PHP soon. False if no future PHP version changes are planned.
51
	 */
52
	private static $future_min_php_version = GV_FUTURE_MIN_PHP_VERSION;
53
54
	/**
55
	 * @var string|bool Minimum future Gravity Forms version.
56
	 *
57
	 * GravityView will require this version of Gravity Forms soon. False if no future Gravity Forms version changes are planned.
58
	 */
59
	private static $future_min_gf_version = GV_FUTURE_MIN_GF_VERSION;
60
61
	/**
62
	 * @var \GV\Plugin The \GV\Plugin static instance.
63
	 */
64
	private static $__instance = null;
65
66
	/**
67
	 * @var \GV\Addon_Settings The plugin "addon" settings.
68
	 *
69
	 * @api
70
	 * @since 2.0
71
	 */
72
	public $settings;
73
74
	/**
75
	 * @var string The GFQuery functionality identifier.
76
	 */
77
	const FEATURE_GFQUERY = 'gfquery';
78
79
	/**
80
	 * @var string The joins functionality identifier.
81
	 */
82
	const FEATURE_JOINS = 'joins';
83
84
	/**
85
	 * @var string The unions functionality identifier.
86
	 */
87
	const FEATURE_UNIONS = 'unions';
88
89
	/**
90
	 * @var string The REST API functionality identifier.
91
	 */
92
	const FEATURE_REST  = 'rest_api';
93
94
	/**
95
	 * Get the global instance of \GV\Plugin.
96
	 *
97
	 * @return \GV\Plugin The global instance of GravityView Plugin.
98
	 */
99
	public static function get() {
100
		if ( ! self::$__instance instanceof self ) {
101
			self::$__instance = new self;
102
		}
103
		return self::$__instance;
104
	}
105
106
107
	private function __construct() {
108
		/**
109
		 * Load translations.
110
		 */
111
		add_action( 'init', array( $this, 'load_textdomain' ) );
112
113
		/**
114
		 * Load some frontend-related legacy files.
115
		 */
116
		add_action( 'gravityview/loaded', array( $this, 'include_legacy_frontend' ) );
117
118
		/**
119
		 * GFAddOn-backed settings, licensing.
120
		 */
121
		add_action( 'plugins_loaded', array( $this, 'load_license_settings' ) );
122
	}
123
124
	public function load_license_settings() {
125
		require_once $this->dir( 'future/includes/class-gv-license-handler.php' );
126
		require_once $this->dir( 'future/includes/class-gv-settings-addon.php' );
127
		if ( class_exists( '\GV\Addon_Settings' ) ) {
128
			$this->settings = new Addon_Settings();
129
			include_once $this->dir( 'includes/class-gravityview-settings.php' );
130
		} else {
131
			gravityview()->log->notice( '\GV\Addon_Settings not loaded. Missing \GFAddOn.' );
132
		}
133
	}
134
	
135 1
	/**
136 1
	 * Check whether GravityView is network activated.
137
	 *
138
	 * @return bool Whether it's network activated or not.
139
	 */
140
	public static function is_network_activated() {
141
		return is_multisite() && ( function_exists( 'is_plugin_active_for_network' ) && is_plugin_active_for_network( 'gravityview/gravityview.php' ) );
142
	}
143
144
	/**
145
	 * Include more legacy stuff.
146
	 *
147
	 * @param boolean $force Whether to force the includes.
148
	 *
149
	 * @return void
150
	 */
151
	public function include_legacy_frontend( $force = false ) {
152
153
		if ( gravityview()->request->is_admin() && ! $force ) {
154
			return;
155
		}
156
157
		include_once $this->dir( 'includes/class-gravityview-image.php' );
158
		include_once $this->dir( 'includes/class-template.php' );
159
		include_once $this->dir( 'includes/class-api.php' );
160
		include_once $this->dir( 'includes/class-frontend-views.php' );
161
		include_once $this->dir( 'includes/class-gravityview-change-entry-creator.php' );
162
163
		/**
164
		 * @action `gravityview_include_frontend_actions` Triggered after all GravityView frontend files are loaded
165
		 *
166
		 * @deprecated Use `gravityview/loaded` along with \GV\Request::is_admin(), etc.
167
		 *
168
		 * Nice place to insert extensions' frontend stuff
169
		 */
170
		do_action( 'gravityview_include_frontend_actions' );
171
	}
172
173
	/**
174
	 * Load more legacy core files.
175
	 *
176
	 * @return void
177
	 */
178
	public function include_legacy_core() {
179
		// Load fields
180
		include_once $this->dir( 'includes/fields/class-gravityview-fields.php' );
181
		include_once $this->dir( 'includes/fields/class-gravityview-field.php' );
182
183
		// Load all field files automatically
184
		foreach ( glob( $this->dir( 'includes/fields/class-gravityview-field*.php' ) ) as $gv_field_filename ) {
185
			include_once $gv_field_filename;
186
		}
187
188
		include_once $this->dir( 'includes/class-gravityview-entry-approval-status.php' );
189
		include_once $this->dir( 'includes/class-gravityview-entry-approval.php' );
190
191
		include_once $this->dir( 'includes/class-gravityview-entry-notes.php' );
192
		include_once $this->dir( 'includes/load-plugin-and-theme-hooks.php' );
193
194
		// Load Extensions
195
		// @todo: Convert to a scan of the directory or a method where this all lives
196
		include_once $this->dir( 'includes/extensions/edit-entry/class-edit-entry.php' );
197
		include_once $this->dir( 'includes/extensions/delete-entry/class-delete-entry.php' );
198
		include_once $this->dir( 'includes/extensions/entry-notes/class-gravityview-field-notes.php' );
199
200
		// Load WordPress Widgets
201
		include_once $this->dir( 'includes/wordpress-widgets/register-wordpress-widgets.php' );
202
203
		// Load GravityView Widgets
204
		include_once $this->dir( 'includes/widgets/register-gravityview-widgets.php' );
205
206
		// Add oEmbed
207
		include_once $this->dir( 'includes/class-api.php' );
208
		include_once $this->dir( 'includes/class-oembed.php' );
209
210
		// Add logging
211
		include_once $this->dir( 'includes/class-gravityview-logging.php' );
212
213
		include_once $this->dir( 'includes/class-ajax.php' );
214
		include_once $this->dir( 'includes/class-gravityview-html-elements.php' );
215
		include_once $this->dir( 'includes/class-frontend-views.php' );
216
		include_once $this->dir( 'includes/class-gravityview-admin-bar.php' );
217
		include_once $this->dir( 'includes/class-gravityview-entry-list.php' );
218
		include_once $this->dir( 'includes/class-gravityview-merge-tags.php'); /** @since 1.8.4 */
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces before closing bracket; 0 found
Loading history...
219
		include_once $this->dir( 'includes/class-data.php' );
220
		include_once $this->dir( 'includes/class-gravityview-shortcode.php' );
221
		include_once $this->dir( 'includes/class-gravityview-entry-link-shortcode.php' );
222
		include_once $this->dir( 'includes/class-gvlogic-shortcode.php' );
223
		include_once $this->dir( 'includes/presets/register-default-templates.php' );
224
225
		if ( class_exists( '\GFFormsModel' ) ) {
226
			include_once $this->dir( 'includes/class-gravityview-gfformsmodel.php' );
227
		}
228
229
		if ( ! class_exists( '\GravityView_Extension' ) ) {
230
			include_once $this->dir( 'includes/class-gravityview-extension.php' );
231
		}
232
	}
233
234
	/**
235
	 * Load the translations.
236
	 *
237
	 * @return void
238
	 */
239
	public function load_textdomain() {
240
		$loaded = load_plugin_textdomain( 'gravityview', false, $this->dir( 'languages' ) );
241
		
242
		if ( ! $loaded ) {
243
			$loaded = load_muplugin_textdomain( 'gravityview', '/languages/' );
244
		}
245
		if ( ! $loaded ) {
246
			$loaded = load_theme_textdomain( 'gravityview', '/languages/' );
247
		}
248
		if ( ! $loaded ) {
249
250
			$locale = get_locale();
251
252
			if ( function_exists('get_user_locale') && is_admin() ) {
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after opening bracket; 0 found
Loading history...
Coding Style introduced by
Expected 1 spaces before closing bracket; 0 found
Loading history...
253
				$locale = get_user_locale();
254
			}
255
256
			$locale = apply_filters( 'plugin_locale', $locale, 'gravityview' );
257
			$mofile = $this->dir( 'languages' ) . '/gravityview-'. $locale .'.mo';
258
			load_textdomain( 'gravityview', $mofile );
259
		}
260
	}
261
262
	/**
263
	 * Register hooks that are fired when the plugin is activated and deactivated.
264
	 *
265
	 * @return void
266
	 */
267
	public function register_activation_hooks() {
268
		register_activation_hook( $this->dir( 'gravityview.php' ), array( $this, 'activate' ) );
269
		register_deactivation_hook( $this->dir( 'gravityview.php' ), array( $this, 'deactivate' ) );
270
	}
271
272
	/**
273 1
	 * Plugin activation function.
274 1
	 *
275
	 * @internal
276
	 * @return void
277 1
	 */
278 1
	public function activate() {
279
		gravityview();
280
281 1
		/** Register the gravityview post type upon WordPress core init. */
282 1
		require_once $this->dir( 'future/includes/class-gv-view.php' );
283
		View::register_post_type();
284
285 1
		/** Add the entry rewrite endpoint. */
286
		require_once $this->dir( 'future/includes/class-gv-entry.php' );
287 1
		Entry::add_rewrite_endpoint();
288
289
		/** Flush all URL rewrites. */
290 1
		flush_rewrite_rules();
291
292
		update_option( 'gv_version', self::$version );
293 1
294
		/** Add the transient to redirect to configuration page. */
295 1
		set_transient( '_gv_activation_redirect', true, 60 );
296 1
297
		/** Clear settings transient. */
298
		delete_transient( 'gravityview_edd-activate_valid' );
299
300
		\GravityView_Roles_Capabilities::get_instance()->add_caps();
301
	}
302
303
	/**
304
	 * Plugin deactivation function.
305
	 *
306
	 * @internal
307
	 * @return void
308
	 */
309
	public function deactivate() {
310
		flush_rewrite_rules();
311
	}
312
313
	/**
314
	 * Retrieve an absolute path within the Gravity Forms plugin directory.
315
	 *
316
	 * @api
317 76
	 * @since 2.0
318 76
	 *
319
	 * @param string $path Optional. Append this extra path component.
320
	 * @return string The absolute path to the plugin directory.
321
	 */
322
	public function dir( $path = '' ) {
323
		return GRAVITYVIEW_DIR . ltrim( $path, '/' );
324
	}
325
326
	/**
327
	 * Retrieve a URL within the Gravity Forms plugin directory.
328
	 *
329
	 * @api
330 1
	 * @since 2.0
331 1
	 *
332
	 * @param string $path Optional. Extra path appended to the URL.
333
	 * @return string The URL to this plugin, with trailing slash.
334
	 */
335
	public function url( $path = '/' ) {
336
		return plugins_url( $path, $this->dir( 'gravityview.php' ) );
337
	}
338
339
	/**
340
	 * Is everything compatible with this version of GravityView?
341
	 *
342 2
	 * @api
343
	 * @since 2.0
344 2
	 *
345 2
	 * @return bool
346 2
	 */
347
	public function is_compatible() {
348
		return
349
			$this->is_compatible_php()
350
			&& $this->is_compatible_wordpress()
351
			&& $this->is_compatible_gravityforms();
352
	}
353
354
	/**
355
	 * Is this version of GravityView compatible with the current version of PHP?
356
	 *
357 2
	 * @api
358 2
	 * @since 2.0
359
	 *
360
	 * @return bool true if compatible, false otherwise.
361
	 */
362
	public function is_compatible_php() {
363
		return version_compare( $this->get_php_version(), self::$min_php_version, '>=' );
364
	}
365
366
	/**
367
	 * Is this version of GravityView compatible with the future required version of PHP?
368
	 *
369
	 * @api
370
	 * @since 2.0
371
	 *
372
	 * @return bool true if compatible, false otherwise.
373
	 */
374
	public function is_compatible_future_php() {
375
		return version_compare( $this->get_php_version(), self::$future_min_php_version, '>=' );
376
	}
377
378
	/**
379
	 * Is this version of GravityView compatible with the current version of WordPress?
380
	 *
381
	 * @api
382
	 * @since 2.0
383 2
	 *
384
	 * @param string $version Version to check against; otherwise uses GV_MIN_WP_VERSION
385 2
	 *
386 2
	 * @return bool true if compatible, false otherwise.
387
	 */
388
	public function is_compatible_wordpress( $version = null ) {
389 2
390
		if( ! $version ) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $version of type string|null is loosely compared to false; this is ambiguous if the string can be empty. You might want to explicitly use === null instead.

In PHP, under loose comparison (like ==, or !=, or switch conditions), values of different types might be equal.

For string values, the empty string '' is a special case, in particular the following results might be unexpected:

''   == false // true
''   == null  // true
'ab' == false // false
'ab' == null  // false

// It is often better to use strict comparison
'' === false // false
'' === null  // false
Loading history...
391
			$version = self::$min_wp_version;
392
		}
393
394
		return version_compare( $this->get_wordpress_version(), $version, '>=' );
395
	}
396
397
	/**
398
	 * Is this version of GravityView compatible with the current version of Gravity Forms?
399
	 *
400 2
	 * @api
401 2
	 * @since 2.0
402 2
	 *
403
	 * @return bool true if compatible, false otherwise (or not active/installed).
404
	 */
405
	public function is_compatible_gravityforms() {
406
		$version = $this->get_gravityforms_version();
407
		return $version ? version_compare( $version, self::$min_gf_version, '>=' ) : false;
408
	}
409
410
	/**
411
	 * Is this version of GravityView compatible with the future version of Gravity Forms?
412
	 *
413
	 * @api
414
	 * @since 2.0
415
	 *
416
	 * @return bool true if compatible, false otherwise (or not active/installed).
417
	 */
418
	public function is_compatible_future_gravityforms() {
419
		$version = $this->get_gravityforms_version();
420
		return $version ? version_compare( $version, self::$future_min_gf_version, '>=' ) : false;
421
	}
422
423
	/**
424
	 * Retrieve the current PHP version.
425 1
	 *
426 1
	 * Overridable with GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE during testing.
427 1
	 *
428
	 * @return string The version of PHP.
429
	 */
430
	private function get_php_version() {
431
		return ! empty( $GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] ) ?
432
			$GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] : phpversion();
433
	}
434
435
	/**
436
	 * Retrieve the current WordPress version.
437 1
	 *
438 1
	 * Overridable with GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE during testing.
439 1
	 *
440
	 * @return string The version of WordPress.
441
	 */
442
	private function get_wordpress_version() {
443
		return ! empty( $GLOBALS['GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE'] ) ?
444
			$GLOBALS['GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE'] : $GLOBALS['wp_version'];
445
	}
446
447
	/**
448
	 * Retrieve the current Gravity Forms version.
449 1
	 *
450 1
	 * Overridable with GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE during testing.
451
	 *
452
	 * @return string|null The version of Gravity Forms or null if inactive.
453
	 */
454
	private function get_gravityforms_version() {
455 1
		if ( ! class_exists( '\GFCommon' ) || ! empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_INACTIVE_OVERRIDE'] ) ) {
456 1
			gravityview()->log->error( 'Gravity Forms is inactive or not installed.' );
457
			return null;
458
		}
459
460
		return ! empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] ) ?
461
			$GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] : \GFCommon::$version;
462
	}
463
464
	/**
465
	 * Feature support detection.
466 125
	 *
467 125
	 * @param string $feature Feature name. Check FEATURE_* class constants.
468
	 *
469
	 * @return boolean
470
	 */
471
	public function supports( $feature ) {
472 125
		if ( ! is_null( $supports = apply_filters( "gravityview/plugin/feature/$feature", null ) ) ) {
473 125
			return $supports;
474 110
		}
475 125
476 125
		switch ( $feature ):
477
				case self::FEATURE_GFQUERY:
478
				case self::FEATURE_JOINS:
479
				case self::FEATURE_UNIONS:
480
					return apply_filters( 'gravityview/query/class', false ) === '\GF_Patched_Query';
481
				case self::FEATURE_REST:
482
					return class_exists( '\WP_REST_Controller' );
483
			default:
484
				return false;
485
		endswitch;
486
	}
487
488
	/**
489
	 * Delete GravityView Views, settings, roles, caps, etc.
490
	 *
491
	 * @return void
492
	 */
493
	public function uninstall() {
494
		global $wpdb;
0 ignored issues
show
Compatibility Best Practice introduced by
Use of global functionality is not recommended; it makes your code harder to test, and less reusable.

Instead of relying on global state, we recommend one of these alternatives:

1. Pass all data via parameters

function myFunction($a, $b) {
    // Do something
}

2. Create a class that maintains your state

class MyClass {
    private $a;
    private $b;

    public function __construct($a, $b) {
        $this->a = $a;
        $this->b = $b;
    }

    public function myFunction() {
        // Do something
    }
}
Loading history...
495
496
		$suppress = $wpdb->suppress_errors();
497
498
		/**
499
		 * Posts.
500
		 */
501
		$items = get_posts( array(
502
			'post_type' => 'gravityview',
503
			'post_status' => 'any',
504
			'numberposts' => -1,
0 ignored issues
show
introduced by
Disabling pagination is prohibited in VIP context, do not set numberposts to -1 ever.
Loading history...
505
			'fields' => 'ids'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
506
		) );
507
508
		foreach ( $items as $item ) {
509
			wp_delete_post( $item, true );
510
		}
511
512
		/**
513
		 * Meta.
514
		 */
515
		$tables = array();
516
517
		if ( version_compare( \GravityView_GFFormsModel::get_database_version(), '2.3-dev-1', '>=' ) ) {
518
			$tables []= \GFFormsModel::get_entry_meta_table_name();
0 ignored issues
show
introduced by
Expected 1 space before "="; 0 found
Loading history...
519
		}
520
		$tables []= \GFFormsModel::get_lead_meta_table_name();
0 ignored issues
show
introduced by
Expected 1 space before "="; 0 found
Loading history...
521
522
		foreach ( $tables as $meta_table ) {
523
			$sql = "
524
				DELETE FROM $meta_table
525
				WHERE (
526
					`meta_key` = 'is_approved'
527
				);
528
			";
529
			$wpdb->query( $sql );
0 ignored issues
show
introduced by
Usage of a direct database call is discouraged.
Loading history...
introduced by
Usage of a direct database call without caching is prohibited. Use wp_cache_get / wp_cache_set.
Loading history...
530
		}
531
532
		/**
533
		 * Notes.
534
		 */
535
		$tables = array();
536
537
		if ( version_compare( \GravityView_GFFormsModel::get_database_version(), '2.3-dev-1', '>=' ) && method_exists( 'GFFormsModel', 'get_entry_notes_table_name' ) ) {
538
			$tables[] = \GFFormsModel::get_entry_notes_table_name();
539
		}
540
541
		$tables[] = \GFFormsModel::get_lead_notes_table_name();
542
543
		$disapproved = __('Disapproved the Entry for GravityView', 'gravityview');
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after opening bracket; 0 found
Loading history...
Coding Style introduced by
Expected 1 spaces before closing bracket; 0 found
Loading history...
544
		$approved = __('Approved the Entry for GravityView', 'gravityview');
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after opening bracket; 0 found
Loading history...
Coding Style introduced by
Expected 1 spaces before closing bracket; 0 found
Loading history...
545
546
		$suppress = $wpdb->suppress_errors();
547
		foreach ( $tables as $notes_table ) {
548
			$sql = $wpdb->prepare( "
549
				DELETE FROM $notes_table
550
				WHERE (
551
					`note_type` = 'gravityview' OR
552
					`value` = %s OR
553
					`value` = %s
554
				);
555
			", $approved, $disapproved );
556
			$wpdb->query( $sql );
0 ignored issues
show
introduced by
Usage of a direct database call is discouraged.
Loading history...
introduced by
Usage of a direct database call without caching is prohibited. Use wp_cache_get / wp_cache_set.
Loading history...
557
		}
558
559
		$wpdb->suppress_errors( $suppress );
560
561
		/**
562
		 * Capabilities.
563
		 */
564
		\GravityView_Roles_Capabilities::get_instance()->remove_caps();
565
566
		/**
567
		 * Options.
568
		 */
569
		delete_option( 'gravityview_cache_blacklist' );
570
		delete_option( 'gv_version_upgraded_from' );
571
		delete_transient( 'gravityview_edd-activate_valid' );
572
		delete_transient( 'gravityview_edd-deactivate_valid' );
573
		delete_transient( 'gravityview_dismissed_notices' );
574
		delete_site_transient( 'gravityview_related_plugins' );
575
	}
576
577
	private function __clone() { }
578
579
	private function __wakeup() { }
580
}
581