One-line-setup function for using blocks in a page.

This commit is contained in:
defacer
2005-03-02 05:15:39 +00:00
parent 262771e08f
commit ec79d3e428
+7
View File
@@ -312,6 +312,13 @@ function blocks_find_instance($instanceid, $blocksarray) {
return false;
}
// Simple entry point for anyone that wants to use blocks
function blocks_setup(&$PAGE) {
$pageblocks = blocks_get_by_page($PAGE);
blocks_execute_url_action($PAGE, $pageblocks);
return $pageblocks;
}
function blocks_execute_action($page, &$pageblocks, $blockaction, $instanceorid) {
global $CFG;