Upgrade to 4.1.0
This commit is contained in:
@@ -655,7 +655,7 @@ class App
|
||||
* specified by the path
|
||||
*
|
||||
* Example:
|
||||
* <?= App::image('some/page/myimage.jpg') ?>
|
||||
* <?= $kirby->image('some/page/myimage.jpg') ?>
|
||||
*
|
||||
* @todo merge with App::file()
|
||||
*/
|
||||
@@ -831,9 +831,9 @@ class App
|
||||
}
|
||||
}
|
||||
|
||||
$data['kirby'] = $data['kirby'] ?? $this;
|
||||
$data['site'] = $data['site'] ?? $data['kirby']->site();
|
||||
$data['parent'] = $data['parent'] ?? $data['site']->page();
|
||||
$data['kirby'] ??= $this;
|
||||
$data['site'] ??= $data['kirby']->site();
|
||||
$data['parent'] ??= $data['site']->page();
|
||||
|
||||
return (new KirbyTag($type, $value, $attr, $data, $this->options))->render();
|
||||
}
|
||||
@@ -1464,9 +1464,7 @@ class App
|
||||
protected function setRoles(array $roles = null): static
|
||||
{
|
||||
if ($roles !== null) {
|
||||
$this->roles = Roles::factory($roles, [
|
||||
'kirby' => $this
|
||||
]);
|
||||
$this->roles = Roles::factory($roles);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -1480,9 +1478,7 @@ class App
|
||||
protected function setSite(Site|array $site = null): static
|
||||
{
|
||||
if (is_array($site) === true) {
|
||||
$site = new Site($site + [
|
||||
'kirby' => $this
|
||||
]);
|
||||
$site = new Site($site);
|
||||
}
|
||||
|
||||
$this->site = $site;
|
||||
@@ -1497,7 +1493,6 @@ class App
|
||||
return $this->site ??= new Site([
|
||||
'errorPageId' => $this->options['error'] ?? 'error',
|
||||
'homePageId' => $this->options['home'] ?? 'home',
|
||||
'kirby' => $this,
|
||||
'url' => $this->url('index'),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user