You are here

function sharethis_contextual_links_view_alter in ShareThis 7.2

Implements hook_contextual_links_view_alter().

File

./sharethis.module, line 514
A module that adds one of the ShareThis widget to your website.

Code

function sharethis_contextual_links_view_alter(&$element, $items) {

  // Add the configuration link for the ShareThis settings on the block itself.
  if (isset($element['#element']['#block']->module) && $element['#element']['#block']->module == 'sharethis' && $element['#element']['#block']->delta == 'sharethis_block' && user_access('access administration pages')) {
    $element['#links']['sharethis-configure'] = array(
      'title' => t('Configure ShareThis'),
      'href' => 'admin/config/services/sharethis',
    );
  }
}