Skip to content

Commit

Permalink
Pico2.x対応
Browse files Browse the repository at this point in the history
  • Loading branch information
TakamiChie committed Jul 24, 2019
1 parent 8a0c3b7 commit 90bc2e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pico_toc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
* @author TakamiChie
* @link https://onpu-tamago.net/
* @license http://opensource.org/licenses/MIT
* @version 1.0
* @version 1.1
*/
class Pico_TOC extends AbstractPicoPlugin {

const API_VERSION = 2;

protected $enabled = false;

public function onConfigLoaded(&$config)
Expand All @@ -18,7 +20,7 @@ public function onConfigLoaded(&$config)
$config["headerlv"]["level"] : 3;
}

public function onPageRendering(Twig_Environment &$twig, array &$twigVariables, &$templateName)
public function onPageRendering(&$templateName, array &$twigVariables)
{
$content = $twigVariables["content"];
$twigVariables["TOC"] = $this->createTOC($content);
Expand Down

0 comments on commit 90bc2e0

Please sign in to comment.