1<?php 2/** 3 * Mikio Syntax Plugin: Card Footer 4 * 5 * Syntax: <CARD-FOOTER></CARD-FOOTER> 6 * 7 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 8 * @author James Collins <james.collins@outlook.com.au> 9 */ 10 11if (!defined('DOKU_INC')) die(); 12if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 13require_once(dirname(__FILE__).'/core.php'); 14 15class syntax_plugin_mikioplugin_cardfooter extends syntax_plugin_mikioplugin_core { 16 public $tag = 'card-footer'; 17 public $options = array('small'); 18 19 public function render_lexer_enter(Doku_Renderer $renderer, $data) { 20 $classes = $this->buildClassString($data); 21 22 $renderer->doc .= '<div class="card-footer ' . $classes . '">'; 23 24 if(array_key_exists('small', $data) && $data['small'] != false) $renderer->doc .= '<small>'; 25 } 26 27 28 public function render_lexer_exit(Doku_Renderer $renderer, $data) { 29 if(array_key_exists('small', $this->values) && $this->values['small'] == true) $renderer->doc .= '</small>'; 30 31 $renderer->doc .= '</div>'; 32 } 33} 34?>