function features_field_export_needs_wrap in Features 7.2
Determine if a field export line needs to be wrapped.
Drupal code standards specify that comments should wrap at 80 characters or less.
Parameters
string $prefix: The prefix to be exported before the field identifier.
string $identifier: The field identifier.
Return value
bool TRUE if the line should be wrapped after the prefix, else FALSE.
See also
https://www.drupal.org/node/1354
2 calls to features_field_export_needs_wrap()
- field_base_features_export_render in includes/
features.field.inc - Implements hook_features_export_render().
- field_instance_features_export_render in includes/
features.field.inc - Implements hook_features_export_render().
File
- includes/
features.field.inc, line 628 - Features integration on behalf of 'field' module.
Code
function features_field_export_needs_wrap($prefix, $identifier) {
// Check for 79 characters, since the comment ends with a full stop.
return strlen($prefix) + strlen($identifier) > 79;
}