function block_custom_block_save
Saves a user-created block in the database.
Parameters
$edit: Associative array of fields to save. Array keys:
- info: Block description.
- body: Associative array of body value and format. Array keys:
- value: Block contents.
- format: Filter ID of the filter format for the body.
$delta: Block ID of the block to save.
Return value
Always returns TRUE.
1 call to block_custom_block_save()
- block_block_save in modules/
block/ block.module - Implements hook_block_save().
File
-
modules/
block/ block.module, line 561
Code
function block_custom_block_save($edit, $delta) {
db_update('block_custom')->fields(array(
'body' => $edit['body']['value'],
'info' => $edit['info'],
'format' => $edit['body']['format'],
))
->condition('bid', $delta)
->execute();
return TRUE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.