function theme_diff_inline_chunk in Diff 7.2
Same name and namespace in other branches
- 6.2 diff.theme.inc \theme_diff_inline_chunk()
- 7.3 diff.theme.inc \theme_diff_inline_chunk()
Theme a span of changed text in an inline diff display.
2 theme calls to theme_diff_inline_chunk()
- DrupalDiffInline::render in ./
DiffEngine.php - Render differences inline using HTML markup.
- theme_diff_inline_metadata in ./
diff.theme.inc - Display inline diff metadata.
File
- ./
diff.theme.inc, line 316 - Themeable function callbacks for diff.module.
Code
function theme_diff_inline_chunk($vars) {
switch ($vars['type']) {
case 'add':
return "<span class='diff-added'>{$vars['text']}</span>";
case 'change':
return "<span class='diff-changed'>{$vars['text']}</span>";
case 'delete':
return "<span class='diff-deleted'>{$vars['text']}</span>";
default:
return $vars['text'];
}
}