block_custom_block_save

Versions
7
block_custom_block_save($edit, $delta)

Saves a user-created block in the database.

Parameters

$edit Associative array of fields to save. Array keys:

  • info: Block description.
  • body: 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.

Code

modules/block/block.module, line 450

<?php
function block_custom_block_save($edit, $delta) {
  db_update('block_custom')
    ->fields(array(
      'body' => $edit['body'],
      'info' => $edit['info'],
      'format' => $edit['body_format'],
    ))
    ->condition('bid', $delta)
    ->execute();
  return TRUE;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.