You are here

function EducateSingleBackticks in Typogrify 5

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

File

./smartypants.php, line 508

Code

function EducateSingleBackticks($_) {

  #

  #   Parameter:  String.

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

  #               translated into HTML curly quote entities.

  #

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

  #   Example output: ‘Isn’t this fun?’

  #
  $_ = str_replace(array(
    "`",
    "'",
  ), array(
    '‘',
    '’',
  ), $_);
  return $_;
}