function _disclaimer_render_content in Disclaimer 7
Helper to build top and bottom render.
Parameters
string $zone: Dynamically build content depending place, footer or top.
Return value
string Html content rendered.
1 call to _disclaimer_render_content()
- _disclaimer_build_content in ./
disclaimer.module - Generate disclaimer content.
File
- ./
disclaimer.module, line 259 - Create and show disclaimer for your site.
Code
function _disclaimer_render_content($zone = '') {
$output = '';
if ($zone == 'footer') {
$key = 'disclaimer_footer_';
}
else {
$key = 'disclaimer_main_';
}
if (variable_get($key . 'source') == 0) {
$content = variable_get($key . 'content', array(
'value' => '',
'format' => NULL,
));
$output = check_markup($content['value'], $content['format']);
}
else {
$node = node_load(variable_get($key . 'node', 0));
if (!empty($node)) {
$node = node_view($node, variable_get($key . 'node_view'));
if (variable_get($key . 'node_view_links') != 1) {
$node['links']['#access'] = FALSE;
}
$output = drupal_render($node);
}
}
return $output;
}