You are here

public static function ExternalLinkExtension::defaultSettings in Markdown 8.2

Provides the default settings for the plugin.

Parameters

\Drupal\markdown\Annotation\InstallablePlugin $pluginDefinition: The plugin definition.

Return value

array The default settings.

Overrides SettingsTrait::defaultSettings

File

src/Plugin/Markdown/CommonMark/Extension/ExternalLinkExtension.php, line 66

Class

ExternalLinkExtension
Plugin annotation @MarkdownAllowedHtml( id = "commonmark-external-links", ) @MarkdownExtension( id = "commonmark-external-links", label = @Translation("External Links"), description = @Translation("Automatically detect links to external sites…

Namespace

Drupal\markdown\Plugin\Markdown\CommonMark\Extension

Code

public static function defaultSettings($pluginDefinition) {

  /* @var \Drupal\markdown\Annotation\InstallablePlugin $pluginDefinition */
  return [
    'html_class' => '',
    'internal_hosts' => [
      '[current-request:host]',
    ],
    'nofollow' => '',
    'noopener' => 'external',
    'noreferrer' => 'external',
    'open_in_new_window' => TRUE,
  ];
}