1
1
<?php
2
2
/**
3
3
* Plausible Analytics | Upgrades
4
+ *
4
5
* @since 1.3.0
5
6
* @package WordPress
6
7
* @subpackage Plausible Analytics
15
16
16
17
/**
17
18
* Class Upgrades
19
+ *
18
20
* @since 1.3.0
19
21
*/
20
22
class Upgrades {
21
23
/**
22
24
* Constructor for Upgrades.
25
+ *
23
26
* @since 1.3.0
24
27
* @access public
25
28
* @return void
@@ -31,9 +34,12 @@ public function __construct() {
31
34
/**
32
35
* Register routines for upgrades.
33
36
* This is intended for automatic upgrade routines having less resource intensive tasks.
37
+ *
34
38
* @since 1.3.0
35
39
* @access public
36
40
* @return void
41
+ *
42
+ * @codeCoverageIgnore
37
43
*/
38
44
public function run () {
39
45
$ plausible_analytics_version = get_option ( 'plausible_analytics_version ' );
@@ -73,9 +79,11 @@ public function run() {
73
79
/**
74
80
* Upgrade routine for 1.2.5
75
81
* Cleans Custom Domain related options from database, as it was removed in this version.
82
+ *
76
83
* @since 1.2.5
77
84
* @access public
78
85
* @return void
86
+ * @codeCoverageIgnore
79
87
*/
80
88
public function upgrade_to_125 () {
81
89
$ old_settings = Helpers::get_settings ();
@@ -107,8 +115,10 @@ public function upgrade_to_125() {
107
115
108
116
/**
109
117
* Get rid of the previous "example.com" default for self_hosted_domain.
118
+ *
110
119
* @since 1.2.6
111
120
* @return void
121
+ * @codeCoverageIgnore
112
122
*/
113
123
public function upgrade_to_126 () {
114
124
$ old_settings = Helpers::get_settings ();
@@ -126,7 +136,9 @@ public function upgrade_to_126() {
126
136
/**
127
137
* Upgrade to 1.3.1
128
138
* - Enables 404 pages tracking by default.
139
+ *
129
140
* @return void
141
+ * @codeCoverageIgnore
130
142
*/
131
143
public function upgrade_to_131 () {
132
144
$ settings = Helpers::get_settings ();
@@ -143,8 +155,10 @@ public function upgrade_to_131() {
143
155
/**
144
156
* Upgrade to 1.3.2
145
157
* - Updates the Proxy Resource, Cache URL to be protocol relative.
158
+ *
146
159
* @return void
147
160
* @throws Exception
161
+ * @codeCoverageIgnore
148
162
*/
149
163
private function upgrade_to_132 () {
150
164
$ proxy_resources = Helpers::get_proxy_resources ();
@@ -158,7 +172,9 @@ private function upgrade_to_132() {
158
172
159
173
/**
160
174
* Cleans the settings of the old, unneeded sub-arrays for settings.
175
+ *
161
176
* @return void
177
+ * @codeCoverageIgnore
162
178
*/
163
179
private function upgrade_to_200 () {
164
180
$ settings = Helpers::get_settings ();
@@ -217,7 +233,9 @@ private function upgrade_to_200() {
217
233
218
234
/**
219
235
* Makes sure the View Stats option is enabled for users that previously set a shared link.
236
+ *
220
237
* @return void
238
+ * @codeCoverageIgnore
221
239
*/
222
240
private function upgrade_to_203 () {
223
241
$ settings = Helpers::get_settings ();
0 commit comments