You are here

function hook_rrssb_buttons_alter in Ridiculously Responsive Social Sharing Buttons 8.2

Same name and namespace in other branches
  1. 7.2 rrssb.api.php \hook_rrssb_buttons_alter()
  2. 7 rrssb.api.php \hook_rrssb_buttons_alter()

Alter the configuration for social share buttons provided by other modules.

Parameters

array $buttons: Existing button configuration, see @hook_rrssb_buttons.

1 invocation of hook_rrssb_buttons_alter()
rrssb_button_config in ./rrssb.module
Fetch config for all buttons.

File

./rrssb.api.php, line 37
Hooks provided by the Ridiculously Responsive Social Share Buttons module.

Code

function hook_rrssb_buttons_alter(&$buttons) {

  // Set the email button follow action to link to the simplenews subscribe page.
  if (\Drupal::service('module_handler')
    ->moduleExists('simplenews')) {
    $buttons['email']['follow_url'] = '/newsletter/subscriptions';
    $buttons['email']['title_follow'] = 'subscribe';
  }
}