function i18nblocks_get_block in Internationalization 5.3
Same name and namespace in other branches
- 5 i18nblocks/i18nblocks.module \i18nblocks_get_block()
- 5.2 i18nblocks/i18nblocks.module \i18nblocks_get_block()
1 call to i18nblocks_get_block()
- i18nblocks_block in i18nblocks/
i18nblocks.module - Implementation of hook_block()
File
- i18nblocks/
i18nblocks.module, line 287
Code
function i18nblocks_get_block($delta, $language) {
$meta = db_fetch_object(db_query("SELECT i.*, b.title FROM {i18n_blocks_i18n} i INNER JOIN {blocks} b ON i.delta = b.delta AND i.module = b.module WHERE i.bid = '%d' AND i.language = '%s'", $delta, $language));
if ($block = module_invoke($meta->module, 'block', 'view', $meta->delta)) {
if ($meta->title) {
// Check plain here to allow module generated titles to keep any markup.
$block['subject'] = $meta->title == '<none>' ? '' : check_plain($meta->title);
}
return $block;
}
}