You are here

function EducateBackticks in Typogrify 5

Same name and namespace in other branches
  1. 6 smartypants.php \EducateBackticks()
  2. 7 smartypants.php \EducateBackticks()
2 calls to EducateBackticks()
SmartQuotes in ./smartypants.php
SmartyPants in ./smartypants.php

File

./smartypants.php, line 492

Code

function EducateBackticks($_) {

  #

  #   Parameter:  String.

  #   Returns:    The string, with ``backticks'' -style double quotes

  #               translated into HTML curly quote entities.

  #

  #   Example input:  ``Isn't this fun?''

  #   Example output: “Isn't this fun?”

  #
  $_ = str_replace(array(
    "``",
    "''",
  ), array(
    '“',
    '”',
  ), $_);
  return $_;
}