You are here

public static function Typogrify::filter in Typogrify 5

Same name and namespace in other branches
  1. 6 typogrify.class.php \Typogrify::filter()
  2. 7 typogrify.class.php \Typogrify::filter()

typogrify

The super typography filter. Applies the following filters: widont, smartypants, caps, amp, initial_quotes Optionally choose to apply quote span tags to Gullemets as well.

File

./typogrify.class.php, line 177
typogrify.class.php Defines a class for providing different typographical tweaks to HTML

Class

Typogrify
@file typogrify.class.php Defines a class for providing different typographical tweaks to HTML

Code

public static function filter($text, $do_guillemets = FALSE) {
  $text = Typogrify::amp($text);
  $text = Typogrify::widont($text);
  $text = SmartyPants($text);
  $text = Typogrify::caps($text);
  $text = Typogrify::initial_quotes($text, $do_guillemets);
  $text = Typogrify::dash($text);
  return $text;
}