function delta_blocks_menu_contextual_links_alter in Delta 7.3
Implements hook_menu_contextual_links_alter().
File
- delta_blocks/
delta_blocks.module, line 266 - Exposes a number of core Drupal elements as blocks.
Code
function delta_blocks_menu_contextual_links_alter(&$links, $router_item, $root_path) {
$block = array_pop($router_item['map']);
if (in_array($block, array(
'site-slogan',
'site-name',
'branding',
))) {
$links['site-information'] = array(
'title' => t('Site information'),
'href' => 'admin/config/system/site-information',
'localized_options' => array(),
);
}
if (in_array($block, array(
'logo',
'branding',
))) {
$links['logo-settings'] = array(
'title' => t('Logo settings'),
'href' => module_exists('delta_ui') && !empty($GLOBALS['delta']) ? 'admin/appearance/delta/layouts/configure/' . $GLOBALS['delta']->machine_name : 'admin/appearance/settings/' . $GLOBALS['theme_key'],
'localized_options' => array(
'fragment' => 'edit-logo',
),
);
}
}