diff --git a/core/modules/field/modules/text/config/text.settings.yml b/core/modules/field/modules/text/config/text.settings.yml new file mode 100644 index 0000000..1ff3cbc --- /dev/null +++ b/core/modules/field/modules/text/config/text.settings.yml @@ -0,0 +1 @@ +default_summary_length: 600 diff --git a/core/modules/field/modules/text/text.module b/core/modules/field/modules/text/text.module index f362fb7..c628838 100644 --- a/core/modules/field/modules/text/text.module +++ b/core/modules/field/modules/text/text.module @@ -349,9 +349,7 @@ function _text_sanitize($instance, $langcode, $item, $column) { function text_summary($text, $format = NULL, $size = NULL) { if (!isset($size)) { - // What used to be called 'teaser' is now called 'summary', but - // the variable 'teaser_length' is preserved for backwards compatibility. - $size = variable_get('teaser_length', 600); + $size = config('text.settings')->get('default_summary_length'); } // Find where the delimiter is in the body