1<?php 2/** 3 * pagebreak2 action plugin 4 * 5 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 6 * @author Matthias Schulte <dokuwiki@lupo49.de> 7 * @version 2013-06-09 8 */ 9 10if(!defined('DOKU_INC')) die(); 11if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 12 13require_once(DOKU_PLUGIN.'action.php'); 14 15define('KEYWORD_SOURCE_ABSTRACT', 'abstract'); 16define('KEYWORD_SOURCE_GLOBAL', 'global'); 17define('KEYWORD_SOURCE_SYNTAX', 'syntax'); 18 19class action_plugin_pagebreak2 extends DokuWiki_Action_Plugin { 20 21 function register(Doku_Event_Handler $controller) { 22 $controller->register_hook('TPL_METAHEADER_OUTPUT','BEFORE',$this,'pagebreak2',array()); 23 } 24 25 function pagebreak2(&$event, $param) { 26 if(empty($event->data) || empty($event->data['meta'])) return; 27 $key = count($event->data['link']); 28 29 $css = array("rel" => "stylesheet", 30 "type" => "text/css", 31 "href" => DOKU_BASE . "lib/plugins/pagebreak2/" . "title-h1.css" 32 ); 33 34 $event->data['link'][$key] = $css; 35 } 36} 37