Skip to content

Commit 9f618a6

Browse files
authored
Merge pull request hestiacp#2766 from jaapmarcus/feature/allow-wp-version
WP Allow version selection via version
2 parents 9cb2ec1 + 66d27f0 commit 9f618a6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

web/src/app/WebApp/Installers/BaseSetup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function retrieveResources($options)
9494
if ($res_type === 'composer') {
9595
new ComposerResource($this->appcontext, $res_data, $resource_destination);
9696
} elseif ($res_type === 'wp') {
97-
new WpResource($this->appcontext, $res_data, $resource_destination, $options);
97+
new WpResource($this->appcontext, $res_data, $resource_destination, $options, $this -> info());
9898
} else {
9999
$this->appcontext->archiveExtract($res_data['src'], $resource_destination, 1);
100100
}

web/src/app/WebApp/Installers/Resources/WpResource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ class WpResource
99
private $appcontext;
1010
private $options;
1111

12-
public function __construct(HestiaApp $appcontext, $data, $destination, $options)
12+
public function __construct(HestiaApp $appcontext, $data, $destination, $options, $appinfo)
1313
{
1414
$this->appcontext = $appcontext;
15-
$this->appcontext->runWp(['core', 'download', '--locale='.$options['language'], '--path='.$destination], $status);
15+
$this->appcontext->runWp(['core', 'download', '--locale='.$options['language'], '--version='.$appinfo['version'], '--path='.$destination], $status);
1616

1717
if ($status->code !== 0) {
1818
throw new \Exception("Error fetching WP resource: " . $status->text);

0 commit comments

Comments
 (0)