array('primary'),'class' => array('links', 'main-menu'))) : FALSE; $vars['sub_menu'] = isset($vars['secondary_menu']) ? theme('links', $vars['secondary_menu'], array(), array('id' => array('secondary'),'class' => array('links', 'sub-menu'))) : FALSE; // Adding a class to body in wireframe mode if (theme_get_setting('wireframe_mode')) { $vars['classes_array'][] = 'wireframe-mode'; } if (!empty($vars['main_menu']) or !empty($vars['sub_menu'])) { $vars['classes_array'][] = 'with-navigation'; } // Add PAGE template suggestions based on content type if (!empty($vars['node']->type)) { $vars['template_files'][] = "page-type-" . $vars['node']->type; } if (!empty($vars['node']->nid)) { $vars['template_files'][] = "page-node-" . $vars['node']->nid; } } function basic_preprocess_block(&$vars, $hook) { $block = $vars['block']; if (theme_get_setting('block_editing') && user_access('administer blocks')) { // Display 'edit block' for custom blocks. if ($block->module == 'block') { $edit_links[] = l('' . t('edit block') . '', 'admin/structure/block/configure/' . $block->module . '/' . $block->delta, array( 'attributes' => array( 'title' => t('edit the content of this block'), 'class' => 'block-edit', ), 'query' => drupal_get_destination(), 'html' => TRUE, ) ); } // Display 'configure' for other blocks. else { $edit_links[] = l('' . t('configure') . '', 'admin/structure/block/configure/' . $block->module . '/' . $block->delta, array( 'attributes' => array( 'title' => t('configure this block'), 'class' => 'block-config', ), 'query' => drupal_get_destination(), 'html' => TRUE, ) ); } // Display 'edit menu' for Menu blocks. if (($block->module == 'menu' || ($block->module == 'user' && $block->delta == 1)) && user_access('administer menu')) { $menu_name = ($block->module == 'user') ? 'navigation' : $block->delta; $edit_links[] = l('' . t('edit menu') . '', 'admin/structure/menu-customize/' . $menu_name, array( 'attributes' => array( 'title' => t('edit the menu that defines this block'), 'class' => 'block-edit-menu', ), 'query' => drupal_get_destination(), 'html' => TRUE, ) ); } // Display 'edit menu' for Menu block blocks. elseif ($block->module == 'menu_block' && user_access('administer menu')) { list($menu_name, ) = split(':', variable_get("menu_block_{$block->delta}_parent", 'navigation:0')); $edit_links[] = l('' . t('edit menu') . '', 'admin/structure/menu-customize/' . $menu_name, array( 'attributes' => array( 'title' => t('edit the menu that defines this block'), 'class' => 'block-edit-menu', ), 'query' => drupal_get_destination(), 'html' => TRUE, ) ); } $vars['edit_links_array'] = $edit_links; $vars['edit_links'] = '