You are here

function auto_block_scheduler_enabled_block in Auto Block Scheduler 7

Method used to unpublish scheduled block by bid.

Parameters

int $bid: Block bid.

Return value

array Associate array of publish and unpublish dates.

2 calls to auto_block_scheduler_enabled_block()
auto_block_scheduler_display_scheduler_submit in ./auto_block_scheduler.module
Form submission handler for admin block display section.
auto_block_scheduler_option_for_block in ./auto_block_scheduler.module
It is used to add scheduler option in block create/edit form.

File

./auto_block_scheduler.module, line 374
Scheduler publishes and unpublishes block on dates specified by the user.

Code

function auto_block_scheduler_enabled_block($bid) {
  $results = db_select('auto_block_scheduler', 'bs')
    ->fields('bs', array(
    'publish_on',
    'unpublish_on',
  ))
    ->condition('bid', $bid)
    ->execute()
    ->fetchAssoc();
  return $results;
}