function noreferrer_help in No Referrer 8
Implements hook_help().
File
- ./
noreferrer.module, line 95 - No Referrer module.
Code
function noreferrer_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.noreferrer':
$output[] = [
'#type' => 'html_tag',
'#tag' => 'p',
'#value' => t('No Referrer module allows you to add the <code>rel="noopener"</code> and <code>rel="noreferrer"</code> link types to both links in user-generated content and links generated by code.'),
];
$output[] = [
'#type' => 'html_tag',
'#tag' => 'p',
'#value' => t('To apply the configured link types to user-generated content, simply enable the <em>Add rel="noopener" and/or rel="noreferrer" to links</em> filter on your text formats.'),
];
$output[] = [
'#type' => 'html_tag',
'#tag' => 'p',
0 => Link::fromTextAndUrl(t('Read more about link types.'), Url::fromUri('https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types', [
'attributes' => [
'target' => '_blank',
],
]))
->toRenderable(),
];
return $output;
case 'noreferrer.settings':
return t('Link types enabled below will be added to links generated by code, such as link fields and menu items, as well as links in user-generated content using the <em>Add rel="noopener" and/or rel="noreferrer" to links</em> filter.');
}
}