You are here

function sharethis_help in ShareThis 8.2

Same name and namespace in other branches
  1. 5 sharethis.module \sharethis_help()
  2. 6.2 sharethis.module \sharethis_help()
  3. 6 sharethis.module \sharethis_help()
  4. 7.2 sharethis.module \sharethis_help()
  5. 7 sharethis.module \sharethis_help()

Implements hook_help().

File

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

Code

function sharethis_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'sharethis.configuration_form':
      return '<p>' . t('Choose the widget, button family, and services for using <a href=":sharethis">ShareThis</a> to share content online.', [
        ':sharethis' => 'http://www.sharethis.com',
      ]) . '</p>';
    case 'help.page.sharethis':
      $return_value = '<p>' . t('This plugin places the ShareThis widget on each node.') . '</p>';
      $return_value .= '<ul><li>' . t('The Block pulls the URL from the current page and current Drupal title, the node version pulls it from the node title and url.') . '</li>';
      $return_value .= '<li>' . t('The block can be placed anywhere on a page, the node is limited to where nodes normally go') . '</li>';
      $return_value .= '<li>' . t('The block module is more likely to be compatible with other plugins that use blocks rather than nodes. (Panels works nicely with the block)') . '</li></ul>';
      $return_value .= '<p>' . t('For various configuration options please got to <a href=":sharethis">the settings page</a>.', [
        ':sharethis' => Url::fromRoute('sharethis.configuration_form'),
      ]) . '</p>';
      $return_value .= '<p>' . t('For more information, please visit <a href=":help">support.sharethis.com</a>.', [
        ':help' => 'http://support.sharethis.com/customer/portal/articles/446621-drupal-integration',
      ]) . '</p>';
      return $return_value;
  }
}