drupal_placeholder

drupal_placeholder($text)

Formats text for emphasized display in a placeholder inside a sentence.

Deprecated

in Drupal 8.0.0, will be removed before Drupal 9.0.0. Use \Drupal\Component\Utility\SafeMarkup::format() or Twig's "placeholder" filter instead. Note this method should not be used to simply emphasize a string and therefore has few valid use-cases. Note also, that this method does not mark the string as safe.

See also

\Drupal\Component\Utility\SafeMarkup::format()

File

core/includes/bootstrap.inc, line 935
Functions that need to be loaded on every Drupal request.

Code

function drupal_placeholder($text) {
  return '<em class="placeholder">' . Html::escape($text) . '</em>';
}
doc_Drupal
2016-10-29 09:03:17
Comments
Leave a Comment

Please login to continue.