function EducateBackticks in Typogrify 6
Same name and namespace in other branches
- 5 smartypants.php \EducateBackticks()
- 7 smartypants.php \EducateBackticks()
2 calls to EducateBackticks()
- SmartQuotes in ./
smartypants.php - SmartyPants in ./
smartypants.php
File
- ./
smartypants.php, line 460 - smartypants.php SmartyPants - Smart punctuation for web sites
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 $_;
}