Skip to content

Commit

Permalink
Merge branch 'release/1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sommerregen committed Sep 8, 2015
2 parents f379037 + db55fe6 commit e1a613e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# v1.0.2
## 09/08/2015

2. [](#improved)
* Added blueprints for Grav Admin plugin
3. [](#bugfix)
* Fixed `DebugBarException` ("twig" is not a registered collector)

# v1.0.1
## 08/21/2015

Expand Down
12 changes: 6 additions & 6 deletions blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Themer
version: 1.0.1
version: 1.0.2
description: "This plugin enables you to use different themes on one site individual set per page or collection."
icon: magic
author:
Expand All @@ -16,17 +16,17 @@ form:
fields:
global:
type: section
title: "Global plugin configurations"
title: PLUGINS.THEMER.GLOBAL_CONFIG
underline: 1

fields:
enabled:
type: toggle
label: "Plugin Status"
label: PLUGINS.THEMER.PLUGIN_STATUS
highlight: 1
default: 0
default: 1
options:
1: Enabled
0: Disabled
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool
13 changes: 13 additions & 0 deletions languages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# German
de:
PLUGINS:
THEMER:
GLOBAL_CONFIG: "Globale Einstellungen"
PLUGIN_STATUS: "Plugin Status"

# English
en:
PLUGINS:
THEMER:
GLOBAL_CONFIG: "Global plugin configurations"
PLUGIN_STATUS: "Plugin status"
9 changes: 5 additions & 4 deletions themer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Themer v1.0.1
* Themer v1.0.2
*
* This plugin enables you to use different themes on one site
* individual set per page or collection.
Expand All @@ -9,7 +9,7 @@
* http://benjamin-regler.de/license/
*
* @package Themer
* @version 1.0.1
* @version 1.0.2
* @link <https://github.com/sommerregen/grav-plugin-themer>
* @author Benjamin Regler <[email protected]>
* @copyright 2015, Benjamin Regler
Expand Down Expand Up @@ -80,7 +80,8 @@ public function onPageInitialized()
$this->grav['themes']->init();

// Silent DebugBar error :: 'twig' is already a registered collector
if ($debug = $this->config->get('system.debugger.twig', false)) {
$enabled = $this->config->get('system.debugger.enabled');
if ($enabled && ($debug = $this->config->get('system.debugger.twig', false))) {
$this->config->set('system.debugger.twig', false);
}

Expand All @@ -91,7 +92,7 @@ public function onPageInitialized()
$twig->init();

// Update TwigCollector for DebugBar
if ($debug) {
if ($enabled && $debug) {
$twig->twig = new TraceableTwigEnvironment($twig->twig);
$collector = $this->grav['debugger']->getCollector('twig');
$collector->twig = $twig->twig;
Expand Down

0 comments on commit e1a613e

Please sign in to comment.