You are here

function theme_quickedit_wrap_field in Quick Edit 7

Formats a field in a wrapper with the required metadata.

Default tag is div because inline CKEditor will refuse to work on a span that is made contenteditable.

1 theme call to theme_quickedit_wrap_field()
quickedit_wrap_pseudofield in ./quickedit.module
Wraps the name pseudo-field attached to nodes.

File

./quickedit.module, line 777
Provides in-place content editing functionality for fields.

Code

function theme_quickedit_wrap_field($variables) {
  $variables['attributes']['data-quickedit-field-id'] = $variables['quickedit_field_id'];
  $el = 'div';
  if ($variables['inline']) {
    $el = 'span';
  }
  return '<' . $el . drupal_attributes($variables['attributes']) . '>' . $variables['value'] . '</' . $el . '>';
}