function drupal_placeholder
Same name in other branches
- 7.x includes/bootstrap.inc \drupal_placeholder()
Formats text for emphasized display in a placeholder inside a sentence.
Deprecated
in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Component\Render\FormattableMarkup 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
https://www.drupal.org/node/2302363
File
-
core/
includes/ bootstrap.inc, line 1019
Code
function drupal_placeholder($text) {
return '<em class="placeholder">' . Html::escape($text) . '</em>';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.