Created
February 8, 2017 00:57
-
-
Save jongacnik/27a221a1da73d122fa370f4e3ab6efe8 to your computer and use it in GitHub Desktop.
Simple Kirby wrap tag implementation #kirby #tag @classnic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Extremely simple kirby wrap implementation | |
| * Just add html tags. Javascript does the rest. | |
| */ | |
| kirbytext::$pre[] = function($kirbytext, $value) { | |
| return str_replace( | |
| array('(block)', '(/block)'), | |
| array('<div class="block">', '</div>'), | |
| $value | |
| ); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment