diff --git a/sharethis.api.php b/sharethis.api.php new file mode 100644 index 0000000..448d855 --- /dev/null +++ b/sharethis.api.php @@ -0,0 +1,23 @@ +configFactory = $config_factory; $this->titleResolver = $title_resolver; $this->renderer = $renderer; $this->routeMatch = $route_match; $this->requestStack = $request_stack; + $this->moduleHandler = $module_handler; } /** @@ -255,6 +266,10 @@ class SharethisManager implements SharethisManagerInterface { if (!empty($type)) { $attributes['displayText'] = Html::escape($display); } + + // Alter to allow other module to change or add attribute and data_options elements. + $this->moduleHandler->alter('sharethis_render', $attributes, $data_options); + $meta_generator = array( '#type' => 'html_tag', '#tag' => 'span',