function blocks_render_block
Search API
4.x blocks.module | blocks_render_block($delta) |
5.x blocks.module | blocks_render_block($delta) |
Implementation of hook_render_block. We are going to render out our content_block content type.
Parameters
unknown_type $delta:
File
- modules/
blocks/ blocks.module, line 258
Code
function blocks_render_block($delta) {
$temp = explode("_", $delta);
$cid = $temp [1];
$content = content_load($cid);
$block = array();
if (!strstr($content ["title"], "[hide]")) {
$block ["title"] = $content ["title"];
}
$block ["body"] = $content ["body"];
// What type of mobile_display_mode has been set?
if (fp_screen_is_mobile()) {
if ($content ["settings"]["mobile_display_mode"] == "hide") {
return array(); // return an empty array
}
else if ($content ["settings"]["mobile_display_mode"] == "collapse") {
// Place the content in a collapsible fieldset.
$block ["body"] = fp_render_c_fieldset($block ["body"], t("Press to read") . " " . $content ["title"], TRUE);
}
}
return $block;
}