--- /dev/null
+/**
+ * Implements hook_field_widget_settings_summary_alter().
+ */
+function {{ machine_name }}_field_widget_settings_summary_alter(&$summary, $context) {
+ // Append a message to the summary when an instance of foo_widget has
+ // mysetting set to TRUE for the current view mode.
+ if ($context['widget']->getPluginId() == 'foo_widget') {
+ if ($context['widget']->getThirdPartySetting('my_module', 'my_setting')) {
+ $summary[] = t('My setting enabled.');
+ }
+ }
+}