You are here

function mostpopular_blocks_admin_form_add_local_block in Drupal Most Popular 7

1 string reference to 'mostpopular_blocks_admin_form_add_local_block'
mostpopular_blocks_admin_form in ./mostpopular.blocks.inc
@file Provides an admin GUI for configuring most popular blocks.

File

./mostpopular.blocks.inc, line 145
Provides an admin GUI for configuring most popular blocks.

Code

function mostpopular_blocks_admin_form_add_local_block($form, &$form_state) {
  $form_state['blocks'][] = (object) array(
    'name' => 'block_' . (count($form_state['blocks']) + 1),
    'title' => t('Most Popular'),
    'count' => 5,
    'data' => array(),
  );
  $form_state['rebuild'] = TRUE;
}