mirror of
https://github.com/getgrav/grav.git
synced 2026-07-06 10:59:18 +02:00
Merge branch 'develop' of https://github.com/getgrav/grav into feature/objects
This commit is contained in:
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,10 +1,18 @@
|
||||
# v1.2.3
|
||||
# v1.2.4
|
||||
## 04/xx/2017
|
||||
|
||||
1. [](#bugfix)
|
||||
* Allow multiple calls to `Themes::initTheme()` without throwing errors
|
||||
|
||||
# v1.2.3
|
||||
## 04/19/2017
|
||||
|
||||
1. [](#improved)
|
||||
* Added new `pwd_regex` and `username_regex` system configuration options to allow format modifications
|
||||
* Allow `user/accounts.yaml` overrides and implemented more robust theme initialization
|
||||
|
||||
* improved `getList()` method to do more powerful things
|
||||
* Fix Typo in GPM [#1427](https://github.com/getgrav/grav/issues/1427)
|
||||
|
||||
# v1.2.2
|
||||
## 04/11/2017
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
// Some standard defines
|
||||
define('GRAV', true);
|
||||
define('GRAV_VERSION', '1.2.2');
|
||||
define('GRAV_VERSION', '1.2.3');
|
||||
define('GRAV_TESTING', false);
|
||||
define('DS', '/');
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ class Themes extends Iterator
|
||||
/** @var Config */
|
||||
protected $config;
|
||||
|
||||
protected $inited = false;
|
||||
|
||||
/**
|
||||
* Themes constructor.
|
||||
*
|
||||
@@ -51,25 +53,29 @@ class Themes extends Iterator
|
||||
|
||||
public function initTheme()
|
||||
{
|
||||
/** @var Themes $themes */
|
||||
$themes = $this->grav['themes'];
|
||||
if ($this->inited === false) {
|
||||
/** @var Themes $themes */
|
||||
$themes = $this->grav['themes'];
|
||||
|
||||
try {
|
||||
$instance = $themes->load();
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
throw new \RuntimeException($this->current() . ' theme could not be found');
|
||||
try {
|
||||
$instance = $themes->load();
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
throw new \RuntimeException($this->current() . ' theme could not be found');
|
||||
}
|
||||
|
||||
if ($instance instanceof EventSubscriberInterface) {
|
||||
/** @var EventDispatcher $events */
|
||||
$events = $this->grav['events'];
|
||||
|
||||
$events->addSubscriber($instance);
|
||||
}
|
||||
|
||||
$this->grav['theme'] = $instance;
|
||||
|
||||
$this->grav->fireEvent('onThemeInitialized');
|
||||
|
||||
$this->inited = true;
|
||||
}
|
||||
|
||||
if ($instance instanceof EventSubscriberInterface) {
|
||||
/** @var EventDispatcher $events */
|
||||
$events = $this->grav['events'];
|
||||
|
||||
$events->addSubscriber($instance);
|
||||
}
|
||||
|
||||
$this->grav['theme'] = $instance;
|
||||
|
||||
$this->grav->fireEvent('onThemeInitialized');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user