martin-wessel-topfloor / Field-Markup

A Drupal 7 module that extends Display Suite by exposing the Expert field markup settings in a JSON file.
0 stars 0 forks source link

Remove isset($markup_field['truncate']) and isset($markup_field['break']) code #4

Open martin-wessel-topfloor opened 9 years ago

martin-wessel-topfloor commented 9 years ago

Both these code blocks modify the content of a field and should be in a separate module called by drupal_alter.

martin-wessel-topfloor commented 9 years ago

This will break backwards compatibility

martin-wessel-topfloor commented 9 years ago

This breaks compatibility only in the sense that those keys would be ignored and the text would not be processed.

It might be possible to keep backwards compatibility if the tf_functions_load_json function is updated to allow altering the array before it is saved. A hook could be implemented in a new alter type module that scans through the array and looks for the original keys and changes them to the new alter format before the array is saved. It may also need to change the keys for the alter since they're likely to change as well.