function fb_social_block in Facebook social plugins integration 6.2
Same name and namespace in other branches
- 6 fb_social.module \fb_social_block()
Implementation of hook_block
File
- ./
fb_social.module, line 59
Code
function fb_social_block($op = 'list', $delta = 0, $edit = array()) {
if ($op == 'list') {
$blocks = array();
if ($presets = fb_social_get_presets()) {
foreach ($presets as $preset) {
if ($preset->settings['block']) {
$blocks[$preset->name] = array(
'info' => $preset->name . ' block',
'cache' => DRUPAL_NO_CACHE,
);
}
}
}
return $blocks;
}
elseif ($op == 'view') {
if ($preset = fb_social_get_presets($name = $delta)) {
$block['subject'] = t('');
$block['content'] = fb_social_preset_view($preset);
return $block;
}
}
}