$theme, 'region' => $region, 'module' => $module, 'delta' => $delta, 'weight' => $weight))); } /** * Disable a block within a theme. */ function install_disable_block($module, $delta, $theme) { db_query("UPDATE {blocks} SET region = '', status = 0 WHERE module = '%s' AND delta = '%s' AND theme = '%s'", $module, $delta, $theme); } /** * Creates a new block role. */ function install_add_block_role($module, $delta, $rid) { db_query("INSERT INTO {blocks_roles} (module,delta,rid) VALUES ('%s', '%s', %d)", $module, $delta, $rid); } /** * Create a custom block (box). * * @param $body * The body of the custom block. * @param $description * The description of the custom block (for admin/build/blocks). * @param $format * The input format for the block's body. * * @return * The new block's delta. * * @see block_add_block_form_submit() */ function install_create_custom_block($body, $description, $format = FILTER_FORMAT_DEFAULT) { db_query("INSERT INTO {boxes} (body, info, format) VALUES ('%s', '%s', %d)", $body, $description, $format); return install_last_insert_id('boxes', 'bid'); }