function diff_build_attachments in Diff 7.3
Helper function to load any CSS or JScript files required by a page or form.
2 calls to diff_build_attachments()
- diff_diffs_show in ./
diff.pages.inc - Create a comparison for the node between versions 'old_vid' and 'new_vid'.
- diff_node_revisions in ./
diff.pages.inc - Input form to select two revisions.
File
- ./
diff.module, line 674 - Provides functionality to show a diff between two node revisions.
Code
function diff_build_attachments($jscript = FALSE) {
$attachments = array();
$theme = variable_get('diff_theme', 'default');
if ($theme) {
$attachments['css'] = array(
drupal_get_path('module', 'diff') . "/css/diff.{$theme}.css",
);
}
$type = variable_get('diff_radio_behavior', 'simple');
if ($jscript && $type) {
$attachments['js'] = array(
drupal_get_path('module', 'diff') . "/js/diff.js",
array(
'data' => array(
'diffRevisionRadios' => $type,
),
'type' => 'setting',
),
);
}
return $attachments;
}