File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 9
9
* Class for providing theme related services.
10
10
*/
11
11
class ThemeService {
12
- private static $ retries = 0 ;
12
+ /**
13
+ * Number of retry attempts made.
14
+ *
15
+ * @var int
16
+ */
17
+ private static $ retries = 0 ;
18
+
19
+ /**
20
+ * Maximum number of retries allowed.
21
+ *
22
+ * @var int
23
+ */
13
24
private static $ max_retries = 3 ;
14
25
15
26
/**
@@ -33,7 +44,7 @@ private static function retry(): bool {
33
44
*/
34
45
public static function initialize (): bool {
35
46
// Get the default sitegen theme to be installed.
36
- $ init_themes = Themes::get_init ( skip_plan_check: true );
47
+ $ init_themes = Themes::get_init ( true );
37
48
$ sitegen_theme = $ init_themes ['sitegen ' ]['default ' ][0 ];
38
49
39
50
// If the sitegen theme is NOT installed or activated...
@@ -51,9 +62,9 @@ public static function initialize(): bool {
51
62
52
63
// Install and activate the sitegen theme.
53
64
$ installer_response = ThemeInstaller::install_from_zip (
54
- url: $ sitegen_theme_installer_data ['url ' ],
55
- activate: true ,
56
- stylesheet: $ sitegen_theme_installer_data ['stylesheet ' ]
65
+ $ sitegen_theme_installer_data ['url ' ],
66
+ true ,
67
+ $ sitegen_theme_installer_data ['stylesheet ' ]
57
68
);
58
69
59
70
// If the installation fails, retry.
You can’t perform that action at this time.
0 commit comments