Currently if module's want to alter a summary, they have to first check if it's not empty to add another '
', then add the summary. Should we maybe enforce that we pass an array of summary strings to the alter hook, so all a module needs to do to add a summary line is do $summary['mymodule'] = t('My setting summary'); and the module will do $summary = implode('<br />', $summary);

Comments

andypost’s picture

Subscribe, is this possible in 7 without patching core?
I found no ability when faced with #961412: Formatter settings button lost when summary is empty

dave reid’s picture

Install the module and you automatically get the two alter hooks documented in field_formatter_settings.api.php with no configuration needed.

dave reid’s picture

Status: Active » Closed (won't fix)

At this point I don't agree with my original thought. We shouldn't change what type of variable the summary is since there are quite a few modules that depend on this module now, and we'd break that behavior.