Last active
December 30, 2015 05:48
-
-
Save esafwan/7784586 to your computer and use it in GitHub Desktop.
Add custom link to the contextual links of block in Drupal 7.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function ccl_block_contextual_links_view_alter(&$element, &$items) { | |
if (isset($element['#element']['#block']) && $element['#element']['#block']->delta == "custom_module") { | |
$element['#links']['edit_f_block'] = array( | |
'title' => 'Change Content', | |
'href' => url('admin/config/front/block', array('absolute' => TRUE)), | |
); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment