function _filter_autop
Same name and namespace in other branches
- 10 core/modules/filter/filter.module \_filter_autop()
- 9 core/modules/filter/filter.module \_filter_autop()
- 8.9.x core/modules/filter/filter.module \_filter_autop()
- 7.x modules/filter/filter.module \_filter_autop()
- main core/modules/filter/filter.module \_filter_autop()
Converts line breaks into <p> and <br> in an intelligent fashion.
Based on: http://photomatt.net/scripts/autop
Deprecated
in drupal:11.4.0 and is removed from drupal:13.0.0. The logic has been included in \Drupal\filter\Plugin\Filter\FilterAutoP::process() and no replacement is provided.
See also
https://www.drupal.org/node/3566774
Related topics
File
-
core/
modules/ filter/ filter.module, line 533
Code
function _filter_autop($text) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. The logic has been included in \\Drupal\\filter\\Plugin\\Filter\\FilterAutoP::process() and no replacement is provided. See https://www.drupal.org/node/3566774', E_USER_DEPRECATED);
$langcode = \Drupal::languageManager()->getCurrentLanguage()
->getId();
return \Drupal::service('plugin.manager.filter')->createInstance('filter_autop')
->process($text, $langcode)
->getProcessedText();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.