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

Rename bundle: target key to content-type: #3

Open martin-wessel-topfloor opened 9 years ago

martin-wessel-topfloor commented 9 years ago

The current key of bundle:, while used by Drupal internally, is not clear to someone not used to Drupal's internals. Change the key to content-type to make it easier to understand the JSON file.

martin-wessel-topfloor commented 9 years ago

Note that 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 field definition 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 field_markup that scans through the array and replaces bundle with content-type.