|
@@ -9,10 +9,10 @@ class WpResource
|
|
|
private $appcontext;
|
|
private $appcontext;
|
|
|
private $options;
|
|
private $options;
|
|
|
|
|
|
|
|
- public function __construct(HestiaApp $appcontext, $data, $destination, $options)
|
|
|
|
|
|
|
+ public function __construct(HestiaApp $appcontext, $data, $destination, $options, $appinfo)
|
|
|
{
|
|
{
|
|
|
$this->appcontext = $appcontext;
|
|
$this->appcontext = $appcontext;
|
|
|
- $this->appcontext->runWp(['core', 'download', '--locale='.$options['language'], '--path='.$destination], $status);
|
|
|
|
|
|
|
+ $this->appcontext->runWp(['core', 'download', '--locale='.$options['language'], '--version='.$appinfo['version'], '--path='.$destination], $status);
|
|
|
|
|
|
|
|
if ($status->code !== 0) {
|
|
if ($status->code !== 0) {
|
|
|
throw new \Exception("Error fetching WP resource: " . $status->text);
|
|
throw new \Exception("Error fetching WP resource: " . $status->text);
|