You are here

function quotes_block in Quotes 6

Same name and namespace in other branches
  1. 5 quotes.module \quotes_block()

Implementation of hook_block().

File

./quotes.module, line 629
The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.

Code

function quotes_block($op = 'list', $delta = 0, $edit = array()) {
  global $_quotes_subs;

  // This is done here for "configure." The actual values are set below.
  $_quotes_subs = array(
    '%' . t('interval') => NULL,
    '%' . t('bid') => NULL,
    '%' . t('title') => NULL,
    '%' . t('nid') => NULL,
    '%' . t('user') => NULL,
  );
  switch ($op) {
    case 'mb_blocked':
      return quotes_block_mb_blocked();
    case 'list':
      return quotes_block_list();
    case 'view':
      return quotes_block_view($delta);
    case 'configure':
      return quotes_block_configure($delta, $edit);
    case 'save':
      quotes_block_configure_save($delta, $edit);
  }
}