Skip to content

Instantly share code, notes, and snippets.

@jonabaptistella
Forked from medienbaecker/shy.php
Created April 10, 2019 12:48
Show Gist options
  • Select an option

  • Save jonabaptistella/dc235557983fa779d4a5e72def59d153 to your computer and use it in GitHub Desktop.

Select an option

Save jonabaptistella/dc235557983fa779d4a5e72def59d153 to your computer and use it in GitHub Desktop.
(-) to ­ KirbyTag hook
<?php
Kirby::plugin('medienbaecker/shy', [
'hooks' => [
'kirbytags:before' => function ($text, $data, $options) {
return Str::replace($text, "(-)", "&shy;");
}
]
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment