Skip to content

Instantly share code, notes, and snippets.

@jongacnik
Created February 8, 2017 00:57
Show Gist options
  • Select an option

  • Save jongacnik/27a221a1da73d122fa370f4e3ab6efe8 to your computer and use it in GitHub Desktop.

Select an option

Save jongacnik/27a221a1da73d122fa370f4e3ab6efe8 to your computer and use it in GitHub Desktop.
Simple Kirby wrap tag implementation #kirby #tag @classnic
<?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