GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
vendor_prefixed
gravitykit
foundation
src
Licenses
WP
WPUpgraderSkin.php
Go to the documentation of this file.
1
<?php
2
/**
3
* @license GPL-2.0-or-later
4
*
5
* Modified by gravityview on 13-January-2023 using Strauss.
6
* @see https://github.com/BrianHenryIE/strauss
7
*/
8
9
namespace
GravityKit\GravityView\Foundation\Licenses\WP
;
10
11
use
WP_Upgrader_Skin
;
12
use
Exception
;
13
14
/**
15
* This is class is used to catch errors and suppress output during product installation/update.
16
*
17
*
18
* @since 1.0.0
19
*
20
* @see WP_Upgrader_Skin
21
*/
22
class
WPUpgraderSkin
extends
WP_Upgrader_Skin
{
23
/**
24
* @inheritDoc Silences header display.
25
*
26
* @since 1.0.0
27
*
28
* @return void
29
*/
30
public
function
header
() {
31
}
32
33
/**
34
* @inheritDoc Silences footer display.
35
*
36
*
37
* @since 1.0.0
38
*
39
* @return void
40
*/
41
public
function
footer
() {
42
}
43
44
/**
45
* @inheritDoc Silences results.
46
*
47
* @since 1.0.0
48
*
49
* @return void
50
*/
51
public
function
feedback
( $feedback, ...
$args
) {
52
}
53
54
/**
55
* Throws an error when one (or multiple) is encountered.
56
*
57
* @since 1.0.0
58
*
59
* @throws Exception
60
*
61
* @return void
62
*/
63
public
function
error
( $errors ) {
64
$output
= $errors;
65
66
if
( is_wp_error( $errors ) && $errors->has_errors() ) {
67
// One error is enough to get a sense of why the installation failed.
68
$output
= $errors->get_error_messages()[0];
69
}
70
71
throw
new
Exception
(
$output
);
72
}
73
}
GravityKit\GravityView\Foundation\Licenses\WP\WPUpgraderSkin\header
header()
Silences header display.
Definition:
WPUpgraderSkin.php:30
Exception
GravityKit\GravityView\Foundation\Licenses\WP\WPUpgraderSkin
This is class is used to catch errors and suppress output during product installation/update.
Definition:
WPUpgraderSkin.php:22
$args
$args
Definition:
search-field-submit.php:15
GravityKit\GravityView\Foundation\Licenses\WP\WPUpgraderSkin\footer
footer()
Silences footer display.
Definition:
WPUpgraderSkin.php:41
GravityKit\GravityView\Foundation\Licenses\WP
GPL-2.0-or-later
Definition:
WPUpgraderSkin.php:9
GravityKit\GravityView\Foundation\Licenses\WP\WPUpgraderSkin\error
error( $errors)
Throws an error when one (or multiple) is encountered.
Definition:
WPUpgraderSkin.php:63
GravityKit\GravityView\Foundation\Licenses\WP\WPUpgraderSkin\feedback
feedback( $feedback,... $args)
Silences results.
Definition:
WPUpgraderSkin.php:51
$output
$output
Definition:
edit_link.php:18
WP_Upgrader_Skin